BigW Consortium Gitlab

_tabs.html.haml 2.07 KB
Newer Older
1
%ul.nav-links.no-top.no-bottom
2 3 4 5 6 7 8 9 10 11 12 13 14 15
  - if milestone.is_a?(GlobalMilestone) || can?(current_user, :read_issue, @project)
    %li.active
      = link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do
        Issues
        %span.badge= milestone.issues_visible_to_user(current_user).size
    %li
      = link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-show' => '.tab-merge-requests-buttons' do
        Merge Requests
        %span.badge= milestone.merge_requests.size
  - else
    %li.active
      = link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-show' => '.tab-merge-requests-buttons' do
        Merge Requests
        %span.badge= milestone.merge_requests.size
16 17 18 19 20 21 22 23 24 25 26 27 28
  %li
    = link_to '#tab-participants', 'data-toggle' => 'tab' do
      Participants
      %span.badge= milestone.participants.count
  %li
    = link_to '#tab-labels', 'data-toggle' => 'tab' do
      Labels
      %span.badge= milestone.labels.count

- show_project_name = local_assigns.fetch(:show_project_name, false)
- show_full_project_name = local_assigns.fetch(:show_full_project_name, false)

.tab-content.milestone-content
29 30 31 32 33 34 35 36
  - if milestone.is_a?(GlobalMilestone) || can?(current_user, :read_issue, @project)
    .tab-pane.active#tab-issues
      = render 'shared/milestones/issues_tab', issues: milestone.issues_visible_to_user(current_user).include_associations, show_project_name: show_project_name, show_full_project_name: show_full_project_name
    .tab-pane#tab-merge-requests
      = render 'shared/milestones/merge_requests_tab', merge_requests: milestone.merge_requests, show_project_name: show_project_name, show_full_project_name: show_full_project_name
  - else
    .tab-pane.active#tab-merge-requests
      = render 'shared/milestones/merge_requests_tab', merge_requests: milestone.merge_requests, show_project_name: show_project_name, show_full_project_name: show_full_project_name
37 38 39 40
  .tab-pane#tab-participants
    = render 'shared/milestones/participants_tab', users: milestone.participants
  .tab-pane#tab-labels
    = render 'shared/milestones/labels_tab', labels: milestone.labels