Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Commit 209820b

Browse files
committed
Hide tickets when not open for schools
1 parent 1134eda commit 209820b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

resources/views/schools.twig

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,19 @@
7979
$7 per student<br />
8080
(Scholarships available)
8181
</section>
82-
<section class="register">
83-
<a class="cta" href="/{{ event.webname }}/schools/register">Promote to Students</a>
84-
<a class="cta" href="/{{ event.webname }}/schools/register">Register as a Group</a>
85-
</section>
82+
{% if event.venue and event.registration_info.is_open and event.registration_info.remaining > 0 %}
83+
<section class="register">
84+
<a class="cta" href="/{{ event.webname }}/schools/register">Promote to Students</a>
85+
<a class="cta" href="/{{ event.webname }}/schools/register">Register as a Group</a>
86+
</section>
87+
{% else %}
88+
<section class="register">
89+
<p><em>Sorry, ticket sales are not currently open for this event.</em></p>
90+
</section>
91+
{% endif %}
8692
<section class="questions">
87-
<p>Questions? Email <a href="mailto:schools@srnd.org">schools@srnd.org</a> or call 888-607-7763 ext 3.</p>
93+
<p><strong>Group Submission Deadline: {{ (event.starts_at - (60*60*48))|date('F j') }}</strong><br />
94+
Questions? Email <a href="mailto:schools@srnd.org">schools@srnd.org</a> or call 888-607-7763 ext 3.</p>
8895
</section>
8996
</section>
9097
</article>

0 commit comments

Comments
 (0)