Photo Field in Customer,Employee and Commissionor
This commit is contained in:
@@ -1,11 +1,27 @@
|
||||
<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">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<%= simple_form_for([:settings, @commissioner]) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<div class="form-inputs">
|
||||
<div class="form-group p-l-15">
|
||||
<%= f.input :name %>
|
||||
|
||||
<label>Commissioner Image</label>
|
||||
<div class="panel padding-10">
|
||||
<div class="form-group">
|
||||
<div class="menu-item-img">
|
||||
<% if f.object.image_path? %>
|
||||
<p><%= f.object.name %></p>
|
||||
<%= image_tag f.object.image_path.url, :class => "img-thumbnail" %>
|
||||
<% else %>
|
||||
<%= image_tag "/image/menu_images/default.png", :class => "img-thumbnail" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.file_field :image_path, :class => "img-thumbnail" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.label :emp_id, 'Employee' %>
|
||||
|
||||
<%= f.collection_select :emp_id, Employee.all.order('name asc'), :id, :name, {prompt: 'Select an Employee'}, {class: "form-control"} %>
|
||||
@@ -29,7 +45,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</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">
|
||||
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
<td style="width:20%"><%= t("views.right_panel.detail.name") %></td>
|
||||
<td><%= @commissioner.name %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:20%"><%= t("views.right_panel.detail.commissioner_photo") %></td>
|
||||
<td><%= image_tag @commissioner.image_path, :size => '200x200'%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:20%"><%= t("views.right_panel.detail.employee") %> <%= t("views.right_panel.detail.name") %></td>
|
||||
<td><%= @commissioner.employee.name rescue '-' %></td>
|
||||
|
||||
Reference in New Issue
Block a user