_issues.html.haml 3.56 KB
Newer Older
1 2 3 4 5 6
.ui-box
  .title
    = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
    .clearfix
      .issues_bulk_update.hide
        = form_tag bulk_update_project_issues_path(@project), method: :post  do
7 8
          %span Update selected issues with  
          = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
9 10
          = select_tag('update[assignee_id]', bulk_update_assignee_options, prompt: "Assignee")
          = select_tag('update[milestone_id]', bulk_update_milestone_options, prompt: "Milestone")
11 12
          = hidden_field_tag 'update[issues_ids]', []
          = hidden_field_tag :status, params[:status]
13
          = button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
14 15 16 17 18 19 20 21 22 23 24 25 26
      .issues-filters
        %span Filter by
        .dropdown.inline.prepend-left-10
          %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
            %i.icon-tags
            %span.light labels:
            - if params[:label_name].present?
              %strong= params[:label_name]
            - else
              Any
            %b.caret
          %ul.dropdown-menu
            %li
27
              = link_to project_filter_path(label_name: nil) do
28
                Any
29 30
            - issue_label_names.each do |label_name|
              %li
31
                = link_to project_filter_path(label_name: label_name) do
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
                  %span{class: "label #{label_css_class(label_name)}"}
                    %i.icon-tag
                  = label_name
        .dropdown.inline.prepend-left-10
          %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
            %i.icon-user
            %span.light assignee:
            - if @assignee.present?
              %strong= @assignee.name
            - elsif params[:assignee_id] == "0"
              Unassigned
            - else
              Any
            %b.caret
          %ul.dropdown-menu
            %li
48
              = link_to project_filter_path(assignee_id: nil) do
49
                Any
50
              = link_to project_filter_path(assignee_id: 0) do
51
                Unassigned
52
            - @project.team.members.sort_by(&:name).each do |user|
53
              %li
54
                = link_to project_filter_path(assignee_id: user.id) do
55
                  = image_tag avatar_icon(user.email), class: "avatar s16", alt: ''
56
                  = user.name
57

58 59 60 61 62 63 64
        .dropdown.inline.prepend-left-10
          %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
            %i.icon-time
            %span.light milestone:
            - if @milestone.present?
              %strong= @milestone.title
            - elsif params[:milestone_id] == "0"
65
              None (backlog)
66 67 68 69 70
            - else
              Any
            %b.caret
          %ul.dropdown-menu
            %li
71
              = link_to project_filter_path(milestone_id: nil) do
72
                Any
73
              = link_to project_filter_path(milestone_id: 0) do
74
                None (backlog)
75
            - project_active_milestones.each do |milestone|
76
              %li
77
                = link_to project_filter_path(milestone_id: milestone.id) do
78 79
                  %strong= milestone.title
                  %small.light= milestone.expires_at
80

81 82
        .pull-right
          = render 'shared/sort_dropdown'
83

84 85 86 87 88

  %ul.well-list.issues-list
    = render @issues
    - if @issues.blank?
      %li
89
        %h4.nothing_here_message No issues to show
randx's avatar
randx committed
90

91
- if @issues.present?
92 93 94
  .pull-right
    %span.issue_counter #{@issues.total_count}
    issues for this filter
randx's avatar
randx committed
95

96
  = paginate @issues, theme: "gitlab"