2017-07-07 04:49:33 -04:00
|
|
|
- issues_accessible = milestone.is_a?(GlobalMilestone) || can?(current_user, :read_issue, @project)
|
|
|
|
|
2017-03-28 10:56:08 -04:00
|
|
|
.scrolling-tabs-container.inner-page-scroll-tabs.is-smaller
|
2017-03-24 05:49:10 -04:00
|
|
|
.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
|
2017-03-24 05:49:10 -04:00
|
|
|
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
|
2017-03-24 05:49:10 -04:00
|
|
|
Merge Requests
|
2019-03-05 10:15:22 -05:00
|
|
|
%span.badge.badge-pill= milestone.merge_requests_visible_to_user(current_user).size
|
2017-03-24 05:49:10 -04:00
|
|
|
- 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
|
2017-03-24 05:49:10 -04:00
|
|
|
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
|
2017-03-24 05:49:10 -04:00
|
|
|
Participants
|
2019-01-17 14:41:53 -05:00
|
|
|
%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
|
2017-03-24 05:49:10 -04:00
|
|
|
Labels
|
2019-01-17 14:41:53 -05:00
|
|
|
%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
|
2017-06-29 13:06:35 -04:00
|
|
|
.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
|
2017-04-25 11:06:17 -04:00
|
|
|
= render "shared/milestones/tab_loading"
|
2017-02-08 15:57:23 -05:00
|
|
|
- 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
|
2017-04-25 11:06:17 -04:00
|
|
|
= 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
|
2017-04-25 11:06:17 -04:00
|
|
|
= 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
|
2017-04-25 11:06:17 -04:00
|
|
|
= render "shared/milestones/tab_loading"
|