End of week commit

This commit is contained in:
2014-04-18 20:38:13 +02:00
parent 2a5331471c
commit 821f59b761
42 changed files with 304 additions and 91 deletions
+15 -12
View File
@@ -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
+11 -8
View File
@@ -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