Commit 62a9bb5a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyle admin:teams:show

parent ae90107c
%h3.page_title %h3.page_title
Team: #{@team.name} Team: #{@team.name}
%br
%table.zebra-striped
%thead
%tr
%th Team
%th
%tr
%td
%b
Name:
%td
= @team.name
 
= link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do = link_to edit_admin_team_path(@team), class: "btn btn-small pull-right" do
%i.icon-edit %i.icon-edit
Edit Edit
%tr %hr
%td
%b
Description: .row
%td .span6
.ui-box
%h5.title
Team info:
%ul.well-list
%li
%span.light Name:
%strong= @team.name
%li
%span.light Path:
%strong
= @team.path
%li
%span.light Description:
%strong
= @team.description = @team.description
%tr
%td %li
%b %span.light Owned by:
Owner: %strong
%td - if @team.owner
= @team.owner.name = link_to @team.owner.name, admin_user_path(@team.owner)
- else
(deleted)
.pull-right .pull-right
= link_to "#", class: "btn btn-small change-owner-link" do = link_to "#", class: "btn btn-small change-owner-link" do
%i.icon-edit %i.icon-edit
Change owner Change owner
%li.change-owner-holder.hide.bgred
%tr.change-owner-holder.hide .form-holder
%td.bgred %strong.cred New Owner:
%b.cred
New Owner:
%td.bgred
= form_for @team, url: admin_team_path(@team) do |f| = form_for @team, url: admin_team_path(@team) do |f|
= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'} = users_select_tag(:"user_team[owner_id]")
%div .prepend-top-10
= f.submit 'Change Owner', class: "btn btn-remove" = f.submit 'Change Owner', class: "btn btn-remove"
= link_to "Cancel", "#", class: "btn change-owner-cancel-link" = link_to "Cancel", "#", class: "btn change-owner-cancel-link"
%fieldset %li
%legend %span.light Created at:
%strong
= @team.created_at.stamp("March 1, 1999")
.span6
.ui-box
%h5.title
Members (#{@team.members.count}) Members (#{@team.members.count})
%span= link_to 'Add members', new_admin_team_member_path(@team), class: "btn btn-primary btn-small pull-right", id: :add_members_to_team .pull-right
- if @team.members.any? = link_to 'Add members', new_admin_team_member_path(@team), class: "btn btn-small", id: :add_members_to_team
%table#members_list %ul.well-list#members_list
%thead
%tr
%th User name
%th Default project access
%th Team access
%th.cred.span3 Danger Zone!
- @team.members.each do |member| - @team.members.each do |member|
%tr.member{ class: "user_#{member.id}"} %li.member{ class: "user_#{member.id}"}
%td
= link_to [:admin, member] do = link_to [:admin, member] do
%strong
= member.name = member.name
%small= "(#{member.email})" .pull-right
%td= @team.human_default_projects_access(member) %span.light
%td= @team.admin?(member) ? "Admin" : "Member" = @team.human_default_projects_access(member)
%td.bgred - if @team.admin?(member)
%span.label.label-info Admin
 
= link_to 'Edit', edit_admin_team_member_path(@team, member), class: "btn btn-small" = link_to 'Edit', edit_admin_team_member_path(@team, member), class: "btn btn-small"
   
= link_to 'Remove', admin_team_member_path(@team, member), confirm: 'Remove member from team. Are you sure?', method: :delete, class: "btn btn-remove btn-small", id: "remove_member_#{member.id}" = link_to 'Remove', admin_team_member_path(@team, member), confirm: 'Remove member from team. Are you sure?', method: :delete, class: "btn btn-remove btn-small", id: "remove_member_#{member.id}"
%fieldset
%legend .ui-box
%h5.title
Projects (#{@team.projects.count}) Projects (#{@team.projects.count})
%span= link_to 'Add projects', new_admin_team_project_path(@team), class: "btn btn-primary btn-small pull-right", id: :assign_projects_to_team .pull-right
- if @team.projects.any? = link_to 'Add projects', new_admin_team_project_path(@team), class: "btn btn-small", id: :assign_projects_to_team
%table#projects_list %ul.well-list#projects_list
%thead
%tr
%th Project name
%th Max access
%th.cred.span3 Danger Zone!
- @team.projects.each do |project| - @team.projects.each do |project|
%tr.project %li.project
%td = link_to [:admin, project] do
= link_to project.name_with_namespace, [:admin, project] %strong
%td = project.name_with_namespace
%span= @team.human_max_project_access(project)
%td.bgred .pull-right
%span.light
= @team.human_max_project_access(project)
 
= link_to 'Edit', edit_admin_team_project_path(@team, project), class: "btn btn-small" = link_to 'Edit', edit_admin_team_project_path(@team, project), class: "btn btn-small"
   
= link_to 'Relegate', admin_team_project_path(@team, project), confirm: 'Remove project from team. Are you sure?', method: :delete, class: "btn btn-remove small", id: "relegate_project_#{project.id}" = link_to 'Relegate', admin_team_project_path(@team, project), confirm: 'Remove project from team. Are you sure?', method: :delete, class: "btn btn-remove small", id: "relegate_project_#{project.id}"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment