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