index.html.erb 911 B

1234567891011121314151617181920212223242526
  1. <h1>What's New</h1>
  2. <div class="card card-block">
  3. <% @announcements.each_with_index do |announcement, index| %>
  4. <% if index != 0 %>
  5. <div class="row"><div class="col"><hr /></div></div>
  6. <% end %>
  7. <div class="row announcement" id="<%= dom_id(announcement) %>">
  8. <div class="col-sm-1 text-center">
  9. <%= link_to announcements_path(anchor: dom_id(announcement)) do %>
  10. <strong><%= announcement.published_at.strftime("%b %d") %></strong>
  11. <% end %>
  12. </div>
  13. <div class="col">
  14. <strong class="<%= announcement_class(announcement.announcement_type) %>"><%= announcement.announcement_type.titleize %>:</strong>
  15. <strong><%= announcement.name %>.</strong>
  16. <%= simple_format announcement.description %>
  17. </div>
  18. </div>
  19. <% end %>
  20. <% if @announcements.empty? %>
  21. <div>Exciting stuff coming very soon!</div>
  22. <% end %>
  23. </div>