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
.controls
.pull-left
- if current_user
.hidden-xs.pull-left
= link_to issues_dashboard_url(format: :atom, private_token: current_user.private_token), class: 'btn' do
%i.fa.fa-rss
.append-bottom-20 - if @projects.any? { |project| can?(current_user, :create_issue, project) }
.pull-right .dropdown.inline.prepend-left-10
- if current_user %button.dropdown-toggle.btn.btn-new{type: 'button', 'data-toggle' => 'dropdown'}
.hidden-xs.pull-left.prepend-top-20 %i.fa.fa-plus
= link_to issues_dashboard_url(format: :atom, private_token: current_user.private_token), class: '' do New Issue
%i.fa.fa-rss %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
%ul.content-list %ul.content-list
......
...@@ -4,21 +4,35 @@ ...@@ -4,21 +4,35 @@
- 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
.pull-left
- if current_user
.hidden-xs.pull-left
= link_to issues_group_url(@group, 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/issuable/filter', type: :issues
.gray-content-block.second-block .gray-content-block.second-block
.pull-right Only issues from
- if current_user %strong #{@group.name}
.hidden-xs.pull-left group are listed here.
= link_to issues_group_url(@group, format: :atom, private_token: current_user.private_token) do - if current_user
%i.fa.fa-rss To see all issues you should visit #{link_to 'dashboard', issues_dashboard_path} page.
%div
Only issues from
%strong #{@group.name}
group are listed here.
- if current_user
To see all issues you should visit #{link_to 'dashboard', issues_dashboard_path} page.
.prepend-top-default .prepend-top-default
= render 'shared/issues' = render 'shared/issues'
- 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
.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
= render 'shared/milestones_filter'
.gray-content-block .gray-content-block
- if can?(current_user, :admin_milestones, @group) Only milestones from
.pull-right %strong #{@group.name}
%span.pull-right.hidden-xs group are listed here.
= link_to new_group_milestone_path(@group), class: "btn btn-new" do
New Milestone
.oneline
Only milestones from
%strong #{@group.name}
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
Milestone allows you to group issues and set due date for it = render 'shared/milestones_filter'
.gray-content-block
Milestone allows you to group issues and set due date for it
.milestones .milestones
%ul.content-list %ul.content-list
......
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