app/views/notifications/index.html.erb
<%= render "layouts/navbar" %>
<br>
<br>
<% if flash[:alert]%>
<div class="alert alert-danger" role = "alert"><%= flash[:alert]%></div>
<% end %>
<h1 class="text-uppercase text-center" id="title-list"><span class="fa fa-sticky-note text-left"></span> quadro de avisos</h1>
<hr>
<section class="content-section">
<div class="container">
<% if is_principal? or is_secretary? or is_teacher? %>
<%= link_to '<span class="fa fa-plus-circle"></span> Nova notificação'.html_safe, new_notification_path, class:"text-center btn btn-info" %>
<% end %>
<div class="row">
<% @notifications.reverse.each do |note| %>
<div class="col-sm-6 col-md-4 col-lg-3 text-capitalize descript">
<%= link_to "<strong style='white-space:normal'>#{note.title}</strong><br><h6>#{note.notification_date.day}/#{note.notification_date.month}/#{note.notification_date.year}</h6>".html_safe, notification_path(note), class:'btn btn-lg btn-purple btn-block' %>
</div>
<% end %>
</div>
<hr>
</div>
</section>