Commit 2bacc040 authored by Mike Greiling's avatar Mike Greiling

move links to browse issuables into sidebar

parent 470bba5c
...@@ -73,26 +73,6 @@ ...@@ -73,26 +73,6 @@
} }
} }
.milestone-progress-buttons {
order: 1;
margin-top: 10px;
@media (min-width: $screen-xs-min) {
order: 2;
margin-top: 0;
flex-shrink: 0;
}
.btn {
float: left;
margin-right: $btn-side-margin;
&:last-child {
margin-right: 0;
}
}
}
.milestone-stats { .milestone-stats {
order: 2; order: 2;
width: 100%; width: 100%;
......
...@@ -19,8 +19,8 @@ module MilestonesHelper ...@@ -19,8 +19,8 @@ module MilestonesHelper
end end
end end
def milestones_browse_issuables_path(milestone, type:) def milestones_browse_issuables_path(milestone, state: nil, type:)
opts = { milestone_title: milestone.title } opts = { milestone_title: milestone.title, state: state }
if @project if @project
polymorphic_path([@project.namespace.becomes(Namespace), @project, type], opts) polymorphic_path([@project.namespace.becomes(Namespace), @project, type], opts)
......
...@@ -44,6 +44,16 @@ ...@@ -44,6 +44,16 @@
= link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "pull-right", title: "New Issue" do = link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "pull-right", title: "New Issue" do
New issue New issue
.value.hide-collapsed .value.hide-collapsed
- if project && can?(current_user, :read_issue, project)
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :issues) do
Open:
= milestone.issues_visible_to_user(current_user).opened.size
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :issues, state: 'closed') do
Closed:
= milestone.issues_visible_to_user(current_user).closed.size
- else
%span.milestone-stat %span.milestone-stat
Open: Open:
= milestone.issues_visible_to_user(current_user).opened.size = milestone.issues_visible_to_user(current_user).opened.size
...@@ -60,6 +70,20 @@ ...@@ -60,6 +70,20 @@
Merge requests Merge requests
%span.badge= milestone.merge_requests.size %span.badge= milestone.merge_requests.size
.value.hide-collapsed .value.hide-collapsed
- if project && can?(current_user, :read_merge_request, project)
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests) do
Open:
= milestone.merge_requests.opened.size
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'closed') do
Closed:
= milestone.merge_requests.closed.size
%span.milestone-stat
= link_to milestones_browse_issuables_path(milestone, type: :merge_requests, state: 'merged') do
Merged:
= milestone.merge_requests.merged.size
- else
%span.milestone-stat %span.milestone-stat
Open: Open:
= milestone.merge_requests.opened.size = milestone.merge_requests.opened.size
......
...@@ -10,15 +10,4 @@ ...@@ -10,15 +10,4 @@
%strong== #{milestone.percent_complete(current_user)}% %strong== #{milestone.percent_complete(current_user)}%
complete complete
.milestone-progress-buttons
%span.tab-issues-buttons
- if project
- if can?(current_user, :create_issue, project)
= link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "btn", title: "New Issue" do
New Issue
- if can?(current_user, :read_issue, project)
= link_to 'Browse Issues', milestones_browse_issuables_path(milestone, type: :issues), class: "btn"
%span.tab-merge-requests-buttons.hidden
= link_to 'Browse Merge Requests', milestones_browse_issuables_path(milestone, type: :merge_requests), class: "btn"
= milestone_progress_bar(milestone) = milestone_progress_bar(milestone)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment