Commit 5a59712b authored by Douwe Maan's avatar Douwe Maan

Add "New X" buttons to dashboard and group issue, MR and milestone indexes

parent 09e712c0
......@@ -4,14 +4,31 @@
- if current_user
= auto_discovery_link_tag(:atom, issues_dashboard_url(format: :atom, private_token: current_user.private_token), title: "#{current_user.name} issues")
.append-bottom-20
.pull-right
.project-issuable-filter
.controls
.pull-left
- if current_user
.hidden-xs.pull-left.prepend-top-20
= link_to issues_dashboard_url(format: :atom, private_token: current_user.private_token), class: '' do
.hidden-xs.pull-left
= link_to issues_dashboard_url(format: :atom, private_token: current_user.private_token), class: 'btn' do
%i.fa.fa-rss
- if @projects.any? { |project| can?(current_user, :create_issue, project) }
.dropdown.inline.prepend-left-10
%button.dropdown-toggle.btn.btn-new{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-plus
New Issue
%b.caret
%ul.dropdown-menu.dropdown-menu-align-right
- @projects.each do |project|
- if can?(current_user, :create_issue, project)
%li
= link_to new_namespace_project_issue_path(project.namespace, project) do
= project.name_with_namespace
= render 'shared/issuable/filter', type: :issues
= render 'shared/issues'
.gray-content-block.second-block
List all issues from all projects you have access to.
.prepend-top-default
= render 'shared/issues'
- page_title "Merge Requests"
- header_title "Merge Requests", merge_requests_dashboard_path(assignee_id: current_user.id)
.append-bottom-20
.project-issuable-filter
.controls
- if @projects.any? { |project| can?(current_user, :create_merge_request, project) }
.dropdown.inline
%button.dropdown-toggle.btn.btn-new{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-plus
New Merge Request
%b.caret
%ul.dropdown-menu.dropdown-menu-align-right
- @projects.each do |project|
- if can?(current_user, :create_merge_request, project)
%li
= link_to new_namespace_project_merge_request_path(project.namespace, project) do
= project.name_with_namespace
= render 'shared/issuable/filter', type: :merge_requests
= render 'shared/merge_requests'
.gray-content-block.second-block
List all merge requests from all projects you have access to.
.prepend-top-default
= render 'shared/merge_requests'
- page_title "Milestones"
- header_title "Milestones", dashboard_milestones_path
.project-issuable-filter
.controls
- if @projects.any? { |project| can?(current_user, :admin_milestone, project) }
.dropdown.inline
%button.dropdown-toggle.btn.btn-new{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-plus
New Milestone
%b.caret
%ul.dropdown-menu.dropdown-menu-align-right
- @projects.each do |project|
- if can?(current_user, :admin_milestone, project)
%li
= link_to new_namespace_project_milestone_path(project.namespace, project) do
= project.name_with_namespace
= render 'shared/milestones_filter'
= render 'shared/milestones_filter'
.gray-content-block
.oneline
List all milestones from all projects you have access to.
.milestones
......
......@@ -4,16 +4,30 @@
- if current_user
= auto_discovery_link_tag(:atom, issues_group_url(@group, format: :atom, private_token: current_user.private_token), title: "#{@group.name} issues")
= render 'shared/issuable/filter', type: :issues
.gray-content-block.second-block
.pull-right
.project-issuable-filter
.controls
.pull-left
- if current_user
.hidden-xs.pull-left
= link_to issues_group_url(@group, format: :atom, private_token: current_user.private_token) do
= link_to issues_group_url(@group, format: :atom, private_token: current_user.private_token), class: 'btn' do
%i.fa.fa-rss
%div
- if @projects.any? { |project| can?(current_user, :create_issue, project) }
.dropdown.inline.prepend-left-10
%button.dropdown-toggle.btn.btn-new{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-plus
New Issue
%b.caret
%ul.dropdown-menu.dropdown-menu-align-right
- @projects.each do |project|
- if can?(current_user, :create_issue, project)
%li
= link_to new_namespace_project_issue_path(project.namespace, project) do
= project.name_with_namespace
= render 'shared/issuable/filter', type: :issues
.gray-content-block.second-block
Only issues from
%strong #{@group.name}
group are listed here.
......
- page_title "Merge Requests"
- header_title group_title(@group, "Merge Requests", merge_requests_group_path(@group))
= render 'shared/issuable/filter', type: :merge_requests
.project-issuable-filter
.controls
- if @projects.any? { |project| can?(current_user, :create_merge_request, project) }
.dropdown.inline
%button.dropdown-toggle.btn.btn-new{type: 'button', 'data-toggle' => 'dropdown'}
%i.fa.fa-plus
New Merge Request
%b.caret
%ul.dropdown-menu.dropdown-menu-align-right
- @projects.each do |project|
- if can?(current_user, :create_merge_request, project)
%li
= link_to new_namespace_project_merge_request_path(project.namespace, project) do
= project.name_with_namespace
= render 'shared/issuable/filter', type: :merge_requests
.gray-content-block.second-block
%div
Only merge requests from
%strong #{@group.name}
group are listed here.
- if current_user
To see all merge requests you should visit #{link_to 'dashboard', merge_requests_dashboard_path} page.
.prepend-top-default
= render 'shared/merge_requests'
- page_title "Milestones"
- header_title group_title(@group, "Milestones", group_milestones_path(@group))
= render 'shared/milestones_filter'
.gray-content-block
.project-issuable-filter
.controls
- if can?(current_user, :admin_milestones, @group)
.pull-right
%span.pull-right.hidden-xs
= link_to new_group_milestone_path(@group), class: "btn btn-new" do
= icon('plus')
New Milestone
.oneline
= render 'shared/milestones_filter'
.gray-content-block
Only milestones from
%strong #{@group.name}
group are listed here.
.milestones
%ul.content-list
- if @milestones.blank?
......
- page_title "Milestones"
= render "header_title"
= render 'shared/milestones_filter'
.gray-content-block
.pull-right
- if can? current_user, :admin_milestone, @project
.project-issuable-filter
.controls
- if can?(current_user, :admin_milestone, @project)
= link_to new_namespace_project_milestone_path(@project.namespace, @project), class: "pull-right btn btn-new", title: "New Milestone" do
%i.fa.fa-plus
New Milestone
.oneline
= render 'shared/milestones_filter'
.gray-content-block
Milestone allows you to group issues and set due date for it
.milestones
......
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