diff options
-rw-r--r-- | app/views/dashboard/issues.html.haml | 4 | ||||
-rw-r--r-- | app/views/dashboard/merge_requests.html.haml | 15 | ||||
-rw-r--r-- | app/views/groups/issues.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/merge_requests.html.haml | 15 | ||||
-rw-r--r-- | app/views/shared/_clone_panel.html.haml | 1 | ||||
-rw-r--r-- | app/views/shared/_merge_requests.html.haml | 14 |
6 files changed, 21 insertions, 32 deletions
diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index 68e3b3dcaf5..307d0d85ea3 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -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}) diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index c5245da731a..0c4d6e0aadf 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -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' diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index ffca2dc75ea..9e8642f3b2c 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -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}) diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index c5245da731a..0c4d6e0aadf 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -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' diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml index e283d9b3085..7b5de4a6274 100644 --- a/app/views/shared/_clone_panel.html.haml +++ b/app/views/shared/_clone_panel.html.haml @@ -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" diff --git a/app/views/shared/_merge_requests.html.haml b/app/views/shared/_merge_requests.html.haml new file mode 100644 index 00000000000..85391a34316 --- /dev/null +++ b/app/views/shared/_merge_requests.html.haml @@ -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 |