gitlab-org--gitlab-foss/app/views/shared/milestones/_tabs.html.haml

51 lines
2.5 KiB
Text
Raw Normal View History

2017-07-07 04:49:33 -04:00
- issues_accessible = milestone.is_a?(GlobalMilestone) || can?(current_user, :read_issue, @project)
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
.fade-left= icon('angle-left')
.fade-right= icon('angle-right')
2018-04-19 23:34:20 -04:00
%ul.nav-links.scrolling-tabs.js-milestone-tabs.nav.nav-tabs
2017-07-07 04:49:33 -04:00
- if issues_accessible
2018-05-31 10:23:49 -04:00
%li.nav-item
= link_to '#tab-issues', class: 'nav-link active', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do
Issues
2018-04-09 12:33:41 -04:00
%span.badge.badge-pill= milestone.issues_visible_to_user(current_user).size
2018-05-31 10:23:49 -04:00
%li.nav-item
= link_to '#tab-merge-requests', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests
%span.badge.badge-pill= milestone.merge_requests_visible_to_user(current_user).size
- else
2018-05-31 10:23:49 -04:00
%li.nav-item
= link_to '#tab-merge-requests', class: 'nav-link active', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests
2018-04-09 12:33:41 -04:00
%span.badge.badge-pill= milestone.merge_requests.size
2018-05-31 10:23:49 -04:00
%li.nav-item
= link_to '#tab-participants', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do
Participants
%span.badge.badge-pill= milestone.issue_participants_visible_by_user(current_user).count
2018-05-31 10:23:49 -04:00
%li.nav-item
= link_to '#tab-labels', class: 'nav-link', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do
Labels
%span.badge.badge-pill= milestone.issue_labels_visible_by_user(current_user).count
2016-03-06 23:07:19 -05:00
2017-07-07 04:49:33 -04:00
- issues = milestone.sorted_issues(current_user)
2016-03-06 23:07:19 -05:00
- 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
2017-07-07 04:49:33 -04:00
- if issues_accessible
.tab-pane.active#tab-issues{ data: { sort_endpoint: (sort_issues_project_milestone_path(@project, @milestone) if @project && current_user) } }
2017-07-07 04:49:33 -04:00
= render 'shared/milestones/issues_tab', issues: issues, show_project_name: show_project_name, show_full_project_name: show_full_project_name
2017-06-08 15:55:50 -04:00
.tab-pane#tab-merge-requests
2017-04-25 10:25:20 -04:00
-# loaded async
= render "shared/milestones/tab_loading"
- else
2017-06-08 15:55:50 -04:00
.tab-pane.active#tab-merge-requests
2017-04-25 10:25:20 -04:00
-# loaded async
= render "shared/milestones/tab_loading"
2016-03-06 23:07:19 -05:00
.tab-pane#tab-participants
2017-04-25 10:25:20 -04:00
-# loaded async
= render "shared/milestones/tab_loading"
2016-03-06 23:07:19 -05:00
.tab-pane#tab-labels
2017-04-25 10:25:20 -04:00
-# loaded async
= render "shared/milestones/tab_loading"