Skip to content

Commit

Permalink
Hide/Show Announcement link is now hidden if there are no current ann…
Browse files Browse the repository at this point in the history
…ouncements
  • Loading branch information
SulphurDioxide committed Jun 9, 2017
1 parent fff4088 commit 1acfc9d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/views/layouts/application.html.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,14 @@
<div class="alert alert-<%= key %>"><%= value %></div>
<% end %>
<p><em><a href="#" class="announcement-collapse">Hide announcements</a></em></p>
<div class="announcements">
<% Announcement.current.each do |a| %>
<%= render 'announcements/announcement', announcement: a %>
<% end %>
</div><br/>
<% if Announcement.current.count > 0 %>
<p><em><a href="#" class="announcement-collapse">Hide announcements</a></em></p>
<div class="announcements">
<% Announcement.current.each do |a| %>
<%= render 'announcements/announcement', announcement: a %>
<% end %>
</div><br/>
<% end %>
<%= yield %>
<div class="footer">
Expand Down

0 comments on commit 1acfc9d

Please sign in to comment.