app/views/teachers/show.html.erb
<%= render "layouts/navbar" %>
<br>
<br>
<% if flash[:notice]%>
<div class="alert alert-warning" role = "alert"><%= flash[:notice]%></div>
<% end %>
<section class="content-section" id="alumns-desc">
<div class="container">
<div class="pull-right">
<%= link_to '<span class="fa fa-user-plus"></span> Visualizar Minhas Turmas'.html_safe, teacher_classrooms_path(@teacher), class:'btn btn-sm btn-success'%>
<%if @current_user.is_a? (Principal) %>
<%= link_to '<span class="fa fa-edit"></span> Editar'.html_safe, edit_teacher_path(@teacher), class:"btn btn-sm btn-default" %>
<%= 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%>
</div>
<div class="row item">
<div class="col-sm-12 col-md-4">
<%= image_tag("avatar_250x300.png", alt: "", class: "img-responsive") %>
</div>
<div class="col-sm-12 col-md-8 text-capitalize descript">
<h3>Nome: <%= @teacher.name %></h3>
<h4>Telefone: <%= @teacher.phone %></h4>
<h4>Sexo: <%= @teacher.gender %></h4>
<h4>Endereço: <%= @teacher.address %></h4>
<h4>Data de Nascimento:
<% if(!@teacher.birth_date.nil?)%>
<%= @teacher.birth_date.strftime("%d/%m/%Y") %>
<%end%>
</h4>
<h4>Data de Admissão: <%= @teacher.admission_date %></h4>
</div>
</div>
</div>
</section>