Skip to content

Commit

Permalink
Merge branch 'milestone_and_labels_links' into 'master'
Browse files Browse the repository at this point in the history
Milestones and labels can be used even when issues are disabled.

When Issues are disabled for a project Milestones and Labels can still be used for Merge Requests.

See merge request !1739
  • Loading branch information
dzaporozhets authored and maxlazio committed Mar 25, 2015
1 parent c91162c commit b68f9be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/helpers/projects_helper.rb
Expand Up @@ -146,7 +146,7 @@ def get_project_nav_tabs(project, current_user)
nav_tabs << feature if project.send :"#{feature}_enabled"
end

if project.issues_enabled
if project.issues_enabled || project.merge_requests_enabled
nav_tabs << [:milestones, :labels]
end

Expand Down
11 changes: 6 additions & 5 deletions app/views/projects/milestones/show.html.haml
Expand Up @@ -60,11 +60,12 @@
Participants
%span.badge= @users.count

.pull-right
= link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
%i.fa.fa-plus
New Issue
= link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link btn-grouped"
- if @project.issues_enabled
.pull-right
= link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
%i.fa.fa-plus
New Issue
= link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_id: @milestone.id), class: "btn edit-milestone-link btn-grouped"

.tab-content
.tab-pane.active#tab-issues
Expand Down

0 comments on commit b68f9be

Please sign in to comment.