Skip to content
Snippets Groups Projects
Commit 0c9f3c0e authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Rely on the apply page, not the public for deadline

parent 09d04bb7
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@
<div class="wrapper wrapper--listings">
{% for child_page in page.get_children.public.live %}
{% include "apply_home/includes/apply_listing.html" with page=child_page %}
{% include "apply_home/includes/apply_listing.html" with page=child_page.specific %}
{% endfor %}
</div>
......
{% load wagtailcore_tags %}
{% with details=page.specific.detail.specific %}
{% if page.specific.open_round %}
{% with details=page.detail.specific %}
{% if page.open_round %}
<div class="listing listing--not-a-link">
<div>
<h4 class="listing__title listing__title--link">
{% if details.deadline %}
{% if page.next_deadline %}
<p class="listing__deadline">
<svg class="icon icon--calendar icon--small"><use xlink:href="#calendar"></use></svg>
<span>Next deadline: {{ details.deadline|date:"M j, Y" }}</span>
<span>Next deadline: {{ page.next_deadline|date:"M j, Y" }}</span>
</p>
{% endif %}
{# details may be None, so be more verbose in the handling of the title #}
{% if page.title %}
{% if details %}
<a href="{% pageurl details %}">
{% endif %}
{{ page.title }}
{% if details %}
</a>
{% endif %}
{% else %}
{% if details %}
<a href="{% pageurl details %}">
{% endif %}
{% if details %}
<a href="{% pageurl details %}">
{% endif %}
{{ details.listing_title|default:details.title }}
{{ page.title }}
{% if details %}
</a>
{% endif %}
{% if details %}
</a>
{% endif %}
</h4>
......@@ -40,6 +27,6 @@
{% endif %}
</div>
<a class="listing__button" href="{% pageurl page %}">Apply</a>
</div>
</div>
{% endif %}
{% endwith %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment