Merge branch 'adminbsb_material_ui' of bitbucket.org:code2lab/sxrestaurant into adminbsb_material_ui

This commit is contained in:
Yan
2017-10-20 17:06:50 +06:30
21 changed files with 232 additions and 98 deletions

View File

@@ -180,6 +180,11 @@ section.content {
.nav-tabs .nav-link { .nav-tabs .nav-link {
padding: 0.7286em .8575em; padding: 0.7286em .8575em;
} }
.checkbox label input[type=checkbox], label.checkbox-inline input[type=checkbox] {
opacity:0 !important;
margin-right:15px;
}
/* End Reset Theme */ /* End Reset Theme */
/* *************************************************** */ /* *************************************************** */

View File

@@ -15,10 +15,8 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'jquery-confirm', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'jquery-confirm', 'data-turbolinks-track': 'reload' %>
</head> </head>
<body class="theme-red"> <body class="theme-red">

View File

@@ -39,9 +39,17 @@
<td><%= account.bonus %></td> <td><%= account.bonus %></td>
<td><%= account.rebate %></td> <td><%= account.rebate %></td>
<td> <td>
<%= link_to t("views.btn.edit"), edit_settings_account_path(account),:class => 'btn btn-primary btn-lg waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_account_path(account),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.delete"), settings_account_path(account),:class => 'btn btn-danger btn-lg waves-effect', method: :delete, data: { confirm: 'Are you sure?' } %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_account_path(account)%>" 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>
</td> </td>
</tr> </tr>
<% end %> <% end %>

View File

@@ -40,7 +40,17 @@
<td><%= settings_cashier_terminal.show_cashier %></td> <td><%= settings_cashier_terminal.show_cashier %></td>
<!-- <td><%= settings_cashier_terminal.show_guest_info %></td> --> <!-- <td><%= settings_cashier_terminal.show_guest_info %></td> -->
<td><%= link_to t("views.btn.edit"), edit_settings_cashier_terminal_path(settings_cashier_terminal),:class => 'btn btn-info btn-sm waves-effect' %> <td><%= link_to t("views.btn.edit"), edit_settings_cashier_terminal_path(settings_cashier_terminal),:class => 'btn btn-info btn-sm waves-effect' %>
<%= link_to t("views.btn.delete"), settings_cashier_terminal_path(settings_cashier_terminal), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %></td>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_cashier_terminal_path(settings_cashier_terminal) %>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -17,9 +17,8 @@
<%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/> <%= f.text_field :joined_date, {class: 'form-control datepicker', id: 'joined_date', readonly: true} %><br/>
<%= f.label :resigned_date %><br/> <%= f.label :resigned_date %><br/>
<%= f.text_field :resigned_date, {class: 'form-control datepicker', id: 'resigned_date', readonly: true} %><br/> <%= f.text_field :resigned_date, {class: 'form-control datepicker', id: 'resigned_date', readonly: true} %><br/>
<label><%= f.check_box :is_active %> Active </label> <%= f.input :is_active %>
</div> </div>
<br/>
<div class="form-actions"> <div class="form-actions">
<%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>

View File

@@ -39,7 +39,16 @@
<td><%= commissioner.is_active %></td> <td><%= commissioner.is_active %></td>
<td><%= link_to t("views.btn.show"), settings_commissioner_path(commissioner),:class => 'btn btn-info btn-sm waves-effect' %> <td><%= link_to t("views.btn.show"), settings_commissioner_path(commissioner),:class => 'btn btn-info btn-sm waves-effect' %>
<%= link_to t("views.btn.edit"), edit_settings_commissioner_path(commissioner),:class => 'btn btn-primary btn-sm waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_commissioner_path(commissioner),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.delete"), settings_commissioner_path(commissioner), method: :delete, data: {confirm: 'Are you sure?'},:class => 'btn btn-danger btn-sm waves-effect' %></td>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= settings_commissioner_path(commissioner)%>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -14,7 +14,16 @@
<tr> <tr>
<td><%= link_to t("views.btn.show"), dining_charge %></td> <td><%= link_to t("views.btn.show"), dining_charge %></td>
<td><%= link_to t("views.btn.edit"), edit_dining_charge_path(dining_charge) %></td> <td><%= link_to t("views.btn.edit"), edit_dining_charge_path(dining_charge) %></td>
<td><%= link_to t("views.btn.delete"), dining_charge, method: :delete, data: { confirm: 'Are you sure?' } %></td> <td>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%= dining_charge%>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -36,9 +36,15 @@
<%= link_to t("views.btn.edit"), edit_settings_employee_path(employee),:class => 'btn btn-info btn-sm waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_employee_path(employee),:class => 'btn btn-info btn-sm waves-effect' %>
<%if employee.role != "administrator"%> <%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>
<%= link_to t("views.btn.delete"), settings_employee_path(employee) , method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %> <span class="hidden" id="delete_text">
<%end%> <h6>Are you sure you want to delete this row ?</h6>
<h6>This action can't be undo. </h6>
</span>
<%end%>
</td> </td>
</tr> </tr>
<% end %> <% end %>

View File

@@ -34,9 +34,19 @@
<td><%= item.alt_name %></td> <td><%= item.alt_name %></td>
<td><%= item.min_selectable_qty %></td> <td><%= item.min_selectable_qty %></td>
<td><%= item.max_selectable_qty %></td> <td><%= item.max_selectable_qty %></td>
<td><%= link_to t("views.btn.show"), settings_item_set_path(item),:class=>'btn btn-sm btn-success' %> <td><%= link_to t("views.btn.show"), settings_item_set_path(item),:class=>'btn btn-sm btn-success waves-effect' %>
<%= link_to t("views.btn.edit"), edit_settings_item_set_path(item),:class=>'btn btn-sm btn-primary' %> <%= link_to t("views.btn.edit"), edit_settings_item_set_path(item),:class=>'btn btn-sm btn-primary waves-effect' %>
<%= link_to t("views.btn.delete"), settings_item_set_path(item), method: :delete, data: { confirm: 'Are you sure?' } ,:class=>'btn btn-danger btn-sm'%></td>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_item_set_path(item)%>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -32,7 +32,18 @@
<td><%= settings_lookup.name %></td> <td><%= settings_lookup.name %></td>
<td><%= settings_lookup.value %></td> <td><%= settings_lookup.value %></td>
<!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> --> <!-- <td><%= link_to t("views.btn.show"), settings_lookup_path(settings_lookup),:class => 'btn btn-info btn-sm waves-effect' %></td> -->
<td><%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %> <%= link_to t("views.btn.delete"), settings_lookup_path(settings_lookup), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %></td> <td>
<%= link_to t("views.btn.edit"), edit_settings_lookup_path(settings_lookup),:class => 'btn btn-primary btn-sm waves-effect' %>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_lookup_path(settings_lookup)%>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -19,7 +19,7 @@ div.form-inputs span{
<%= f.input :print_copy %> <%= f.input :print_copy %>
<%= f.hidden_field :processing_items %> <%= f.hidden_field :processing_items %>
<%= f.label "Select Zones", :class => 'control-label' %> <%= f.label "Select Zones", :class => 'control-label' %>
<%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'ta'%> <%= f.collection_check_boxes :zone_ids , Zone.all, :id, :name , :class => 'checkbox'%>
<%= f.input :cut_per_item %> <%= f.input :cut_per_item %>
<%= f.input :use_alternate_name %> <%= f.input :use_alternate_name %>
<%= f.input :processing_items, as: :hidden %> <%= f.input :processing_items, as: :hidden %>

View File

@@ -29,7 +29,7 @@
<th>Alternate name</th> <th>Alternate name</th>
<!-- <th>Created by</th> --> <!-- <th>Created by</th> -->
<th> Created At</th> <th> Created At</th>
<th>Updated At</th> <!-- <th>Updated At</th> -->
<th>Action</th> <th>Action</th>
</tr> </tr>
</thead> </thead>
@@ -47,7 +47,7 @@
<td><%= settings_order_queue_station.use_alternate_name %></td> <td><%= settings_order_queue_station.use_alternate_name %></td>
<!-- <td><%= settings_order_queue_station.created_by %></td> --> <!-- <td><%= settings_order_queue_station.created_by %></td> -->
<td><%= settings_order_queue_station.created_at.strftime("%m-%d-%Y") %></td> <td><%= settings_order_queue_station.created_at.strftime("%m-%d-%Y") %></td>
<td><%= settings_order_queue_station.updated_at.strftime("%m-%d-%Y") %></td> <!-- <td><%= settings_order_queue_station.updated_at.strftime("%m-%d-%Y") %></td> -->
<td><%= link_to 'Assign Processing Items', new_settings_order_queue_station_processing_item_path(settings_order_queue_station),:class => ' btn-success btn-sm waves-effect' %><%= link_to t("views.btn.edit"), edit_settings_order_queue_station_path(settings_order_queue_station),:class => 'btn btn-info btn-sm waves-effect' %></td> <td><%= link_to 'Assign Processing Items', new_settings_order_queue_station_processing_item_path(settings_order_queue_station),:class => ' btn-success btn-sm waves-effect' %><%= link_to t("views.btn.edit"), edit_settings_order_queue_station_path(settings_order_queue_station),:class => 'btn btn-info btn-sm waves-effect' %></td>
</tr> </tr>
<% end %> <% end %>

View File

@@ -15,7 +15,7 @@
</div> </div>
<div class="form-actions"> <div class="form-actions">
<%= f.button :submit %> <%= f.submit "Submit",:class => 'btn btn-primary btn-lg waves-effect' %>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@@ -21,7 +21,7 @@
<tr> <tr>
<th>Payment method</th> <th>Payment method</th>
<th>Is active</th> <th>Is active</th>
<th>Gateway communication type</th> <th>Gateway Comm type</th>
<th>Gateway url</th> <th>Gateway url</th>
<th>Auth token</th> <th>Auth token</th>
<th>Merchant account</th> <th>Merchant account</th>
@@ -39,7 +39,16 @@
<td><%= settings_payment_method_setting.auth_token %></td> <td><%= settings_payment_method_setting.auth_token %></td>
<td><%= settings_payment_method_setting.merchant_account_id %></td> <td><%= settings_payment_method_setting.merchant_account_id %></td>
<td><%= link_to t("views.btn.edit"), edit_settings_payment_method_setting_path(settings_payment_method_setting),:class => 'btn btn-primary btn-sm waves-effect' %> <td><%= link_to t("views.btn.edit"), edit_settings_payment_method_setting_path(settings_payment_method_setting),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.delete"), settings_payment_method_setting_path(settings_payment_method_setting), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %></td>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_payment_method_setting_path(settings_payment_method_setting)%>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -10,7 +10,7 @@
<%= f.input :unit_price %> <%= f.input :unit_price %>
<%= f.input :description %> <%= f.input :description %>
<%= f.input :information %> <%= f.input :information %>
<label><%= f.check_box :taxable %>Taxable</label> <%= f.input:taxable %>
</div> </div>
<label>Product Image</label> <label>Product Image</label>

View File

@@ -8,7 +8,7 @@
</span> </span>
</ol> </ol>
</div> </div>
<br>
<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-9 col-lg-9">
@@ -43,7 +43,16 @@
<td><%= settings_product.taxable %></td> <td><%= settings_product.taxable %></td>
<td><%= link_to t("views.btn.show"), settings_product_path(settings_product),:class => 'btn btn-info btn-sm waves-effect' %> <td><%= link_to t("views.btn.show"), settings_product_path(settings_product),:class => 'btn btn-info btn-sm waves-effect' %>
<%= link_to t("views.btn.edit"), edit_settings_product_path(settings_product),:class => 'btn btn-primary btn-sm waves-effect' %> <%= link_to t("views.btn.edit"), edit_settings_product_path(settings_product),:class => 'btn btn-primary btn-sm waves-effect' %>
<%= link_to t("views.btn.delete"), settings_product_path(settings_product), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-sm waves-effect' %></td>
<button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_product_path(settings_product)%>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -38,9 +38,17 @@
<td><%= pro.net_off rescue "-" %></td> <td><%= pro.net_off rescue "-" %></td>
<td><%= pro.net_price rescue "-" %></td> <td><%= pro.net_price rescue "-" %></td>
<td><%= pro.percentage %></td> <td><%= pro.percentage %></td>
<td><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p"),:class => 'btn btn-primary btn-lg waves-effect' %></td> <td><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p"),:class => 'btn btn-primary btn-lg waves-effect' %>
<td><%= link_to t("views.btn.edit"), edit_settings_promotion_promotion_product_path(pro),:class => 'btn btn-info btn-lg waves-effect' %></td> <%= link_to t("views.btn.edit"), edit_settings_promotion_promotion_product_path(pro),:class => 'btn btn-info btn-lg waves-effect' %>
<td><%= link_to t("views.btn.delete"), settings_promotion_promotion_product_path(pro), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-danger btn-lg waves-effect' %></td> <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_promotion_promotion_product_path(pro)%>" 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>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>

View File

@@ -1,5 +1,10 @@
<%= simple_nested_form_for([:settings,@promotion]) do |f| %>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<%= simple_nested_form_for([:settings,@promotion]) do |f| %>
<%= f.error_notification %> <%= f.error_notification %>
<div class="form-inputs"> <div class="form-inputs">
@@ -147,6 +152,19 @@
<%= f.button :submit %> <%= f.button :submit %>
</div> </div>
<% end %> <% end %>
</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>
<script> <script>

View File

@@ -1,10 +1,11 @@
<div class="span12"> <div class="page-header">
<div class="page-header"> <ol class="breadcrumb">
<ul class="breadcrumb"> <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li><a href="<%= root_path %>">Home</a></li> <li class="breadcrumb-item"><a href="<%= settings_products_path %>">Products</a></li>
<li><a href="<%= settings_promotions_path %>">Promotions</a></li> <li class="breadcrumb-item active">New</li>
<li>Edit</li> <span class="float-right">
</ul> <%= link_to t('.back', :default => t("views.btn.back")), settings_products_path %>
</div> </span>
<%= render 'form', promotion: @promotion %> </ol>
</div> </div>
<%= render 'form', promotion: @promotion %>

View File

@@ -1,62 +1,85 @@
<p id="notice"><%= notice %></p>
<div class="page-header"> <div class="page-header">
<ul class="breadcrumb"> <ol class="breadcrumb">
<li><a href="<%= root_path %>">Home</a></li> <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li>Promotions</li> <li class="breadcrumb-item active">Promotion</li>
<span style="float: right"> <span class="float-right">
<%= link_to t("views.btn.new"),new_settings_promotion_path,:class => 'btn btn-primary btn-sm' %> <%= link_to t('.back', :default => t("views.btn.back")), dashboard_path %>
</span> </span>
</ul> </ol>
</div> </div>
<br> <div class="row">
<div class="card"> <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9">
<table class="table table-striped"> <div class="m-b-10 clearfix">
<thead> <%= link_to t("views.btn.new"),new_settings_promotion_path,:class => 'btn btn-primary btn-lg float-right waves-effect"' %>
<tr> </div>
<th>Promotion Code</th> <div class="card">
<th>Start Date</th> <table class="table table-striped">
<th>End Date</th> <thead>
<th>Start Time</th> <tr>
<th>End Time</th> <th>Promotion Code</th>
<th>Promotion Day</th> <th>Start Date</th>
<th>Original Product</th> <th>End Date</th>
<th>Created By</th> <th>Start Time</th>
<th>Created At</th> <th>End Time</th>
<th colspan="2"></th> <th>Promotion Day</th>
</tr> <th>Original Product</th>
</thead> <th>Created By</th>
<th>Created At</th>
<th colspan=""></th>
</tr>
</thead>
<tbody> <tbody>
<% @promotions.each do |pro| %> <% @promotions.each do |pro| %>
<tr> <tr>
<td><%= link_to pro.promo_code, settings_promotion_path(pro) %></td> <td><%= link_to pro.promo_code, settings_promotion_path(pro) %></td>
<td><%= pro.promo_start_date %></td> <td><%= pro.promo_start_date %></td>
<td><%= pro.promo_end_date %></td> <td><%= pro.promo_end_date %></td>
<td><%= pro.promo_start_hour.utc.strftime("%I:%M %P") rescue "-" %></td> <td><%= pro.promo_start_hour.utc.strftime("%I:%M %P") rescue "-" %></td>
<td><%= pro.promo_end_hour.utc.strftime("%I:%M %P") rescue "-" %></td> <td><%= pro.promo_end_hour.utc.strftime("%I:%M %P") rescue "-" %></td>
<td><%= pro.promo_day %></td> <td><%= pro.promo_day %></td>
<td> <td>
<% item = MenuItemInstance.find_by_item_instance_code(pro.original_product)%> <% item = MenuItemInstance.find_by_item_instance_code(pro.original_product)%>
<% if item.nil? %> <% if item.nil? %>
<%= Product.find_by_item_code(pro.original_product).name rescue "-" %> <%= Product.find_by_item_code(pro.original_product).name rescue "-" %>
<% else %> <% else %>
<%= item.menu_item.name rescue "-" %> <%= item.menu_item.name rescue "-" %>
- <%= item.item_instance_name rescue "-" %> - <%= item.item_instance_name rescue "-" %>
<% end %>
</td>
<% if Employee.exists?(pro.created_by) %>
<td><%= Employee.find(pro.created_by).name %></td>
<% else %>
<td><%= pro.created_by %></td>
<% end %> <% end %>
</td> <td><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td>
<% if Employee.exists?(pro.created_by) %> <td><%= link_to t("views.btn.edit"), edit_settings_promotion_path(pro) %>
<td><%= Employee.find(pro.created_by).name %></td> <button class="delete btn btn-danger btn-sm waves-effect" data-ref="<%=settings_promotion_path(pro)%>" data-method="delete">
<% else %> <%= t("views.btn.delete") %>
<td><%= pro.created_by %></td> </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>
</td>
</tr>
<% end %> <% end %>
<td><%= pro.created_at.utc.getlocal.strftime("%Y-%m-%d/%I:%M %p") %></td> </tbody>
<td><%= link_to t("views.btn.edit"), edit_settings_promotion_path(pro) %></td> </table>
<td><%= link_to t("views.btn.delete"), settings_promotion_path(pro), method: :delete, data: { confirm: 'Are you sure?' } %></td> </div>
</tr> </div>
<% end %> <div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
</tbody> <div class="card">
</table> <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>

View File

@@ -1,14 +1,15 @@
<div class="span12"> <div class="page-header">
<div class="page-header"> <ol class="breadcrumb">
<ul class="breadcrumb"> <li class="breadcrumb-item"><a href="<%= dashboard_path %>">Home</a></li>
<li><a href="<%= root_path %>">Home</a></li> <li class="breadcrumb-item"><a href="<%= settings_products_path %>">Products</a></li>
<li><a href="<%= settings_promotions_path %>">Promotions</a></li> <li class="breadcrumb-item active">New</li>
<li>New</li> <span class="float-right">
</ul> <%= link_to t('.back', :default => t("views.btn.back")), settings_products_path %>
</div> </span>
<%= render 'form', promotion: @promotion %> </ol>
</div> </div>
<%= render 'form', promotion: @promotion %>
<script> <script>
var r_id = Math.random().toString(36).slice(5); var r_id = Math.random().toString(36).slice(5);
if(r_id.length > 16){ if(r_id.length > 16){