refactor and styling change, add button logick, add i18n logic
This commit is contained in:
@@ -58,3 +58,7 @@ html lang="en"
|
||||
/! Placed at the end of the document so the pages load faster
|
||||
= javascript_include_tag "user/application"
|
||||
= yield :footer
|
||||
javascript:
|
||||
$(function(){
|
||||
$('[data-t]').each(function(){$(this).text(t($(this).attr('data-t')))})
|
||||
});
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
thead
|
||||
tr
|
||||
th.link= model_class.human_attribute_name(:title)
|
||||
th.table-info= Table.model_name.human_plural
|
||||
th.numeric= model_class.human_attribute_name(:width)
|
||||
th.numeric= model_class.human_attribute_name(:height)
|
||||
th.timestamp= model_class.human_attribute_name(:created_at)
|
||||
@@ -14,10 +15,15 @@
|
||||
- @sections.each do |section|
|
||||
tr
|
||||
td.link= link_to section.title, [:suppliers, section]
|
||||
td.table-info
|
||||
span.table-count= section.tables.size
|
||||
span.active-table-count= (@active_table_ids & section.tables.map(&:id)).size
|
||||
td.numeric= section.width
|
||||
td.numeric= section.height
|
||||
td.timestamp=l section.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('supplier.section.tables_view'), [:tables_view, :suppliers, section], class: [:btn, 'btn-mini btn-info']
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, section], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
.supplier-name
|
||||
h4= t('user.active_list.title', list: List.model_name.human)
|
||||
.form-actions
|
||||
= link_to t('helpers.links.place_order'), user_list_products_path, class: ['btn btn-primary']
|
||||
span#list-needs-payment-button
|
||||
span#list-needs-help-button
|
||||
= link_to t('helpers.links.place_order'), user_list_products_path, class: ['user-top-button'], id: 'place-order-on-list'
|
||||
span#list-needs-payment-button.user-top-button
|
||||
span#list-needs-help-button.user-top-button
|
||||
.well
|
||||
table#active-list-table.table
|
||||
thead
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
.supplier-name
|
||||
h4= t('user.show_products.title', products: Product.model_name.human_plural)
|
||||
.form-actions
|
||||
= link_to t('helpers.links.show_active_list', list: List.model_name.human), user_active_list_path, class: ['btn btn']
|
||||
span#list-needs-help-button
|
||||
= link_to t('helpers.links.show_active_list', list: List.model_name.human), user_active_list_path, class: ['user-top-button'], id: 'show-active-list'
|
||||
span#list-needs-payment-button.user-top-button
|
||||
span#list-needs-help-button.user-top-button
|
||||
.well
|
||||
table#products-table.table
|
||||
tbody
|
||||
@@ -21,9 +22,9 @@
|
||||
tfoot
|
||||
tr
|
||||
td colspan=2
|
||||
button class="btn btn-primary" onClick="Quser.handle_active_list(function(){Quser.order_selected_products()})" Bestellen
|
||||
button class="btn btn-primary" onClick="Quser.handle_active_list(function(){Quser.order_selected_products()})" data-t="selected_products.order"= t('selected_products.order')
|
||||
|
|
||||
button class="btn btn btn-warning" onClick="Quser.clear_selected_products()" Clear
|
||||
button class="btn btn btn-warning" onClick="Quser.clear_selected_products()" data-t="selected_products.clear"= t('selected_products.clear')
|
||||
td.currency
|
||||
strong#active-order-total
|
||||
td
|
||||
|
||||
Reference in New Issue
Block a user