infra updates

This commit is contained in:
2020-03-05 11:36:49 -05:00
parent aec5364f2e
commit 840bac4d54
12 changed files with 47 additions and 49 deletions
+6 -7
View File
@@ -1,21 +1,20 @@
- model_class = Supplier
.page-header= title :index, model_class
- title :index, model_class
- if @suppliers.any?
table.table
thead
tr
th= model_class.human_attribute_name(:name)
th= model_class.human_attribute_name(:created_at)
th=t 'helpers.actions.title'
th.action-header
th.action-header
tbody
- @suppliers.each do |supplier|
tr
td= link_to supplier.name, [:admin, supplier]
td=l supplier.created_at, format: :short
td
= link_to t('helpers.links.edit'), [:edit, :admin, supplier], class: 'btn btn-mini'
'
= link_to t("helpers.links.destroy"), [:admin, supplier], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
td data-time=supplier.created_at.iso8601 data-time-format="dd D MMM HH:mm YYYY"
= edit_td [:admin, supplier]
= destroy_td [:admin, supplier]
- else
= no_content_given model_class
= link_to t("helpers.links.new"), new_admin_supplier_path, class: 'btn btn-primary'
@@ -1,5 +1,5 @@
- model_class = UserFeedback
.page-header= title :index, model_class
- title :index, model_class
- if @user_feedbacks.any?
= paginate @user_feedbacks
table.table.table-striped
@@ -8,17 +8,16 @@
th= User.model_name.human
th= model_class.human_attribute_name(:content)
th= model_class.human_attribute_name(:created_at)
th=t 'helpers.actions.title'
th.action-header
th.action-header
tbody
- @user_feedbacks.each do |user_feedback|
tr
td= link_to user_feedback.user.email, [:admin, user_feedback.user]
td= user_feedback.content
td=l user_feedback.created_at, format: :short
td
= link_to t('helpers.links.edit'), [:edit, :admin, user_feedback], class: 'btn btn-mini'
'
= link_to t("helpers.links.destroy"), [:admin, user_feedback], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-mini btn-danger'
td data-time=user_feedback.created_at.iso8601 data-time-format="dd D MMM HH:mm YYYY"
= edit_td [:admin, user_feedback]
= destroy_td [:admin, user_feedback]
- else
= no_content_given model_class
/= link_to t("helpers.links.new"), new_admin_user_path, class: 'btn btn-primary'