fga-gpp-mds/2017.1-Escola-X

View on GitHub
app/views/secretaries/show.html.erb

Summary

Maintainability
Test Coverage
<%= render "layouts/navbar" %>
<br>
<br>
 <% if flash[:notice]%>
  <div class="alert alert-warning" role = "alert"><%= flash[:notice]%></div>
 <% end %>
 <% if flash[:success]%>
  <div class="alert alert-success" role = "alert"><%= flash[:success]%></div>
 <% end %>
<section class="content-section" id="alumns-desc">
  <div class="container">
    <div class="pull-right">
      <%if is_principal? %>
        <%= link_to '<span class="fa fa-edit"></span> Editar'.html_safe, edit_secretary_path(@secretary), 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 que deseja excluir esse cadastro?' }, 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: <%= @secretary.name %></h3>
        <h4>Telefone: <%= @secretary.phone %></h4>
        <h4>Sexo: <%= @secretary.gender %></h4>
        <h4>Endereço: <%= @secretary.address %></h4>
        <h4>Data de Nascimento:  
          <% if(!@secretary.birth_date.nil?)%>
              <%= @secretary.birth_date.strftime("%d/%m/%Y") %>
          <%end%>
        </h4>      
      </div>
    </div>
  </div>
</section>