fga-gpp-mds/2017.1-Escola-X

View on GitHub
app/views/subjects/index.html.erb

Summary

Maintainability
Test Coverage
<%= render "layouts/navbar" %>
<% if flash[:alert]%>
<br>
<br>
 <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> Matérias</h1>
<hr>
<section class="content-section" >
  <div class="container">
    <% if is_principal? %>
      <%= link_to '<span class="fa fa-plus-circle"></span> Nova Matéria'.html_safe, new_subject_path, class:"text-center btn btn-info" %>
    <% end %>
    <% @subjects.each do |subject| %>
      <div class="row item">
        <div class="col-sm-12 col-md-8 text-capitalize">
          <h3>Matéria: <%= subject.name_subject %></h3>
          <h4>Série: <%= subject.class_level %></h4>
          <h4>Professor Responsável: <%=subject.teacher.name %></h4>
          <%= link_to '<span class="fa fa-search-plus"></span> Mostrar'.html_safe, subject_path(subject), class:"btn btn-default" %>
        </div>
      </div>
    <%end%>
  </div>
</section>