big refactor for test and admin namespace

This commit is contained in:
2012-12-04 18:45:18 +01:00
parent 7d64ab2022
commit d8eef4a047
85 changed files with 1403 additions and 1272 deletions
+22
View File
@@ -0,0 +1,22 @@
- model_class = User
.page-header= title :index, model_class
- if @users.any?
table.table.table-striped
thead
tr
th= model_class.human_attribute_name(:email)
th= model_class.human_attribute_name(:created_at)
th=t 'helpers.actions'
tbody
- @users.each do |user|
tr
td= link_to user.email, [:admin, user]
td=l user.created_at, format: :short
td
= link_to t('helpers.links.edit'), [:edit, :admin, user], class: 'btn btn-mini'
'
= link_to t("helpers.links.destroy"), [:admin, user], 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'