diff options
author | Valery Sizov <vsv2711@gmail.com> | 2014-11-20 19:18:16 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2014-11-20 19:18:16 +0300 |
commit | e683d9c087cc503cd8cb11214ddf265897e726c0 (patch) | |
tree | bd87f90f2f0ad23b08f1a0df70d1cf5361243a8d /app/views/projects | |
parent | 435128171ddf41025f410429b8a639a368e77582 (diff) |
Possibility to create Milestones or Labels when Issues are disabled
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/_issues_nav.html.haml (renamed from app/views/projects/issues/_head.html.haml) | 22 | ||||
-rw-r--r-- | app/views/projects/issues/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/labels/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/merge_requests/index.html.haml | 9 | ||||
-rw-r--r-- | app/views/projects/milestones/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 2 |
6 files changed, 25 insertions, 14 deletions
diff --git a/app/views/projects/issues/_head.html.haml b/app/views/projects/_issues_nav.html.haml index 1d2f3ed8118..1e14a2deb8c 100644 --- a/app/views/projects/issues/_head.html.haml +++ b/app/views/projects/_issues_nav.html.haml @@ -1,7 +1,12 @@ %ul.nav.nav-tabs - = nav_link(controller: :issues) do - = link_to project_issues_path(@project), class: "tab" do - Browse Issues + - if project_nav_tab? :issues + = nav_link(controller: :issues) do + = 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 = link_to 'Milestones', project_milestones_path(@project), class: "tab" = nav_link(controller: :labels) do @@ -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 %i.fa.fa-plus 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 diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index 4ec362b3063..8db6241f21f 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -1,4 +1,4 @@ -= render "head" += render "projects/issues_nav" .row .fixed.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs %i.fa.fa-list.fa-2x diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index 06568278de8..c7c17c7797e 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -1,4 +1,4 @@ -= render "projects/issues/head" += render "projects/issues_nav" - if can? current_user, :admin_label, @project = link_to new_project_label_path(@project), class: "pull-right btn btn-new" do diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml index be638d7cac1..cd1e48ca976 100644 --- a/app/views/projects/merge_requests/index.html.haml +++ b/app/views/projects/merge_requests/index.html.haml @@ -1,10 +1,5 @@ -- 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 -%h3.page-title - Merge Requests -%hr += render "projects/issues_nav" + .row .fixed.sidebar-expand-button.hidden-lg.hidden-md %i.fa.fa-list.fa-2x diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml index 03367b7cdbf..0db0b114d63 100644 --- a/app/views/projects/milestones/index.html.haml +++ b/app/views/projects/milestones/index.html.haml @@ -1,4 +1,4 @@ -= render "projects/issues/head" += render "projects/issues_nav" .milestones_content %h3.page-title Milestones diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 8263f7530a2..f08ccc1d570 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -1,4 +1,4 @@ -= render "projects/issues/head" += render "projects/issues_nav" %h3.page-title Milestone ##{@milestone.iid} .pull-right |