index.html.haml 2.67 KB
Newer Older
1
= render "issues/head"
2
.issues_content
randx's avatar
randx committed
3
  %h3.page_title
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
4
    Issues
5
    %span (<span class=issue_counter>#{@issues.total_count}</span>)
6
    .pull-right
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
7 8
      .span5
        - if can? current_user, :write_issue, @project
9
          = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-primary pull-right", title: "New Issue", id: "new_issue_link" do
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
10
            %i.icon-plus
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
11
            New Issue
12
        = form_tag search_project_issues_path(@project), method: :get, remote: true, id: "issue_search_form", class: 'pull-right'  do
13
          = hidden_field_tag :project_id, @project.id, { id: 'project_id' }
14
          = hidden_field_tag :status, params[:status]
15
          = search_field_tag :issue_search, nil, { placeholder: 'Search', class: 'issue_search span3 pull-right neib search-text-input' }
16

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
17
  .clearfix
randx's avatar
randx committed
18

19 20 21 22 23 24 25
.row
  .span3
    = render 'filter', entity: 'issue'
  .span9
    %div#issues-table-holder.ui-box
      .title
        = check_box_tag "check_all_issues", nil, false, class: "check_all_issues left"
randx's avatar
randx committed
26
        .clearfix
27 28 29 30 31 32 33 34 35
          .issues_bulk_update.hide
            = form_tag bulk_update_project_issues_path(@project), method: :post  do
              %span.update_issues_text Update selected issues with &nbsp;
              .left
                = select_tag('update[status]', options_for_select(['open', 'closed']), prompt: "Status")
                = select_tag('update[assignee_id]', options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
                = select_tag('update[milestone_id]', options_from_collection_for_select(issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
                = hidden_field_tag 'update[issues_ids]', []
                = hidden_field_tag :status, params[:status]
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
36
              = button_tag "Save", class: "btn update_selected_issues btn-small btn-save"
37 38 39 40 41 42
          .issues_filters
            = form_tag project_issues_path(@project), method: :get  do
              = select_tag(:label_name, options_for_select(issue_tags, params[:label_name]), prompt: "Labels")
              = select_tag(:assignee_id, options_from_collection_for_select([unassigned_filter] + @project.users.all, "id", "name", params[:assignee_id]), prompt: "Assignee")
              = select_tag(:milestone_id, options_from_collection_for_select([unassigned_filter] + issues_active_milestones, "id", "title", params[:milestone_id]), prompt: "Milestone")
              = hidden_field_tag :status, params[:status]
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
43

44 45
      %ul#issues-table.well-list.issues_table
        = render "issues"
46

gitlabhq's avatar
gitlabhq committed
47
:javascript
48
  $(function(){
randx's avatar
randx committed
49
    issuesPage();
randx's avatar
randx committed
50
  })