update setting admin pages

This commit is contained in:
Aung Myo
2017-10-24 15:22:34 +06:30
parent 06dd5df432
commit 0d6167eca9
40 changed files with 422 additions and 303 deletions

View File

@@ -1,9 +1,9 @@
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<%= simple_form_for([:settings,@employee]) do |f| %>
<%= f.error_notification %>
<div class="form-inputs">
<div class="form-inputs p-l-15">
<%= f.input :name %>
<%= f.input :role, :collection => Lookup.collection_of("employee_roles"),:class=>'form-group' %>
<%= f.input :emp_id, :as => :integer, :label => "Employee Numberic ID (*Unique)" %>
@@ -11,12 +11,12 @@
</div>
<div class="form-actions">
<div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div>
<% end %>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -19,43 +19,63 @@
</div>
<br>
<div class="card">
<div class="card-block">
<h4 class="card-title">Employee</h4>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Created At</th>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<div class="card">
<div class="card-block">
<h4 class="card-title">Employee</h4>
<table class="table">
<tbody>
<tr>
<th>Name</th>
<td><%= @employee.name %></td>
</tr>
<tr>
<th>Role</th>
<td><%= @employee.role %></td>
</tr>
<tr>
<th>Created At</th>
<td><%= @employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
</tr>
<tr>
<th>Updated At</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td><%= @employee.name %></td>
<td><%= @employee.role %></td>
<td><%= @employee.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<td><%= @employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
</tr>
<tr>
<th></th>
<td>
<%= link_to t("views.btn.edit"), edit_settings_employee_path(@employee),:class => 'btn btn-primary btn-lg waves-effect' %>
<%if @employee.role != "administrator"%>
<%= link_to t("views.btn.edit"), edit_settings_employee_path(@employee),:class => 'btn btn-primary btn-lg waves-effect' %>
<%if @employee.role != "administrator"%>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_employee_path(@employee)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_employee_path(@employee)%>" 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>
<%end%>
<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>
<%end%>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4">
<div class="card">
<div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
</div>
</div>
</div>
</div>