End of week commit
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
-if target.errors.any?
|
||||
.alert.alert-error
|
||||
button type="button" class="close" data-dismiss="alert" ×
|
||||
.alert.alert-error.alert-box.alert
|
||||
h4 data-t="helpers.forms.errors.title" data-t-attributes=%[{"count":#{target.errors.count}}] = t('helpers.forms.errors.title', :count => target.errors.count)
|
||||
ul
|
||||
- for message in target.errors.full_messages
|
||||
|
||||
@@ -13,13 +13,16 @@ table.table
|
||||
- lists.each do |list|
|
||||
tr
|
||||
td= link_to list.state, [:suppliers, list]
|
||||
td=show_boolean list.needs_help
|
||||
td=show_boolean list.needs_payment
|
||||
td.boolean.needs_help
|
||||
span data-boolean=list.needs_help.to_s
|
||||
td.boolean.needs_payment
|
||||
span data-boolean=list.needs_payment.to_s
|
||||
td.timestamp data-time=list.closed_at.try(:utc).try(:iso8601)
|
||||
td= link_to_if list.table.present?, list.table_number, [:suppliers, list.table]
|
||||
td.currency= list.price.present? ? currency(list.price) : '...'
|
||||
td.timestamp data-time=list.created_at.utc.iso8601
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, list], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, list], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger', data: {t: 'helpers.links.destroy'}
|
||||
= link_to [:edit, :suppliers, list], class: 'table-edit' do
|
||||
span data-title="helpers.links.edit"
|
||||
= link_to [:suppliers, list], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
||||
span data-title="helpers.links.destroy"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
div.page-header= title :index, List
|
||||
.well
|
||||
- content_for :head do
|
||||
= javascript_include_tag 'supplier/app/application'
|
||||
/div.page-header= title :index, List
|
||||
/.well
|
||||
- if @lists.any?
|
||||
= paginate @lists
|
||||
= render 'lists_table', lists: @lists
|
||||
|
||||
@@ -4,6 +4,11 @@ dl.dl-horizontal
|
||||
dd= l @list.created_at, format: :short
|
||||
dt= t('supplier.lists.show.users')
|
||||
dd= @list.users.map(&:supplier_name).join(', ')
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='attributes.list.created_at'
|
||||
.display-field
|
||||
span data-time=@list.created_at.iso8601
|
||||
.well
|
||||
table#list-table.table.list-table
|
||||
thead
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
- model_class = Product
|
||||
.page-header= title :show, @product
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:name)
|
||||
dd= @product.name
|
||||
dt= model_class.human_attribute_name(:code)
|
||||
dd= @product.code
|
||||
dt= model_class.human_attribute_name(:price)
|
||||
dd=currency @product.price
|
||||
dt= ProductCategory.model_name.human_plural
|
||||
dd= @product.category_links(namespace: :suppliers)
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='attributes.product.name'
|
||||
.display-field
|
||||
span= @product.name
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='attributes.product.code'
|
||||
.display-field
|
||||
span= @product.code
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='attributes.product.price'
|
||||
.display-field
|
||||
span=currency @product.price
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='models.plural.product_category'
|
||||
.display-field
|
||||
span= @product.category_links(namespace: :suppliers)
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), suppliers_products_path, class: 'btn'
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, @product], class: 'btn'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @product], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
= supplier_form_actions :index, :edit, :destroy, object: @product, for: :products
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
-# DEPRICATED
|
||||
= form_for [:suppliers, @section], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @section
|
||||
.control-group class=(@section.errors[:title].any? ? 'error' : nil)
|
||||
= f.label :title, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :title, class: 'text_field'
|
||||
.control-group class=(@section.errors[:width].any? ? 'error' : nil)
|
||||
= f.label :width, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :width, class: ['text_field', :numeric]
|
||||
.control-group class=(@section.errors[:height].any? ? 'error' : nil)
|
||||
= f.label :height, class: 'control-label'
|
||||
.controls
|
||||
= f.text_field :height, class: ['text_field', :numeric]
|
||||
.form-row class=(@section.errors[:title].any? ? 'error' : nil)
|
||||
.form-label
|
||||
= f.label :title
|
||||
.form-field
|
||||
= f.text_field :title
|
||||
.form-row class=(@section.errors[:width].any? ? 'error' : nil)
|
||||
.form-label
|
||||
= f.label :width
|
||||
.form-field
|
||||
= f.number_field :width
|
||||
.form-row class=(@section.errors[:height].any? ? 'error' : nil)
|
||||
.form-label
|
||||
= f.label :height
|
||||
.form-field
|
||||
= f.number_field :height
|
||||
= f.supplier_form_actions
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
- model_class = Section
|
||||
.page-header= title :index, model_class
|
||||
- if @sections.any?
|
||||
/- model_class = Section
|
||||
/.page-header= title :index, model_class
|
||||
- content_for :head do
|
||||
= javascript_include_tag 'supplier/app/application'
|
||||
/- if @sections.any?
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
@@ -19,9 +21,10 @@
|
||||
td.numeric= section.width
|
||||
td.numeric= section.height
|
||||
td.actions
|
||||
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path(section_id: section.id), class: 'btn btn-mini btn-info', data: {t: 'tables.qr_codes.link'}
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, section], method: :delete, data: {confirm: are_you_sure?, t: 'helpers.links.destroy'}, class: 'btn btn-mini btn-danger'
|
||||
- else
|
||||
= link_to polymorphic_path([:qr_codes, :suppliers, :tables], section_id: section.id), class: 'table-qr-codes' do
|
||||
span data-title="helpers.links.qr_codes"
|
||||
= link_to [:suppliers, section], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
|
||||
span data-title="helpers.links.destroy"
|
||||
/- else
|
||||
= no_content_given model_class
|
||||
= supplier_form_actions :new, for: :sections
|
||||
/= supplier_form_actions :new, for: :sections
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
= form_for [:suppliers, @table], html: {class: 'form-horizontal' } do |f|
|
||||
= render 'error_messages', target: @table
|
||||
.control-group class=(@table.errors[:number].any? ? 'error' : nil)
|
||||
= f.label :number, class: 'control-label', data: {t: 'attributes.table.number'}
|
||||
.controls
|
||||
= f.text_field :number, class: 'text_field'
|
||||
.control-group class=(@table.errors[:section_id].any? ? 'error' : nil)
|
||||
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
|
||||
.controls
|
||||
.form-row class=(@table.errors[:number].any? ? 'error' : nil)
|
||||
.form-label
|
||||
= f.label :number
|
||||
.form-field
|
||||
= f.number_field :number
|
||||
.form-row class=(@table.errors[:section_id].any? ? 'error' : nil)
|
||||
.form-label
|
||||
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
|
||||
.form-field
|
||||
= f.collection_select :section_id, current_supplier.sections, :id, :title, include_blank: "[#{t('supplier.tables.has_no_section')}]"
|
||||
= f.supplier_form_actions
|
||||
|
||||
@@ -6,7 +6,7 @@ div.page-header= title :index, model_class
|
||||
label.number for="filter-to_number" data-t="attributes.table.to_number"
|
||||
input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
|
||||
'
|
||||
= submit_tag 'Filter'
|
||||
= submit_tag 'Filter', class: 'apply-filter'
|
||||
- if @tables.any?
|
||||
= paginate @tables
|
||||
table.table
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
- model_class = Table
|
||||
.page-header= title :show, @table
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
dt= model_class.human_attribute_name(:number)
|
||||
dd= @table.number
|
||||
- if @table.section.present?
|
||||
dt= Section.model_name.human
|
||||
dd= link_to @table.section.title, [:suppliers, @table.section]
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='attributes.table.number'
|
||||
.display-field
|
||||
span= @table.number
|
||||
- if @table.section.present?
|
||||
.display-row
|
||||
.display-label
|
||||
span data-t='models.section'
|
||||
.display-field
|
||||
span= link_to @table.section.title, [:suppliers, @table.section]
|
||||
= supplier_form_actions :index, :edit, :destroy, object: @table, for: :tables
|
||||
|
||||
Reference in New Issue
Block a user