Files
sx-fc/app/views/settings/zones/index.html.erb
2017-10-03 18:44:27 +06:30

46 lines
1.4 KiB
Plaintext

<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item active">Zones</li>
<span class="float-right">
<%= link_to 'Back', dashboard_path %>
</span>
</ul>
</div>
<br />
<div class="m-b-10 clearfix">
<%= link_to t('.new', :default => t("helpers.links.new")),new_settings_zone_path,:class => 'btn btn-outline-primary float-right' %>
</div>
<div class="card">
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Is active</th>
<th>Created by</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @settings_zones.each do |settings_zone| %>
<tr>
<td><%= settings_zone.name %></td>
<td><%= settings_zone.is_active %></td>
<% if Employee.exists?(settings_zone.created_by) %>
<td><%= Employee.find(settings_zone.created_by).name %></td>
<% else %>
<td><%= settings_zone.created_by %></td>
<% end %>
<td><%= link_to 'Show', settings_zone_path(settings_zone) %></td>
<td><%= link_to 'Edit', edit_settings_zone_path(settings_zone) %></td>
<td><%= link_to 'Destroy', settings_zone_path(settings_zone), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
</div>