fga-gpp-mds/2017.1-Escola-X

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

Summary

Maintainability
Test Coverage
<%= 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="alumns-desc">
  <div class="container">
    <div class="pull-right">
      <%if @current_user.is_a?(Employee) %>
        <%if @current_user.permission=="Principal" %>
          <%= link_to '<span class="fa fa-edit"></span> Editar'.html_safe, edit_classroom_path(@classroom), 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.' } %>
          <%= link_to '<span class="fa fa-user-plus"></span> Adicionar alunos'.html_safe, add_alumns_path(@classroom), class:"btn btn-sm btn-info" %>
        <% end %>
      <% end %>
    </div>
    <div class="row item">
      <div class="col-sm-12 col-md-8 descript">
        <h3 class="">Nome da Turma: <%= @classroom.name_classroom %></h3>
        <h3 class="">Série: <%= @classroom_grade.name_classroom_grade %></h3>
        <h3 class="">Turno: <%= @shift.name_shift %></h3>
      </div>
    </div>
  </div>
</section>