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

move links to browse issuables into sidebar

parent 470bba5c
......@@ -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 {
order: 2;
width: 100%;
......
......@@ -19,8 +19,8 @@ module MilestonesHelper
end
end
def milestones_browse_issuables_path(milestone, type:)
opts = { milestone_title: milestone.title }
def milestones_browse_issuables_path(milestone, state: nil, type:)
opts = { milestone_title: milestone.title, state: state }
if @project
polymorphic_path([@project.namespace.becomes(Namespace), @project, type], opts)
......
......@@ -44,12 +44,22 @@
= link_to new_namespace_project_issue_path(project.namespace, project, issue: { milestone_id: milestone.id }), class: "pull-right", title: "New Issue" do
New issue
.value.hide-collapsed
%span.milestone-stat
Open:
= milestone.issues_visible_to_user(current_user).opened.size
%span.milestone-stat
Closed:
= milestone.issues_visible_to_user(current_user).closed.size
- 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
Open:
= milestone.issues_visible_to_user(current_user).opened.size
%span.milestone-stat
Closed:
= milestone.issues_visible_to_user(current_user).closed.size
.block
.sidebar-collapsed-icon
......@@ -60,15 +70,29 @@
Merge requests
%span.badge= milestone.merge_requests.size
.value.hide-collapsed
%span.milestone-stat
Open:
= milestone.merge_requests.opened.size
%span.milestone-stat
Closed:
= milestone.merge_requests.closed.size
%span.milestone-stat
Merged:
= milestone.merge_requests.merged.size
- 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
Open:
= milestone.merge_requests.opened.size
%span.milestone-stat
Closed:
= milestone.merge_requests.closed.size
%span.milestone-stat
Merged:
= milestone.merge_requests.merged.size
- milestone_ref = milestone.try(:to_reference, full: true)
- if milestone_ref.present?
......
......@@ -10,15 +10,4 @@
%strong== #{milestone.percent_complete(current_user)}%
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)
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