styling progress

This commit is contained in:
2014-04-17 19:17:57 +02:00
parent 3ef888a30a
commit 45f8ea1308
9 changed files with 141 additions and 81 deletions
+25 -24
View File
@@ -7,30 +7,31 @@ div.page-header= title :index, model_class
input#filter-to_number.number type="number" size=4 value=params[:to_number] name="to_number"
'
= submit_tag 'Filter'
.well
- if @tables.any?
= paginate @tables
table.table
thead
- if @tables.any?
= paginate @tables
table.table
thead
tr
th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
th.link data-t="models.section"= Section.model_name.human
th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
tbody
- @tables.each do |table|
tr
th.link data-t="attributes.table.number"= model_class.human_attribute_name(:number)
th.link data-t="models.section"= Section.model_name.human
th.timestamp data-t="attributes.table.created_at"= model_class.human_attribute_name(:created_at)
th.actions data-t="helpers.actions.title"=t 'helpers.actions.title'
tbody
- @tables.each do |table|
tr
td.link= link_to table.number, [:suppliers, table]
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
td.actions
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
'
= link_to t("helpers.links.destroy"), [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger', data: {t: 'helpers.links.destroy'}
- else
= no_content_given model_class
td.link= link_to table.number, [:suppliers, table]
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
td.actions
= link_to [:edit, :suppliers, table], class: 'table-edit' do
span data-title="helpers.links.edit"
= link_to [:suppliers, table], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy' do
span data-title="helpers.links.destroy"
- else
= no_content_given model_class
.form-actions
= link_to t("helpers.links.new"), new_suppliers_table_path, class: 'btn btn-primary', data: {t: 'helpers.links.new'}
'
= link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path(params.slice(:from_number, :to_number)), class: 'btn btn-info', data: {t: 'tables.qr_codes.link'}, target: :_blank
= link_to new_suppliers_table_path, class: 'form-action-new'
span data-t="helpers.links.new"
= link_to qr_codes_suppliers_tables_path(params.slice(:from_number, :to_number)), class: 'form-action-qr-codes', target: :_blank
span data-t="tables.qr_codes.link"
+7 -6
View File
@@ -7,10 +7,11 @@ dl.dl-horizontal.show-list
- if @table.section.present?
dt= Section.model_name.human
dd= link_to @table.section.title, [:suppliers, @table.section]
//= supplier_form_actions :index, :edit, :destroy, object: @table, for: :tables
.form-actions
= link_to t("helpers.links.back"), suppliers_tables_path, class: 'btn'
'
= link_to t('helpers.links.edit'), [:edit, :suppliers, @table], class: 'btn'
'
= link_to t("helpers.links.destroy"), [:suppliers, @table], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
= link_to [:suppliers, :tables], class: 'form-action-index'
span data-t="helpers.links.index"
= link_to [:edit, :suppliers, @table], class: 'form-action-edit'
span data-t="helpers.links.edit"
= link_to [:suppliers, @table], method: :delete, data: {confirm: are_you_sure? }, class: 'form-action-destroy'
span data-t="helpers.links.destroy"