Add admin interface for user feedbacks

This commit is contained in:
2014-10-02 20:07:36 +02:00
parent 63bd76afcf
commit 3365edcdf0
6 changed files with 49 additions and 2 deletions
@@ -0,0 +1,25 @@
- model_class = UserFeedback
.page-header= title :index, model_class
- if @user_feedbacks.any?
= paginate @user_feedbacks
table.table.table-striped
thead
tr
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'
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'
- else
= no_content_given model_class
/= link_to t("helpers.links.new"), new_admin_user_path, class: 'btn btn-primary'