Commit e4af2b3d authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'milestones_labels' into 'master'

Possibility to create Milestones or Labels when Issues are disabled

https://dev.gitlab.org/gitlab/gitlabhq/issues/1682

See merge request !1270
parents 1b34a24f e683d9c0
...@@ -103,7 +103,9 @@ class Projects::MilestonesController < Projects::ApplicationController ...@@ -103,7 +103,9 @@ class Projects::MilestonesController < Projects::ApplicationController
end end
def module_enabled def module_enabled
return render_404 unless @project.issues_enabled unless @project.issues_enabled || @project.merge_requests_enabled
return render_404
end
end end
def milestone_params def milestone_params
......
%ul.nav.nav-tabs %ul.nav.nav-tabs
= nav_link(controller: :issues) do - if project_nav_tab? :issues
= link_to project_issues_path(@project), class: "tab" do = nav_link(controller: :issues) do
Browse Issues = link_to project_issues_path(@project), class: "tab" do
Browse Issues
- if project_nav_tab? :merge_requests
= nav_link(controller: :merge_requests) do
= link_to project_merge_requests_path(@project), class: "tab" do
Merge Requests
= nav_link(controller: :milestones) do = nav_link(controller: :milestones) do
= link_to 'Milestones', project_milestones_path(@project), class: "tab" = link_to 'Milestones', project_milestones_path(@project), class: "tab"
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
...@@ -34,3 +39,14 @@ ...@@ -34,3 +39,14 @@
= link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-left", title: "New Issue", id: "new_issue_link" do = link_to new_project_issue_path(@project, issue: { assignee_id: params[:assignee_id], milestone_id: params[:milestone_id]}), class: "btn btn-new pull-left", title: "New Issue", id: "new_issue_link" do
%i.fa.fa-plus %i.fa.fa-plus
New Issue New Issue
- if current_controller?(:merge_requests)
%li.pull-right
.pull-right
%button.btn.btn-default.sidebar-expand-button
%i.icon.fa.fa-list
- if can? current_user, :write_merge_request, @project
= link_to new_project_merge_request_path(@project), class: "pull-right btn btn-new", title: "New Merge Request" do
%i.fa.fa-plus
New Merge Request
= render "head" = render "projects/issues_nav"
.row .row
.fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs .fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs
%i.fa.fa-list.fa-2x %i.fa.fa-list.fa-2x
......
= render "projects/issues/head" = render "projects/issues_nav"
- if can? current_user, :admin_label, @project - if can? current_user, :admin_label, @project
= link_to new_project_label_path(@project), class: "pull-right btn btn-new" do = link_to new_project_label_path(@project), class: "pull-right btn btn-new" do
......
- if can? current_user, :write_merge_request, @project = render "projects/issues_nav"
= link_to new_project_merge_request_path(@project), class: "pull-right btn btn-new", title: "New Merge Request" do
%i.fa.fa-plus
New Merge Request
%h3.page-title
Merge Requests
%hr
.row .row
.fixed.sidebar-expand-button.hidden-lg.hidden-md .fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.fa.fa-list.fa-2x %i.fa.fa-list.fa-2x
......
= render "projects/issues/head" = render "projects/issues_nav"
.milestones_content .milestones_content
%h3.page-title %h3.page-title
Milestones Milestones
......
= render "projects/issues/head" = render "projects/issues_nav"
%h3.page-title %h3.page-title
Milestone ##{@milestone.iid} Milestone ##{@milestone.iid}
.pull-right .pull-right
......
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