initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
- model_class = <%= resource_name.classify %>
|
||||
.page-header= title :show, @<%= resource_name %>
|
||||
|
||||
dl.dl-horizontal.show-list
|
||||
<%- columns.each do |column| -%>
|
||||
dt= model_class.human_attribute_name(:<%= column.name %>)
|
||||
dd= @<%= resource_name %>.<%= column.name %>
|
||||
<%- end -%>
|
||||
<%- belongs_to_associations.each do |association| -%>
|
||||
- if @<%= resource_name %>.<%= association.name %>.present?
|
||||
dt= <%= association.options[:class_name] %>.model_name.human
|
||||
dd= link_to @<%= resource_name %>.<%= association.name %>.<%= association.name_property %>, @<%= resource_name %>.<%= association.name %>
|
||||
<%- end -%>
|
||||
|
||||
.form-actions
|
||||
= link_to t("helpers.links.back"), <%= controller_routing_path %>_path, class: 'btn'
|
||||
'
|
||||
= link_to t('helpers.links.edit'), [:edit, @<%= resource_name %>], class: 'btn'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), @<%= resource_name %>, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
Reference in New Issue
Block a user