Edit UI design for shop images

This commit is contained in:
San Wai Lwin
2018-03-28 14:52:57 +06:30
parent c602988f42
commit ff19f20a18
3 changed files with 22 additions and 13 deletions

View File

@@ -99,3 +99,8 @@ i.logout_icon{
position: relative; position: relative;
top: 5px; top: 5px;
} }
/* Second display image */
.second-display{
margin : 12px;
}

View File

@@ -40,18 +40,22 @@
</div> </div>
</div> </div>
<label>Shop Images</label> <div class="card">
<div class="card-block">
<label class="card-title">Shop Images</label>
<div class="panel padding-10"> <div class="panel padding-10">
<div class="form-group"> <div class="form-group">
<div class="menu-item-img"> <div class="menu-item-img">
<%= f.fields_for :display_images do |p| %> <%= f.fields_for :display_images do |p| %>
<%= image_tag "#{p.object.image}", :class => "img-thumbnail" %> <%= image_tag "#{p.object.image}", :class => "img-thumbnail second-display", :size => "150x185"%>
<%= link_to "Destroy", settings_shop_display_image_path(p.object), method: :delete %> <%= link_to '<i class="material-icons">delete</i>'.html_safe, settings_shop_display_image_path(p.object), method: :delete %>
<% end %> <% end %>
</div> </div>
</div> </div>
</div> </div>
</div>
<%= f.file_field :image, :multiple => true, name: "display_images[image][]" %> <%= f.file_field :image, :multiple => true, name: "display_images[image][]" %>
</div>
<div class="form-actions p-l-15"> <div class="form-actions p-l-15">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>

View File

@@ -97,13 +97,13 @@
</tr> </tr>
<tr> <tr>
<td style="width:20%">Shop Image</td> <td style="width:20%">Shop Image</td>
<td><%= image_tag @settings_shop.logo, :size => '200x200'%></td> <td><%= image_tag @settings_shop.logo, :class => "img-thumbnail second-display", :size => "155x185"%></td>
</tr> </tr>
<tr> <tr>
<td style="width:20%">Shop Images</td> <td style="width:20%">Shop Images</td>
<td> <td>
<% @display_images.each do |p| %> <% @display_images.each do |p| %>
<%= image_tag "#{p.image}" %> <%= image_tag "#{p.image}", :class => "img-thumbnail second-display", :size => "155x185"%>
<% end %> <% end %>
</td> </td>
</tr> </tr>