Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.html.haml « issues « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ade80dade8fbcfcd0fa4d14e936b35de39118d72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
= render "issues/head"
.issues_content
  %h3
    Issues
    %small (#{@issues.total_count})
    .right
      .span5
        - if can? current_user, :write_issue, @project
          = link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do
            New Issue
        = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :id => "issue_search_form", :class => :right  do
          = hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
          = hidden_field_tag :status, params[:f]
          = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search span3 right neib' }

  %br

  .issues_legend
    .list_legend
      .icon.critical
      .text Critical

    .list_legend
      .icon.closed
      .text Closed

    .list_legend
      .icon.today
      .text Today
  .clearfix

  %div#issues-table-holder.ui-box
    .title
      .row
        .span4
          %ul.nav.nav-pills.left
            %li{:class => ("active" if (params[:f] == "0" || !params[:f]))}
              = link_to project_issues_path(@project, :f => 0, :milestone_id => params[:milestone_id]) do
                Open
            %li{:class => ("active" if params[:f] == "2")}
              = link_to project_issues_path(@project, :f => 2, :milestone_id => params[:milestone_id]) do
                Closed
            %li{:class => ("active" if params[:f] == "3")}
              = link_to project_issues_path(@project, :f => 3, :milestone_id => params[:milestone_id]) do
                To Me
            %li{:class => ("active" if params[:f] == "1")}
              = link_to project_issues_path(@project, :f => 1, :milestone_id => params[:milestone_id]) do
                All

        .span6.right
          = form_tag project_issues_path(@project), :method => :get, :class => :right  do
            = select_tag(:assignee_id, options_from_collection_for_select(@project.users.all, "id", "name", params[:assignee_id]), :prompt => "Assignee")
            = select_tag(:milestone_id, options_from_collection_for_select(@project.milestones.order("id desc").all, "id", "title", params[:milestone_id]), :prompt => "Milestone")
            = hidden_field_tag :f, params[:f]

    %ul#issues-table.unstyled
      = render "issues"

:javascript
  $(function(){
    initIssuesSearch();
    setSortable();
    $("#assignee_id").chosen();
    $("#milestone_id").chosen();
    $("#milestone_id, #assignee_id").live("change", function(){
      $(this).closest("form").submit();
    });
  })

  function setSortable(){
    $('#issues-table').sortable({
      axis: 'y',
      dropOnEmpty: false,
      handle: '.avatar',
      items: 'li',
      opacity: 0.4,
      scroll: true,
      update: function(){
        $.ajax({
        type: 'post',
        data: $('#issues-table').sortable('serialize'),
        dataType: 'script',
        complete: function(request){
          $('#issues-table').effect('highlight');
        },
        url: "#{sort_project_issues_path(@project)}"})
        }
      });
  }