app/views/parents/index.html.erb
<%= render "layouts/navbar" %>
<div class="container text-center">
<h1 class="text-uppercase text-center" id="title-list"><span class="glyphicon glyphicon-list text-left"></span> Lista de Responsáveis</h1>
<hr>
<%= form_tag(parents_path, :method => "get", id: "search-form") do %>
<div class="form-inline">
<div class="input-group">
<%= text_field_tag :search, params[:search], placeholder: "Digite o nome do responsável", class: "form-control", :size=>"50"%>
<span class="input-group-btn">
<%= button_to 'Buscar'.html_safe, nil, class: "btn btn-default" %>
</span>
</div>
</div>
<% end %>
<br>
</div>
<%= render "layouts/feedback_messages" %>
<section class="content-section" id="parents-list">
<div class="container">
<% @parents.each do |parent| %>
<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">
<h2> <%= parent.name %></h2>
<h4> <%= parent.address %> </h4>
<% if(!parent.birth_date.nil?)%>
<%= parent.birth_date.strftime("%d/%m/%Y") %>
<%end%>
</h4>
<h4> <%= parent.gender %> </h4>
<h4> <%= parent.phone %> </h4>
<h4> <%= parent.parent_cpf %></h4>
<%= link_to '<span class="fa fa-search-plus"></span> Visualizar'.html_safe, parent_path(parent), class:'btn btn-info' %>
<%if is_principal? %>
<%= link_to '<span class="fa fa-unlock"></span> Resetar senha'.html_safe, edit_password_parent_path(parent), class:'btn btn-default' %>
<% end %>
</div>
</div>
<hr>
<% end %>
</div>
</section>