Fix destroy problem and add section area explanation

This commit is contained in:
2015-03-24 17:35:43 +01:00
parent 7fb2a0f08c
commit c5d6252c7a
14 changed files with 33 additions and 21 deletions
+4 -1
View File
@@ -16,4 +16,7 @@
= link_to t("helpers.links.destroy"), [:admin, svg_element], method: :delete, data: {confirm: are_you_sure? }, class: 'table-destroy-button'
- else
= no_content_given model_class
= link_to t("helpers.links.new"), new_admin_svg_element_path, class: 'record-new-button'
/= link_to t("helpers.links.new"), new_admin_svg_element_path, class: 'record-new-button'
- content_for :page_links do
ul
li= link_to link_to_new_content(SvgElement), main_app.new_admin_svg_element_path, class: 'record-new-button'
+8 -12
View File
@@ -1,16 +1,12 @@
- model_class = SvgElement
.page-header= title :show, @svg_element
- title :show, @svg_element
dl.dl-horizontal.show-list
dt= model_class.human_attribute_name(:number)
dd= @svg_element.number
- if @svg_element.supplier.present?
dt= Supplier.model_name.human
dd= link_to @svg_element.supplier.name, [:admin, @svg_element.supplier]
dt= model_class.human_attribute_name(:name)
dd= @svg_element.name
.form-actions
= link_to t("helpers.links.back"), admin_svg_elements_path, class: 'btn'
'
= link_to t('helpers.links.edit'), [:edit, :admin, @svg_element], class: 'btn'
'
= link_to t("helpers.links.destroy"), [:admin, @svg_element], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
- content_for :page_links do
ul
li=link_to link_to_index_content(SvgElement), main_app.admin_svg_elements_path, class: 'to-index-button'
li=link_to link_to_edit_content(@svg_element), main_app.edit_admin_svg_element_path(@svg_element), class: 'record-edit-button'
li= link_to link_to_destroy_content(@svg_element), [:admin, @svg_element], method: :delete, data: {confirm: are_you_sure?}, class: 'record-destroy-button'