update item attr and options pages

This commit is contained in:
Aung Myo
2017-10-26 10:21:46 +06:30
parent 40bb227975
commit fe6d8a4be0
6 changed files with 127 additions and 98 deletions

View File

@@ -3,8 +3,8 @@
<%= simple_form_for([:settings,@settings_account]) do |f| %> <%= simple_form_for([:settings,@settings_account]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs p-l-10"> <div class="form-inputs p-l-10">
<%= f.input :title %> <%= f.input :title ,:input_html=>{:class=>"col-md-10"}%>
<%= f.input :account_type, :collection => Lookup.collection_of("account_type") %> <%= f.input :account_type, :collection => Lookup.collection_of("account_type"),:input_html=>{:class=>"col-md-10"} %>
<%= f.input :discount %> <%= f.input :discount %>
<%= f.input :point %> <%= f.input :point %>
<%= f.input :bonus %> <%= f.input :bonus %>

View File

@@ -12,7 +12,7 @@
</div> </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 t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@@ -1,20 +1,20 @@
<div class="row"> <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, @settings_menu_item_attribute]) do |f| %> <%= simple_form_for([:settings, @settings_menu_item_attribute]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs p-l-15">
<%= f.input :attribute_type %> <%= f.input :attribute_type,:input_html => { :class => "col-md-9" } %>
<%= f.input :name %> <%= f.input :name,:input_html => { :class => "col-md-9" } %>
<%= f.input :value %> <%= f.input :value,:input_html => { :class => "col-md-9" } %>
</div> </div>
<div class="form-actions"> <div class="form-actions p-l-15">
<%= f.button :submit %> <%= f.submit t('views.btn.submit'),:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</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="card">
<div class="body"> <div class="body">
<h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5> <h5><i class="material-icons md-18">view_headline <%= t("views.right_panel.header.page_detail") %></i></h5>

View File

@@ -1,45 +1,57 @@
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ol class="breadcrumb">
<li><a href="<%= %>">Home</a></li> <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li><a href="<%= settings_menu_item_attributes_path %>">Menu Item Attributes</a></li> <li class="breadcrumb-item"><a href="<%= settings_menu_item_attributes_path %>">Menu Item Attributes</a></li>
<li>Menu Item Attribute</li> <li class="breadcrumb-item active">Details</li>
<span style="float: right"> <span class="float-right">
</span> <%= link_to 'Back', settings_menu_item_attributes_path %>
</ul> </span>
</ol>
</div> </div>
<div class="card">
<div class="card-block">
<h4 class="card-title">Menu Item Attribute</h4>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody> <div class="row">
<tr> <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<td><%= @settings_menu_item_attribute.name %></td> <div class="card">
<td><%= @settings_menu_item_attribute.value rescue "-" %></td> <div class="card-block">
<td><%=l @settings_menu_item_attribute.created_at, format: :short %></td> <table class="table">
<td><%= link_to t("views.btn.edit"), edit_settings_menu_item_attribute_path(@settings_menu_item_attribute, @settings_menu_item_attribute) %> <thead>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_menu_item_attribute_path(@settings_menu_item_attribute)%>" data-method="delete"> <tr>
<%= t("views.btn.delete") %> <th>Name</th>
</button> <th>Value</th>
<!-- Start Delete confirrm text !--> <th>Created At</th>
<span class="hidden" id="delete_text"> <th>Actions</th>
<h6>Are you sure you want to delete this row ?</h6> </tr>
<h6>This action can't be undo. </h6> </thead>
</span>
</td> <tbody>
</tr> <tr>
</tbody> <td><%= @settings_menu_item_attribute.name %></td>
</table> <td><%= @settings_menu_item_attribute.value rescue "-" %></td>
<td><%=l @settings_menu_item_attribute.created_at, format: :short %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_menu_item_attribute_path(@settings_menu_item_attribute, @settings_menu_item_attribute),:class=>"btn btn-info btn-sm waves-effect" %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_menu_item_attribute_path(@settings_menu_item_attribute)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<!-- Start Delete confirrm text !-->
<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>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
<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>
</div> </div>
</div>

View File

@@ -1,21 +1,21 @@
<div class="row"> <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, @settings_menu_item_option]) do |f| %> <%= simple_form_for([:settings, @settings_menu_item_option]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs p-l-15">
<%= f.input :option_type %> <%= f.input :option_type,:input_html=>{:class=>"col-md-10"} %>
<%= f.input :name,:required => true %> <%= f.input :name,:required => true,:input_html=>{:class=>"col-md-10"} %>
<%= f.input :value,:required => true %> <%= f.input :value,:required => true,:input_html=>{:class=>"col-md-10"} %>
</div> </div>
<div class="form-actions"> <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' %>
</div> </div>
<% end %> <% end %>
</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="card">
<div class="body"> <div class="body">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod

View File

@@ -1,47 +1,64 @@
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ol class="breadcrumb">
<li><a href="<%= %>">Home</a></li> <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li><a href="<%= settings_menu_item_options_path %>">Menu Item Options</a></li> <li class="breadcrumb-item"><a href="<%= settings_menu_item_options_path %>">Menu Item Options</a></li>
<span style="float: right"> <li class="breadcrumb-item active">Details</li>
</span> <span class="float-right">
</ul> <%= link_to 'Back', settings_menu_item_options_path %>
</span>
</ol>
</div> </div>
<div class="card">
<div class="card-block">
<h4 class="card-title">Menu Item Option</h4>
<table class="table">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Value</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody> <div class="row">
<tr> <div class="col-xs-12 col-sm-12 col-md-8 col-lg-8">
<td><%= @settings_menu_item_option.option_type %></td> <div class="card">
<td><%= @settings_menu_item_option.name %></td> <div class="card-block">
<td><%= @settings_menu_item_option.value rescue "-" %></td> <h4 class="card-title">Menu Item Option</h4>
<td><%=l @settings_menu_item_option.created_at, format: :short %></td> <table class="table">
<td> <thead>
<%= link_to t("views.btn.edit"), edit_settings_menu_item_option_path(@settings_menu_item_option, @settings_menu_item_option) %> <tr>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_menu_item_option_path(@settings_menu_item_option)%>" data-method="delete"> <th>Type</th>
<%= t("views.btn.delete") %> <th>Name</th>
</button> --> <th>Value</th>
<!-- Start Delete confirrm text !--> <th>Created At</th>
<span class="hidden" id="delete_text"> <th>Actions</th>
<h6>Are you sure you want to delete this row ?</h6> </tr>
<h6>This action can't be undo. </h6> </thead>
</span>
</td> <tbody>
</tr> <tr>
</tbody> <td><%= @settings_menu_item_option.option_type %></td>
</table> <td><%= @settings_menu_item_option.name %></td>
<td><%= @settings_menu_item_option.value rescue "-" %></td>
<td><%=l @settings_menu_item_option.created_at, format: :short %></td>
<td>
<%= link_to t("views.btn.edit"), edit_settings_menu_item_option_path(@settings_menu_item_option, @settings_menu_item_option),:class=>"btn btn-info btn-sm waves-effect"%>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_menu_item_option_path(@settings_menu_item_option)%>" data-method="delete">
<%= t("views.btn.delete") %>
</button>
<!-- Start Delete confirrm text !-->
<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>
</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>
</div> </div>
</div>