end of day commit
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
- model_class = <%= resource_name.classify %>
|
||||
div.page-header= title :index, model_class
|
||||
.page-header= title :index, model_class
|
||||
- if @<%= plural_resource_name %>.any?
|
||||
table.table.table-striped
|
||||
thead
|
||||
@@ -10,22 +10,22 @@ div.page-header= title :index, model_class
|
||||
<%- belongs_to_associations.each do |association| -%>
|
||||
th= <%= association.options[:class_name] %>.model_name.human
|
||||
<%- end -%>
|
||||
th= model_class.human_attribute_name(:created_at)
|
||||
th=t 'helpers.actions'
|
||||
th.timestamp= model_class.human_attribute_name(:created_at)
|
||||
th.actions=t 'helpers.actions'
|
||||
tbody
|
||||
- @<%= plural_resource_name %>.each do |<%= resource_name %>|
|
||||
tr
|
||||
<%- columns.each.with_index do |column, index| -%>
|
||||
<%- if index.zero? -%>
|
||||
td= link_to <%= resource_name %>.<%= column.name %>, <%= resource_name %>
|
||||
td.link= link_to <%= resource_name %>.<%= column.name %>, <%= resource_name %>
|
||||
<%- else -%>
|
||||
td= <%= resource_name %>.<%= column.name %>
|
||||
<%- end end -%>
|
||||
<%- belongs_to_associations.each do |association| -%>
|
||||
td= link_to_if <%= resource_name %>.<%= association.name %>.present?, <%= resource_name %>.<%= association.name %>.try(:<%= association.name_property %>), <%= resource_name %>.<%= association.name %>
|
||||
td.link= link_to_if <%= resource_name %>.<%= association.name %>.present?, <%= resource_name %>.<%= association.name %>.try(:<%= association.name_property %>), <%= resource_name %>.<%= association.name %>
|
||||
<%- end -%>
|
||||
td=l <%= resource_name %>.created_at, format: :short
|
||||
td
|
||||
td.timestamp=l <%= resource_name %>.created_at, format: :short
|
||||
td.actions
|
||||
= link_to t('helpers.links.edit'), [:edit, <%= resource_name %>], class: 'btn btn-mini'
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), <%= resource_name %>, method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
|
||||
|
||||
Reference in New Issue
Block a user