index.html.haml 1.16 KB
Newer Older
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
1 2 3 4 5
%h3
  Merge Requests
  - if can? current_user, :write_issue, @project
    = link_to new_project_merge_request_path(@project), :class => "right btn small", :title => "New Merge Request" do 
      New Merge Request
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
6

7
%br
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
8

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
.ui-box
  .title
    %ul.pills
      %li{:class => ("active" if (params[:f] == "0" || !params[:f]))}
        = link_to project_merge_requests_path(@project, :f => 0) do 
          Open
      %li{:class => ("active" if params[:f] == "2")}
        = link_to project_merge_requests_path(@project, :f => 2) do 
          Closed
      %li{:class => ("active" if params[:f] == "3")}
        = link_to project_merge_requests_path(@project, :f => 3) do 
          To Me
      %li{:class => ("active" if params[:f] == "1")}
        = link_to project_merge_requests_path(@project, :f => 1) do 
          All
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
24

25 26 27 28 29
  %ul.unstyled
    = render @merge_requests
    - if @merge_requests.blank?
      %li
        %p.padded Nothing to show here
30 31 32 33 34 35
    - if @merge_requests.present?
      %li.bottom
        .row
          .span10= paginate @merge_requests, :theme => "gitlab"
          .span4.right
            %span.cgray.right #{@merge_requests.total_count} merge requests for this filter
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
36