Dont set @project variable in list. Remove a bit of duplication in dash and group
This commit is contained in:
parent
f716c0a1dd
commit
23e338852c
|
@ -12,9 +12,9 @@
|
|||
- if @issues.any?
|
||||
- @issues.group_by(&:project).each do |group|
|
||||
%div.ui-box
|
||||
- @project = group[0]
|
||||
- project = group[0]
|
||||
%h5.title
|
||||
= link_to_project @project
|
||||
= link_to_project project
|
||||
%ul.well-list.issues_table
|
||||
- group[1].each do |issue|
|
||||
= render(partial: 'issues/show', locals: {issue: issue})
|
||||
|
|
|
@ -8,17 +8,4 @@
|
|||
.span3
|
||||
= render 'filter', entity: 'merge_request'
|
||||
.span9
|
||||
- if @merge_requests.any?
|
||||
- @merge_requests.group_by(&:project).each do |group|
|
||||
.ui-box
|
||||
- @project = group[0]
|
||||
%h5.title
|
||||
= link_to_project @project
|
||||
%ul.well-list
|
||||
- group[1].each do |merge_request|
|
||||
= render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
|
||||
%hr
|
||||
= paginate @merge_requests, theme: "gitlab"
|
||||
|
||||
- else
|
||||
%h3.nothing_here_message Nothing to show here
|
||||
= render 'shared/merge_requests'
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
- if @issues.any?
|
||||
- @issues.group_by(&:project).each do |group|
|
||||
%div.ui-box
|
||||
- @project = group[0]
|
||||
- project = group[0]
|
||||
%h5.title
|
||||
= link_to_project @project
|
||||
= link_to_project project
|
||||
%ul.well-list.issues_table
|
||||
- group[1].each do |issue|
|
||||
= render(partial: 'issues/show', locals: {issue: issue})
|
||||
|
|
|
@ -8,17 +8,4 @@
|
|||
.span3
|
||||
= render 'filter', entity: 'merge_request'
|
||||
.span9
|
||||
- if @merge_requests.any?
|
||||
- @merge_requests.group_by(&:project).each do |group|
|
||||
.ui-box
|
||||
- @project = group[0]
|
||||
%h5.title
|
||||
= link_to_project @project
|
||||
%ul.well-list
|
||||
- group[1].each do |merge_request|
|
||||
= render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
|
||||
%hr
|
||||
= paginate @merge_requests, theme: "gitlab"
|
||||
|
||||
- else
|
||||
%h3.nothing_here_message Nothing to show here
|
||||
= render 'shared/merge_requests'
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
.input-prepend.project_clone_holder
|
||||
%button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH
|
||||
%button{class: "btn", :"data-clone" => @project.http_url_to_repo}= Gitlab.config.gitlab.protocol.upcase
|
||||
|
||||
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select input-xxlarge"
|
||||
|
|
14
app/views/shared/_merge_requests.html.haml
Normal file
14
app/views/shared/_merge_requests.html.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- if @merge_requests.any?
|
||||
- @merge_requests.group_by(&:project).each do |group|
|
||||
.ui-box
|
||||
- project = group[0]
|
||||
%h5.title
|
||||
= link_to_project project
|
||||
%ul.well-list
|
||||
- group[1].each do |merge_request|
|
||||
= render(partial: 'merge_requests/merge_request', locals: {merge_request: merge_request})
|
||||
%hr
|
||||
= paginate @merge_requests, theme: "gitlab"
|
||||
|
||||
- else
|
||||
%h3.nothing_here_message Nothing to show here
|
Loading…
Reference in a new issue