diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-11-29 05:59:48 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-11-29 21:55:07 +0300 |
commit | 3e0651c7cd0c8dc402dc45387e08ae04731ab46c (patch) | |
tree | 626eeecf4d50614ec8aaaa06d2be97fe90ff3e2c /app/views/projects/generic_commit_statuses | |
parent | 086da9214d2bde1f652f197b0e130f60eef12c2e (diff) |
reorder generic commit status columns to match build status partial
Diffstat (limited to 'app/views/projects/generic_commit_statuses')
-rw-r--r-- | app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml index ceaab8c7d45..d9b34ba3c43 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml @@ -1,12 +1,12 @@ +- admin = local_assigns.fetch(:admin, false) - ref = local_assigns.fetch(:ref, nil) - commit_sha = local_assigns.fetch(:commit_sha, nil) - retried = local_assigns.fetch(:retried, false) - pipeline_link = local_assigns.fetch(:pipeline_link, false) - stage = local_assigns.fetch(:stage, false) - coverage = local_assigns.fetch(:coverage, false) -- runner = local_assigns.fetch(:runner, false) -%tr.generic_commit_status +%tr.generic_commit_status{class: ('retried' if retried)} %td.status - if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url = ci_status_with_icon(generic_commit_status.status, generic_commit_status.target_url) @@ -16,13 +16,34 @@ %td.generic_commit_status-link - if can?(current_user, :read_commit_status, generic_commit_status) && generic_commit_status.target_url = link_to generic_commit_status.target_url do - %strong ##{generic_commit_status.id} + %span.build-link ##{generic_commit_status.id} - else - %strong ##{generic_commit_status.id} + %span.build-link ##{generic_commit_status.id} + + - if ref + - if generic_commit_status.ref + .icon-container + = generic_commit_status.tags.any? ? icon('tag') : icon('code-fork') + = link_to generic_commit_status.ref, namespace_project_commits_path(generic_commit_status.project.namespace, generic_commit_status.project, generic_commit_status.ref) + - else + .light none + .icon-container.commit-icon + = custom_icon("icon_commit") + + - if commit_sha + = link_to generic_commit_status.short_sha, namespace_project_commit_path(generic_commit_status.project.namespace, generic_commit_status.project, generic_commit_status.sha), class: "commit-id monospace" - if retried = icon('warning', class: 'text-warning has-tooltip', title: 'Status was retried.') + .label-container + - if generic_commit_status.tags.any? + - generic_commit_status.tags.each do |tag| + %span.label.label-primary + = tag + - if retried + %span.label.label-warning retried + - if pipeline_link %td = link_to pipeline_path(generic_commit_status.pipeline) do @@ -33,18 +54,12 @@ - else %span.monospace API - - if commit_sha - %td - = link_to generic_commit_status.short_sha, namespace_project_commit_path(generic_commit_status.project.namespace, generic_commit_status.project, generic_commit_status.sha), class: "monospace" - - - if ref + - if admin %td - - if generic_commit_status.ref - = link_to generic_commit_status.ref, namespace_project_commits_path(generic_commit_status.project.namespace, generic_commit_status.project, generic_commit_status.ref) - - else - .light none + - if generic_commit_status.project + = link_to generic_commit_status.project.name_with_namespace, admin_namespace_project_path(generic_commit_status.project.namespace, generic_commit_status.project) - - if runner + - if admin %td - if generic_commit_status.try(:runner) = runner_link(generic_commit_status.runner) @@ -58,14 +73,6 @@ %td = generic_commit_status.name - %td - - if generic_commit_status.tags.any? - - generic_commit_status.tags.each do |tag| - %span.label.label-primary - = tag - - if retried - %span.label.label-warning retried - %td.duration - if generic_commit_status.duration = icon("clock-o") |