Photo Field in Customer,Employee and Commissionor
This commit is contained in:
@@ -12,6 +12,22 @@
|
||||
<%= f.input :password %>
|
||||
|
||||
</div>
|
||||
<div class="form-inputs p-l-15">
|
||||
<label>Employee 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>
|
||||
</div>
|
||||
|
||||
<div class="form-actions p-l-15">
|
||||
<%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
<th><%= t("views.right_panel.detail.updated_at") %></th>
|
||||
<td><%= @employee.updated_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><%= t("views.right_panel.detail.employee_photo") %></th>
|
||||
<td><%= image_tag @employee.image_path, :size => '200x200'%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user