diff options
Diffstat (limited to 'app/views/shared/projects/_project.html.haml')
-rw-r--r-- | app/views/shared/projects/_project.html.haml | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 2adc7844a67..79a33316b1a 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -12,10 +12,9 @@ - cache_key = project_list_cache_key(project, pipeline_status: pipeline_status) - updated_tooltip = time_ago_with_tooltip(project.last_activity_date) - show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) -- last_pipeline = project.last_pipeline if show_pipeline_status_icon +- last_pipeline = last_pipeline_from_status_cache(project) if show_pipeline_status_icon - css_controls_class = "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present? -- css_controls_container_class = compact_mode ? "" : "gl-lg-flex-direction-row gl-justify-content-space-between" -- css_metadata_classes = "gl-display-flex gl-align-items-center gl-mr-5 gl-reset-color! icon-wrapper has-tooltip" +- css_metadata_classes = "gl-display-flex gl-align-items-center gl-ml-5 gl-reset-color! icon-wrapper has-tooltip" %li.project-row = cache(cache_key) do @@ -28,7 +27,7 @@ = render Pajamas::AvatarComponent.new(project, size: 48, alt: '', class: 'gl-mr-5') .project-cell{ class: css_class } .project-details.gl-pr-9.gl-sm-pr-0.gl-w-full.gl-display-flex.gl-flex-direction-column{ data: { qa_selector: 'project_content', qa_project_name: project.name } } - .gl-display-flex.gl-align-items-center.gl-flex-wrap-wrap + .gl-display-flex.gl-align-items-center.gl-flex-wrap %h2.gl-font-base.gl-line-height-20.gl-my-0 = link_to project_path(project), class: 'text-plain gl-mr-3 js-prefetch-document' do %span.namespace-name.gl-font-weight-normal @@ -55,10 +54,10 @@ = render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: project, additional_classes: 'gl-ml-3!' - if show_last_commit_as_description - .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2 + .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2.gl-font-sm = link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message") - elsif project.description.present? - .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2 + .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2.gl-font-sm = markdown_field(project, :description) - if project.topics.any? @@ -71,7 +70,7 @@ .controls.gl-display-flex.gl-align-items-center - if show_pipeline_status_icon && last_pipeline.present? - pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref) - %span.icon-wrapper.pipeline-status.gl-mr-5 + %span.icon-wrapper.pipeline-status = render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path = render_if_exists 'shared/projects/archived', project: project @@ -79,17 +78,17 @@ = link_to project_starrers_path(project), class: "#{css_metadata_classes} stars", title: _('Stars'), data: { container: 'body', placement: 'top' } do = sprite_icon('star-o', size: 14, css_class: 'gl-mr-2') = badge_count(project.star_count) - .updated-note.gl-ml-3.gl-sm-ml-0 + .updated-note.gl-font-sm.gl-ml-3.gl-sm-ml-0 %span = _('Updated') = updated_tooltip .project-cell{ class: "#{css_class} gl-xs-display-none!" } - .project-controls.gl-display-flex.gl-flex-direction-column.gl-w-full{ class: css_controls_container_class, data: { testid: 'project_controls'} } - .controls.gl-display-flex.gl-align-items-center{ class: css_controls_class } + .project-controls.gl-display-flex.gl-flex-direction-column.gl-align-items-flex-end.gl-w-full{ data: { testid: 'project_controls'} } + .controls.gl-display-flex.gl-align-items-center.gl-mb-2{ class: "#{css_controls_class} gl-pr-0!" } - if show_pipeline_status_icon && last_pipeline.present? - pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref) - %span.icon-wrapper.pipeline-status.gl-mr-5 + %span.icon-wrapper.pipeline-status = render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path = render_if_exists 'shared/projects/archived', project: project @@ -109,7 +108,7 @@ = link_to project_issues_path(project), class: "#{css_metadata_classes} issues", title: _('Issues'), data: { container: 'body', placement: 'top' } do = sprite_icon('issues', size: 14, css_class: 'gl-mr-2') = badge_count(project.open_issues_count) - .updated-note.gl-white-space-nowrap.gl-justify-content-end + .updated-note.gl-font-sm.gl-white-space-nowrap.gl-justify-content-end %span = _('Updated') = updated_tooltip |