app/views/notifications/show.html.erb
<%= render "layouts/navbar" %>
<br>
<br>
<% if flash[:success]%>
<div class="alert alert-success" role = "alert"><%= flash[:success]%></div>
<% end %>
<% if flash[:notice]%>
<div class="alert alert-warning" role = "alert"><%= flash[:notice]%></div>
<% end %>
<section class="content-section" id="notification">
<div class="container">
<div class="text-center">
<%if is_employee? %>
<%if @current_user.id == @notification.employee_id %>
<%= link_to '<span class="fa fa-edit"></span>Editar'.html_safe, edit_notification_path(@notification), class:"btn btn-sm btn-default" %>
<%end%>
<%if is_principal? %>
<%= link_to '<span class="fa fa-times"></span>Excluir'.html_safe, "", method: :delete, class:'btn btn-sm btn-danger', data: { confirm: 'Tem certeza? Essa alteração não pode ser desfeita.' }, name:"delete" %>
<% end %>
<% end %>
</div>
<div class="row">
<div class="col-sm-12 col-md-8 text-justify">
<%= simple_format(@notification.notification_text) %>
</div>
<div class="col-sm-12 col-md-4 text-capitalize">
<h3><%= @notification.title %></h3>
<h4>Motivo: <%= @notification.motive %></h4>
<h5>De: <%= @assignee %></h5>
<h5>Criado em: <%= @notification.notification_date.strftime('%d/%m/%Y') %></h5>
</div>
</div>
</div>
</section>