initial commit

This commit is contained in:
2012-08-22 18:15:37 +02:00
commit 0856528f5e
120 changed files with 3048 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
= form_for @supplier, html: {class: 'form-horizontal' } do |f|
= render 'error_messages', target: @supplier
.control-group class=(@supplier.errors[:name].any? ? 'error' : nil)
= f.label :name, class: 'control-label'
.controls
= f.text_field :name, class: 'text_field'
.form-actions
= f.submit nil, class: 'btn btn-primary'
'
= link_to t("helpers.links.cancel"), suppliers_path, class: 'btn'
+4
View File
@@ -0,0 +1,4 @@
- model_class = Supplier
.page-header
= title :edit, model_class
= render 'form'
+22
View File
@@ -0,0 +1,22 @@
- model_class = Supplier
div.page-header= title :index, model_class
- if @suppliers.any?
table.table.table-striped
thead
tr
th= model_class.human_attribute_name(:name)
th= model_class.human_attribute_name(:created_at)
th=t 'helpers.actions'
tbody
- @suppliers.each do |supplier|
tr
td= link_to supplier.name, supplier
td=l supplier.created_at, format: :short
td
= link_to t('helpers.links.edit'), [:edit, supplier], class: 'btn btn-mini'
'
= link_to t("helpers.links.destroy"), supplier, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
- else
= no_content_given model_class
= link_to t("helpers.links.new"), new_supplier_path, class: 'btn btn-primary'
+4
View File
@@ -0,0 +1,4 @@
- model_class = Supplier
.page-header
= title :new, model_class
= render 'form'
+14
View File
@@ -0,0 +1,14 @@
- model_class = Supplier
.page-header
= title :show, @supplier
dl.dl-horizontal.show-list
dt= model_class.human_attribute_name(:name) + ':'
dd= @supplier.name
.form-actions
= link_to t("helpers.links.back"), suppliers_path, class: 'btn'
'
= link_to t('helpers.links.edit'), [:edit, @supplier], class: 'btn'
'
= link_to t("helpers.links.destroy"), @supplier, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'