index.html.haml 1.41 KB
%h3.page_title
  Teams (#{@teams.total_count})
  %small
    allow you to organize groups of people that have a common focus. Use teams to simplify the process of assigning roles to groups of people.

  = link_to 'New Team', new_admin_team_path, class: "btn btn-small pull-right"
%br

= form_tag admin_teams_path, method: :get, class: 'form-inline' do
  = text_field_tag :name, params[:name], class: "span6"
  = submit_tag "Search", class: "btn submit btn-primary"

%hr

%ul.bordered-list
  - @teams.each do |team|
    %li
      .clearfix
        .pull-right.prepend-top-10
          = link_to 'Edit', edit_admin_team_path(team), id: "edit_#{dom_id(team)}", class: "btn btn-small"
          = link_to 'Destroy', admin_team_path(team), confirm: "REMOVE #{team.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"

        %h4
          = link_to admin_team_path(team) do
            %i.icon-group
            = team.name

      .clearfix.light.append-bottom-10
        %span
          %b Owner:
          - if team.owner
            = link_to team.owner.name, admin_user_path(team.owner)
          - else
            (deleted)
        \|
        %span
          %b Users:
          %span.badge= team.members.count
        \|
        %span
          %b Projects:
          %span.badge= team.projects.count

      .clearfix
        %p
          = truncate team.description, length: 150

= paginate @teams, theme: "gitlab"