Files
sx-fc/app/views/settings/zones/show.html.erb
2017-10-23 17:59:35 +06:30

154 lines
5.7 KiB
Plaintext
Executable File

<div class="page-header">
<ul class="breadcrumb">
<li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li class="breadcrumb-item"><a href="<%= settings_zones_path %>">Zones</a></li>
<li class="breadcrumb-item active">Details</li>
<span class="float-right">
<%= link_to t("views.btn.back"), settings_zones_path %>
</span>
</ul>
</div>
<br/>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="card">
<div class="card-block">
<h4 class="card-title">Zone</h4>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Is active</th>
<th>Created by</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<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 t("views.btn.edit"),edit_settings_zone_path(@settings_zone),:class => 'btn btn-primary btn-lg waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_zone_path(@settings_zone)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<span class="hidden" id="delete_text">
<h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div class="card">
<div class="card-block">
<h4 class="card-title">Dining Facilities
<span style="float: right">
<%= link_to "New Table",new_settings_zone_table_path(@settings_zone),:class => 'btn btn-success btn-sm waves-effect' %>
<%= link_to "New Room",new_settings_zone_room_path(@settings_zone),:class => 'btn btn-success btn-sm waves-effect' %>
</span>
</h4>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Seater</th>
<th>Is Active</th>
<th>Created By</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<% @settings_tables.each do |settings_table|%>
<tr>
<td><%= link_to settings_table.name, settings_zone_table_path(@settings_zone,settings_table) %></td>
<td>Table</td>
<td><%= settings_table.seater %></td>
<td><%= settings_table.is_active %></td>
<% if Employee.exists?(settings_table.created_by) %>
<td><%= Employee.find(settings_table.created_by).name %></td>
<% else %>
<td><%= settings_table.created_by %></td>
<% end %>
<td><%= settings_table.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_zone_table_path(@settings_zone, settings_table),:class => 'btn btn-info btn-lg waves-effect' %></td>
</tr>
<% end %>
<% @settings_rooms.each do |room|%>
<tr>
<td><%= link_to room.name, settings_zone_room_path(@settings_zone,room) %></td>
<td>Room</td>
<td><%= room.seater %></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 t("views.btn.edit") ,edit_settings_zone_room_path(@settings_zone, room),:class => 'btn btn-info btn-lg waves-effect' %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="card">
<div class="body">
<h5>Zone</h5>
<h5><i class="material-icons md-18">view_headline PAGE DETAIL</i></h5>
<p>
1) Name - zone name <br>
2) Is active - is active or not <br>
3) Created by - user who created zone <br>
4) Actions - user can change/delete zone data <br>
</p>
<h5><i class="material-icons md-18">list BUTTON LISTS</i> </h5>
<p>
1) NEW - to add new zone <br>
2) SHOW - to show zone detail <br>
3) EDIT - to edit zone <br>
</p>
<h5>Dining Facilities</h5>
<h5><i class="material-icons md-18">view_headline PAGE DETAIL</i></h5>
<p>
1) Name - table name / user can view table data<br>
2) Type - type for table <br>
3) Seater - seat for table <br>
4) Is active - is active or not <br>
5) Created by - user who created table <br>
6) Created At - datetime for created table <br>
7) Actions - user can change table data <br>
</p>
<h5><i class="material-icons md-18">list BUTTON LISTS</i> </h5>
<p>
1) NEW TABLE - to add new table <br>
2) NEW ROOM - to add new room <br>
3) EDIT - to edit table <br>
</p>
-----------------------------------------------------------------
<h5><i class="material-icons md-18">list LINK LISTS</i> </h5>
<p>1) Home / Back - go to dashboard</p>
</div>
</div>
</div>
</div>