Files
sx-fc/app/views/settings/rooms/index.html.erb
2017-06-17 18:00:59 +06:30

52 lines
1.5 KiB
Plaintext

<div class="page-header">
<ul class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li>
<li>Rooms</li>
<span style="float: right">
<%= link_to t('.new', :default => t("helpers.links.new")),new_settings_zone_room_path,:class => 'btn btn-primary btn-sm' %>
</span>
</ul>
</div>
<br>
<div class="card">
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>Type</th>
<th>Seater</th>
<th>Order by</th>
<th>is Active</th>
<th>Created By</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
<% @settings_rooms.each do |room| %>
<tr>
<td><%= link_to room.name, settings_menu_path(room) %></td>
<td><%= room.status %></td>
<td>Room</td>
<td><%= room.seater rescue "-" %></td>
<td><%= room.order_by rescue "-" %></td>
<td><%= room.is_active %></td>
<% if Employee.exists?(room.created_by) %>
<td><%= Employee.find(room.created_by).name %></td>
<% else %>
<td><%= room.created_by %></td>
<% end %>
<td><%= room.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td><%= link_to 'Edit', edit_settings_zone_room_path(@zone,room) %></td>
<td><%= link_to 'Destroy', settings_zone_room_path(@zone,room), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
</div>