Commit 23e33885 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Dont set @project variable in list. Remove a bit of duplication in dash and group

parent f716c0a1
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
- if @issues.any? - if @issues.any?
- @issues.group_by(&:project).each do |group| - @issues.group_by(&:project).each do |group|
%div.ui-box %div.ui-box
- @project = group[0] - project = group[0]
%h5.title %h5.title
= link_to_project @project = link_to_project project
%ul.well-list.issues_table %ul.well-list.issues_table
- group[1].each do |issue| - group[1].each do |issue|
= render(partial: 'issues/show', locals: {issue: issue}) = render(partial: 'issues/show', locals: {issue: issue})
......
...@@ -8,17 +8,4 @@ ...@@ -8,17 +8,4 @@
.span3 .span3
= render 'filter', entity: 'merge_request' = render 'filter', entity: 'merge_request'
.span9 .span9
- if @merge_requests.any? = render 'shared/merge_requests'
- @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
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
- if @issues.any? - if @issues.any?
- @issues.group_by(&:project).each do |group| - @issues.group_by(&:project).each do |group|
%div.ui-box %div.ui-box
- @project = group[0] - project = group[0]
%h5.title %h5.title
= link_to_project @project = link_to_project project
%ul.well-list.issues_table %ul.well-list.issues_table
- group[1].each do |issue| - group[1].each do |issue|
= render(partial: 'issues/show', locals: {issue: issue}) = render(partial: 'issues/show', locals: {issue: issue})
......
...@@ -8,17 +8,4 @@ ...@@ -8,17 +8,4 @@
.span3 .span3
= render 'filter', entity: 'merge_request' = render 'filter', entity: 'merge_request'
.span9 .span9
- if @merge_requests.any? = render 'shared/merge_requests'
- @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
.input-prepend.project_clone_holder .input-prepend.project_clone_holder
%button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH %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 %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" = text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select input-xxlarge"
- 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
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