Skip to content

Commit 4a27547

Browse files
Add logic for add/edit events based on if there are any
1 parent fb8cacc commit 4a27547

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

hackathon/templates/hackathon/hackathon_view.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
<i class="fas fa-pen mr-2"></i>Edit Hackathon
5858
</a>
5959
<a role="button" class="dropdown-item" href="{% url 'hackathon:hackathon_events' hackathon.id %}">
60-
<i class="fas fa-calendar mr-2"></i>Change Events
60+
<i class="fas fa-calendar mr-2"></i>
61+
{% if hackathon.events.first %}Edit{% else %}Add{% endif %} Events
6162
</a>
6263
<a role="button" class="dropdown-item" href="/hackadmin/{{hackathon.id}}/participants/">
6364
<i class="fas fa-user-cog mr-2"></i>View Hackathon Stats
@@ -138,7 +139,6 @@ <h1 class="page-title">{{ hackathon.display_name }} #{{ hackathon.id }}</h1>
138139
</div>
139140
<!-- Calender is rendered here -->
140141
{% if hackathon.events.first %}
141-
{{ hackathon.events.first }}
142142
<div id="calendar-container">
143143
<div id="calendar" style="height: 600px;"></div>
144144
<div class="col d-flex justify-content-center">

0 commit comments

Comments
 (0)