2015-08-26 16:44:02 -04:00
|
|
|
- avatar = true unless local_assigns[:avatar] == false
|
|
|
|
- stars = true unless local_assigns[:stars] == false
|
2018-12-13 07:37:54 -05:00
|
|
|
- forks = true unless local_assigns[:forks] == false
|
|
|
|
- merge_requests = true unless local_assigns[:merge_requests] == false
|
|
|
|
- issues = true unless local_assigns[:issues] == false
|
|
|
|
- pipeline_status = true unless local_assigns[:pipeline_status] == false
|
2015-10-09 12:35:09 -04:00
|
|
|
- skip_namespace = false unless local_assigns[:skip_namespace] == true
|
2018-07-06 03:51:31 -04:00
|
|
|
- access = max_project_member_access(project)
|
2018-12-13 07:37:54 -05:00
|
|
|
- compact_mode = false unless local_assigns[:compact_mode] == true
|
2017-12-11 09:21:06 -05:00
|
|
|
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && can_show_last_commit_in_list?(project)
|
2018-12-13 07:37:54 -05:00
|
|
|
- css_class = '' unless local_assigns[:css_class]
|
2016-01-12 20:07:59 -05:00
|
|
|
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
|
2019-03-19 15:56:03 -04:00
|
|
|
- cache_key = project_list_cache_key(project, pipeline_status: pipeline_status)
|
2017-06-26 01:42:44 -04:00
|
|
|
- updated_tooltip = time_ago_with_tooltip(project.last_activity_date)
|
2020-07-01 17:08:51 -04:00
|
|
|
- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) && project.last_pipeline.present?
|
2019-10-01 08:05:59 -04:00
|
|
|
- css_controls_class = compact_mode ? [] : ["flex-lg-row", "justify-content-lg-between"]
|
2020-03-04 04:08:20 -05:00
|
|
|
- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon
|
2019-02-25 08:00:05 -05:00
|
|
|
- avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar'
|
2016-01-08 18:47:25 -05:00
|
|
|
|
2018-12-13 07:37:54 -05:00
|
|
|
%li.project-row.d-flex{ class: css_class }
|
2016-01-08 18:47:25 -05:00
|
|
|
= cache(cache_key) do
|
2017-03-23 06:36:17 -04:00
|
|
|
- if avatar
|
2019-02-25 08:00:05 -05:00
|
|
|
.avatar-container.s48.flex-grow-0.flex-shrink-0{ class: avatar_container_class }
|
2017-04-19 04:05:48 -04:00
|
|
|
= link_to project_path(project), class: dom_class(project) do
|
2017-07-28 11:23:40 -04:00
|
|
|
- if project.creator && use_creator_avatar
|
2019-02-25 08:00:05 -05:00
|
|
|
= image_tag avatar_icon_for_user(project.creator, 48), class: "avatar s48", alt:''
|
2017-04-19 04:05:48 -04:00
|
|
|
- else
|
2019-02-07 05:07:49 -05:00
|
|
|
= project_icon(project, alt: '', class: 'avatar project-avatar s48', width: 48, height: 48)
|
2020-07-22 11:09:28 -04:00
|
|
|
.project-details.d-sm-flex.flex-sm-fill.align-items-center{ data: { qa_selector: 'project_content', qa_project_name: project.name } }
|
2019-02-07 05:07:49 -05:00
|
|
|
.flex-wrapper
|
|
|
|
.d-flex.align-items-center.flex-wrap.project-title
|
2020-05-27 20:08:37 -04:00
|
|
|
%h2.d-flex.gl-mt-3
|
2018-12-13 07:37:54 -05:00
|
|
|
= link_to project_path(project), class: 'text-plain' do
|
2020-06-01 11:08:16 -04:00
|
|
|
%span.project-full-name.gl-mr-3><
|
2018-12-13 07:37:54 -05:00
|
|
|
%span.namespace-name
|
|
|
|
- if project.namespace && !skip_namespace
|
|
|
|
= project.namespace.human_name
|
|
|
|
\/
|
|
|
|
%span.project-name<
|
|
|
|
= project.name
|
|
|
|
|
2020-07-15 05:09:34 -04:00
|
|
|
%span.metadata-info.visibility-icon.gl-mr-3.gl-mt-3.text-secondary.has-tooltip{ data: { container: 'body', placement: 'top' }, title: visibility_icon_description(project) }
|
2020-07-22 20:09:43 -04:00
|
|
|
= visibility_level_icon(project.visibility_level)
|
2018-12-13 07:37:54 -05:00
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
- if explore_projects_tab? && project_license_name(project)
|
2020-07-15 05:09:34 -04:00
|
|
|
%span.metadata-info.d-inline-flex.align-items-center.gl-mr-3.gl-mt-3
|
2020-06-24 14:09:03 -04:00
|
|
|
= sprite_icon('scale', size: 14, css_class: 'gl-mr-2')
|
|
|
|
= project_license_name(project)
|
2018-12-13 07:37:54 -05:00
|
|
|
|
|
|
|
- if !explore_projects_tab? && access&.nonzero?
|
|
|
|
-# haml-lint:disable UnnecessaryStringOutput
|
|
|
|
= ' ' # prevent haml from eating the space between elements
|
2020-05-27 20:08:37 -04:00
|
|
|
.metadata-info.gl-mt-3
|
2020-07-22 11:09:28 -04:00
|
|
|
%span.user-access-role.d-block{ data: { qa_selector: 'user_role_content' } }= Gitlab::Access.human_access(access)
|
2018-12-13 07:37:54 -05:00
|
|
|
|
2020-04-21 11:21:10 -04:00
|
|
|
- if !explore_projects_tab?
|
2020-05-27 20:08:37 -04:00
|
|
|
.metadata-info.gl-mt-3
|
2020-04-21 11:21:10 -04:00
|
|
|
= render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: project
|
|
|
|
|
2018-12-13 07:37:54 -05:00
|
|
|
- if show_last_commit_as_description
|
2020-07-07 11:08:49 -04:00
|
|
|
.description.d-none.d-sm-block.gl-mr-3
|
2018-12-13 07:37:54 -05:00
|
|
|
= link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message")
|
|
|
|
- elsif project.description.present?
|
2020-07-07 11:08:49 -04:00
|
|
|
.description.d-none.d-sm-block.gl-mr-3
|
2018-12-13 07:37:54 -05:00
|
|
|
= markdown_field(project, :description)
|
|
|
|
|
2019-10-01 08:05:59 -04:00
|
|
|
.controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class.join(" ") }
|
2018-12-13 07:37:54 -05:00
|
|
|
.icon-container.d-flex.align-items-center
|
2020-03-04 04:08:20 -05:00
|
|
|
- if show_pipeline_status_icon
|
|
|
|
- pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref)
|
|
|
|
%span.icon-wrapper.pipeline-status
|
|
|
|
= render 'ci/status/icon', status: project.last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path
|
|
|
|
|
2019-12-17 10:08:15 -05:00
|
|
|
= render_if_exists 'shared/projects/archived', project: project
|
2018-12-13 07:37:54 -05:00
|
|
|
- if stars
|
2019-01-26 05:44:49 -05:00
|
|
|
= link_to project_starrers_path(project),
|
|
|
|
class: "d-flex align-items-center icon-wrapper stars has-tooltip",
|
|
|
|
title: _('Stars'), data: { container: 'body', placement: 'top' } do
|
2020-06-24 14:09:03 -04:00
|
|
|
= sprite_icon('star', size: 14, css_class: 'gl-mr-2')
|
2018-12-13 07:37:54 -05:00
|
|
|
= number_with_delimiter(project.star_count)
|
|
|
|
- if forks
|
|
|
|
= link_to project_forks_path(project),
|
|
|
|
class: "align-items-center icon-wrapper forks has-tooltip",
|
|
|
|
title: _('Forks'), data: { container: 'body', placement: 'top' } do
|
2020-06-24 14:09:03 -04:00
|
|
|
= sprite_icon('fork', size: 14, css_class: 'gl-mr-2')
|
2018-12-13 07:37:54 -05:00
|
|
|
= number_with_delimiter(project.forks_count)
|
2018-12-19 14:37:08 -05:00
|
|
|
- if show_merge_request_count?(disabled: !merge_requests, compact_mode: compact_mode)
|
2018-12-13 07:37:54 -05:00
|
|
|
= link_to project_merge_requests_path(project),
|
2019-02-07 05:07:49 -05:00
|
|
|
class: "d-none d-xl-flex align-items-center icon-wrapper merge-requests has-tooltip",
|
2018-12-13 07:37:54 -05:00
|
|
|
title: _('Merge Requests'), data: { container: 'body', placement: 'top' } do
|
2020-06-24 14:09:03 -04:00
|
|
|
= sprite_icon('git-merge', size: 14, css_class: 'gl-mr-2')
|
2018-12-13 07:37:54 -05:00
|
|
|
= number_with_delimiter(project.open_merge_requests_count)
|
2018-12-19 14:37:08 -05:00
|
|
|
- if show_issue_count?(disabled: !issues, compact_mode: compact_mode)
|
2018-12-13 07:37:54 -05:00
|
|
|
= link_to project_issues_path(project),
|
2019-02-07 05:07:49 -05:00
|
|
|
class: "d-none d-xl-flex align-items-center icon-wrapper issues has-tooltip",
|
2018-12-13 07:37:54 -05:00
|
|
|
title: _('Issues'), data: { container: 'body', placement: 'top' } do
|
2020-06-24 14:09:03 -04:00
|
|
|
= sprite_icon('issues', size: 14, css_class: 'gl-mr-2')
|
2018-12-13 07:37:54 -05:00
|
|
|
= number_with_delimiter(project.open_issues_count)
|
|
|
|
.updated-note
|
2019-07-24 18:39:30 -04:00
|
|
|
%span
|
|
|
|
= _('Updated')
|
|
|
|
= updated_tooltip
|