2012-09-26 09:49:20 -04:00
|
|
|
%h3.page_title
|
|
|
|
User: #{@admin_user.name}
|
2012-04-16 16:33:03 -04:00
|
|
|
- if @admin_user.blocked
|
|
|
|
%small Blocked
|
|
|
|
- if @admin_user.admin
|
|
|
|
%small Administrator
|
2012-09-26 09:49:20 -04:00
|
|
|
= link_to edit_admin_user_path(@admin_user), class: "btn right" do
|
|
|
|
%i.icon-edit
|
|
|
|
Edit
|
2011-10-08 17:36:38 -04:00
|
|
|
|
2012-04-16 16:33:03 -04:00
|
|
|
%br
|
2012-02-11 12:56:18 -05:00
|
|
|
|
2012-09-03 14:53:16 -04:00
|
|
|
%table.zebra-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th Profile
|
|
|
|
%th
|
2011-11-18 15:55:13 -05:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Email:
|
|
|
|
%td
|
|
|
|
= @admin_user.email
|
2012-11-27 22:14:05 -05:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Username:
|
|
|
|
%td
|
|
|
|
= @admin_user.username
|
2011-11-18 15:55:13 -05:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Admin:
|
2012-08-10 18:07:50 -04:00
|
|
|
%td= check_box_tag "admin", 1, @admin_user.admin, disabled: :disabled
|
2012-04-13 01:12:34 -04:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Blocked:
|
2012-08-10 18:07:50 -04:00
|
|
|
%td= check_box_tag "blocked", 1, @admin_user.blocked, disabled: :disabled
|
2011-11-18 15:55:13 -05:00
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Projects limit:
|
|
|
|
%td
|
|
|
|
= @admin_user.projects_limit
|
|
|
|
- unless @admin_user.skype.empty?
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Skype:
|
|
|
|
%td
|
|
|
|
= @admin_user.skype
|
|
|
|
- unless @admin_user.linkedin.empty?
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Linkedin:
|
|
|
|
%td
|
|
|
|
= @admin_user.linkedin
|
|
|
|
- unless @admin_user.twitter.empty?
|
|
|
|
%tr
|
|
|
|
%td
|
|
|
|
%b
|
|
|
|
Twitter:
|
|
|
|
%td
|
|
|
|
= @admin_user.twitter
|
2011-10-08 17:36:38 -04:00
|
|
|
|
2012-04-16 16:33:03 -04:00
|
|
|
%br
|
|
|
|
%h3 Add User to Projects
|
|
|
|
%br
|
2012-08-10 18:07:50 -04:00
|
|
|
= form_tag team_update_admin_user_path(@admin_user), class: "bulk_import", method: :put do
|
2012-09-03 14:53:16 -04:00
|
|
|
%table
|
2012-02-11 12:56:18 -05:00
|
|
|
%thead
|
2011-10-08 17:36:38 -04:00
|
|
|
%tr
|
2012-02-11 12:56:18 -05:00
|
|
|
%th Projects
|
|
|
|
%th Project Access:
|
|
|
|
|
|
|
|
%tr
|
2012-09-10 02:09:55 -04:00
|
|
|
%td= select_tag :project_ids, options_from_collection_for_select(@projects , :id, :name), multiple: true, data: {placeholder: 'Select projects'}, class: 'chosen span5'
|
|
|
|
%td= select_tag :project_access, options_for_select(Project.access_options), class: "project-access-select chosen span3"
|
2012-02-11 12:56:18 -05:00
|
|
|
|
2012-04-16 16:33:03 -04:00
|
|
|
%tr
|
2012-08-10 18:07:50 -04:00
|
|
|
%td= submit_tag 'Add', class: "btn primary"
|
2012-04-16 16:33:03 -04:00
|
|
|
%td
|
2012-06-03 18:37:27 -04:00
|
|
|
Read more about project permissions
|
2012-08-10 18:07:50 -04:00
|
|
|
%strong= link_to "here", help_permissions_path, class: "vlink"
|
2012-04-16 16:33:03 -04:00
|
|
|
%br
|
|
|
|
|
|
|
|
- if @admin_user.projects.present?
|
|
|
|
%h3 Projects
|
|
|
|
%br
|
2012-02-11 12:56:18 -05:00
|
|
|
|
2012-09-03 14:53:16 -04:00
|
|
|
%table.zebra-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
2012-04-16 16:33:03 -04:00
|
|
|
%th Name
|
|
|
|
%th Project Access
|
|
|
|
%th
|
|
|
|
%th
|
|
|
|
|
|
|
|
- @admin_user.users_projects.each do |tm|
|
|
|
|
- project = tm.project
|
|
|
|
%tr
|
|
|
|
%td= link_to project.name, admin_project_path(project)
|
2012-09-26 09:49:20 -04:00
|
|
|
%td= tm.project_access_human
|
2012-08-10 18:07:50 -04:00
|
|
|
%td= link_to 'Edit Access', edit_admin_team_member_path(tm), class: "btn small"
|
|
|
|
%td= link_to 'Remove from team', admin_team_member_path(tm), confirm: 'Are you sure?', method: :delete, class: "btn small danger"
|