summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-24 13:09:31 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-24 13:09:31 +0000
commit6a32608989a410ca60c3c1ed0fddeb6c0aaffcce (patch)
tree280f42e1f77712113a7453ed74d3bc8b9ec068f6 /app
parent3e866b2aa6d95008894910342d4cbedc8308ef2a (diff)
parent353d426e4e68006ba8cea90e2f6ad4e8956cb6a9 (diff)
downloadgitlab-ce-6a32608989a410ca60c3c1ed0fddeb6c0aaffcce.tar.gz
Merge branch 'ci-status-projects-page' into 'master'
Show CI status on Your projects page and Starred projects page Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Part of #2594 Screenshot: ![Screenshot_2015-09-24_13.42.52](https://gitlab.com/gitlab-org/gitlab-ce/uploads/0516ea02b72457a431bd72d3f6619dfe/Screenshot_2015-09-24_13.42.52.png) See merge request !1420
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/pages/projects.scss8
-rw-r--r--app/views/dashboard/projects/_projects.html.haml2
-rw-r--r--app/views/shared/projects/_list.html.haml3
-rw-r--r--app/views/shared/projects/_project.html.haml13
4 files changed, 21 insertions, 5 deletions
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index a986fafff07..8d75f3aad49 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -297,9 +297,15 @@ pre.light-well {
color: #4c4e54;
}
- .pull-right.light {
+ .project-controls {
+ float: right;
+ color: $gl-gray;
line-height: 45px;
color: #7f8fa4;
+
+ a:hover {
+ text-decoration: none;
+ }
}
.project-description {
diff --git a/app/views/dashboard/projects/_projects.html.haml b/app/views/dashboard/projects/_projects.html.haml
index ef9b9ce756a..c8c315c73d8 100644
--- a/app/views/dashboard/projects/_projects.html.haml
+++ b/app/views/dashboard/projects/_projects.html.haml
@@ -7,4 +7,4 @@
= link_to new_project_path, class: 'btn btn-success' do
New project
- = render 'shared/projects/list', projects: @projects
+ = render 'shared/projects/list', projects: @projects, ci: true
diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml
index 330b0626d63..16e1d8421de 100644
--- a/app/views/shared/projects/_list.html.haml
+++ b/app/views/shared/projects/_list.html.haml
@@ -1,12 +1,13 @@
- projects_limit = 20 unless local_assigns[:projects_limit]
- avatar = true unless local_assigns[:avatar] == false
- stars = true unless local_assigns[:stars] == false
+- ci = false unless local_assigns[:ci] == true
%ul.projects-list
- projects.each_with_index do |project, i|
- css_class = (i >= projects_limit) ? 'hide' : nil
= render "shared/projects/project", project: project,
- avatar: avatar, stars: stars, css_class: css_class
+ avatar: avatar, stars: stars, css_class: css_class, ci: ci
- if projects.size > projects_limit
%li.bottom.center
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index 5318c6011f4..1c529c91c51 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -1,9 +1,10 @@
- avatar = true unless local_assigns[:avatar] == false
- stars = true unless local_assigns[:stars] == false
+- ci = false unless local_assigns[:ci] == true
- css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" unless project.description.present?
%li.project-row{ class: css_class }
- = cache [project.namespace, project, controller.controller_name, controller.action_name, 'v2.1'] do
+ = cache [project.namespace, project, controller.controller_name, controller.action_name, 'v2.2'] do
= link_to project_path(project), class: dom_class(project) do
- if avatar
.dash-project-avatar
@@ -15,8 +16,16 @@
\/
%span.project-name.filter-title
= project.name
+
+ .project-controls
+ - if ci && !project.empty_repo?
+ - if ci_commit = project.ci_commit(project.commit.sha)
+ = link_to ci_status_path(ci_commit), class: "c#{ci_status_color(ci_commit)}",
+ title: "Build status: #{ci_commit.status}", data: {toggle: 'tooltip', placement: 'left'} do
+ = ci_status_icon(ci_commit)
+ &nbsp;
- if stars
- %span.pull-right.light
+ %span
%i.fa.fa-star
= project.star_count
- if project.description.present?