Skip to content

Commit

Permalink
Add logic for add/edit events based on if there are any
Browse files Browse the repository at this point in the history
  • Loading branch information
kenanwright1988 committed Sep 17, 2024
1 parent fb8cacc commit 4a27547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hackathon/templates/hackathon/hackathon_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
<i class="fas fa-pen mr-2"></i>Edit Hackathon
</a>
<a role="button" class="dropdown-item" href="{% url 'hackathon:hackathon_events' hackathon.id %}">
<i class="fas fa-calendar mr-2"></i>Change Events
<i class="fas fa-calendar mr-2"></i>
{% if hackathon.events.first %}Edit{% else %}Add{% endif %} Events
</a>
<a role="button" class="dropdown-item" href="/hackadmin/{{hackathon.id}}/participants/">
<i class="fas fa-user-cog mr-2"></i>View Hackathon Stats
Expand Down Expand Up @@ -138,7 +139,6 @@ <h1 class="page-title">{{ hackathon.display_name }} #{{ hackathon.id }}</h1>
</div>
<!-- Calender is rendered here -->
{% if hackathon.events.first %}
{{ hackathon.events.first }}
<div id="calendar-container">
<div id="calendar" style="height: 600px;"></div>
<div class="col d-flex justify-content-center">
Expand Down

0 comments on commit 4a27547

Please sign in to comment.