summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-10-14 14:20:27 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-10-14 17:28:38 +0200
commit4d69c6a3361bbc673e853995e3896d31241aa748 (patch)
tree95e0da6e1fbfd400f8e1d27526ee11e7f3c2da6c /app/views/projects
parent09255eecd0812d35b09613a1cf2402d3108fcc49 (diff)
downloadgitlab-ce-4d69c6a3361bbc673e853995e3896d31241aa748.tar.gz
Refactor builds view
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/builds/_build.html.haml6
-rw-r--r--app/views/projects/builds/index.html.haml43
2 files changed, 24 insertions, 25 deletions
diff --git a/app/views/projects/builds/_build.html.haml b/app/views/projects/builds/_build.html.haml
index 10b3ef71202..e74a3a62672 100644
--- a/app/views/projects/builds/_build.html.haml
+++ b/app/views/projects/builds/_build.html.haml
@@ -10,12 +10,10 @@
%strong Build ##{build.id}
%td
- = link_to namespace_project_commit_path(@project.namespace, @project, build.sha) do
- = build.short_sha
+ = link_to build.short_sha, namespace_project_commit_path(@project.namespace, @project, build.sha)
%td
- = link_to namespace_project_commits_path(@project.namespace, @project, build.ref) do
- = build.ref
+ = link_to build.ref, namespace_project_commits_path(@project.namespace, @project, build.ref)
%td
- if build.runner
diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml
index 2c6cf69c23e..56bb7b11177 100644
--- a/app/views/projects/builds/index.html.haml
+++ b/app/views/projects/builds/index.html.haml
@@ -1,31 +1,32 @@
- page_title "Builds"
- header_title project_title(@project, "Builds", project_builds_path(@project))
-%ul.center-top-menu
- %li{class: ('active' if @scope.nil?)}
- = link_to project_builds_path(@project) do
- All builds
- %span.badge.js-totalbuilds-count= @all_builds.size
-
- %li{class: ('active' if @scope == 'pending')}
- = link_to project_builds_path(@project, scope: :pending) do
- Pending
- %span.badge.js-pending-count= @all_builds.pending.size
-
- %li{class: ('active' if @scope == 'running')}
- = link_to project_builds_path(@project, scope: :running) do
- Running
- %span.badge.js-running-count= @all_builds.running.size
-
-.gray-content-block
- .oneline
- List of all builds from this project
-
+.project-issuable-filter
+ .controls
- if @ci_project && current_user && can?(current_user, :manage_builds, @project)
- .pull-right
+ .pull-left.hidden-xs
- if @all_builds.running_or_pending.any?
= link_to 'Cancel all', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, method: :post, class: 'btn btn-danger'
+ %ul.center-top-menu
+ %li{class: ('active' if @scope.nil?)}
+ = link_to project_builds_path(@project) do
+ Running
+ %span.badge.js-running-count= @all_builds.running_or_pending.size
+
+ %li{class: ('active' if @scope == 'finished')}
+ = link_to project_builds_path(@project, scope: :finished) do
+ Finished
+ %span.badge.js-running-count= @all_builds.finished.size
+
+ %li{class: ('active' if @scope == 'all')}
+ = link_to project_builds_path(@project, scope: :all) do
+ All
+ %span.badge.js-totalbuilds-count= @all_builds.size
+
+.gray-content-block
+ List of #{@scope || 'running'} builds from this project
+
%ul.content-list
- if @builds.blank?
%li