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

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

9 10
.ui-box
  .title
randx's avatar
randx committed
11
    %ul.nav.nav-pills
12
      %li{:class => ("active" if (params[:f] == "0" || !params[:f]))}
13
        = link_to project_merge_requests_path(@project, :f => 0) do
14 15
          Open
      %li{:class => ("active" if params[:f] == "2")}
16
        = link_to project_merge_requests_path(@project, :f => 2) do
17 18
          Closed
      %li{:class => ("active" if params[:f] == "3")}
19
        = link_to project_merge_requests_path(@project, :f => 3) do
20 21
          To Me
      %li{:class => ("active" if params[:f] == "1")}
22
        = link_to project_merge_requests_path(@project, :f => 1) do
23
          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
    - if @merge_requests.present?
      %li.bottom
        .row
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
33
          .span7= paginate @merge_requests, :theme => "gitlab"
34 35
          .span4.right
            %span.cgray.right #{@merge_requests.total_count} merge requests for this filter
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
36