2015-09-25 12:07:36 +05:30
|
|
|
- avatar = true unless local_assigns[:avatar] == false
|
|
|
|
- stars = true unless local_assigns[:stars] == false
|
2019-02-15 15:39:39 +05:30
|
|
|
- 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-24 18:46:33 +05:30
|
|
|
- skip_namespace = false unless local_assigns[:skip_namespace] == true
|
2018-11-08 19:23:39 +05:30
|
|
|
- access = max_project_member_access(project)
|
2019-02-15 15:39:39 +05:30
|
|
|
- compact_mode = false unless local_assigns[:compact_mode] == true
|
2018-03-27 19:54:05 +05:30
|
|
|
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && can_show_last_commit_in_list?(project)
|
2019-02-15 15:39:39 +05:30
|
|
|
- css_class = '' unless local_assigns[:css_class]
|
2016-04-02 18:10:28 +05:30
|
|
|
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
|
2017-08-17 22:00:37 +05:30
|
|
|
- cache_key = project_list_cache_key(project)
|
2017-09-10 17:25:29 +05:30
|
|
|
- updated_tooltip = time_ago_with_tooltip(project.last_activity_date)
|
2019-03-02 22:35:43 +05:30
|
|
|
- css_controls_class = compact_mode ? "" : "flex-lg-row justify-content-lg-between"
|
2016-01-14 18:37:52 +05:30
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
%li.project-row.d-flex{ class: css_class }
|
2016-01-14 18:37:52 +05:30
|
|
|
= cache(cache_key) do
|
2017-08-17 22:00:37 +05:30
|
|
|
- if avatar
|
2019-03-02 22:35:43 +05:30
|
|
|
.avatar-container.s48.flex-grow-0.flex-shrink-0
|
2017-08-17 22:00:37 +05:30
|
|
|
= link_to project_path(project), class: dom_class(project) do
|
2017-09-10 17:25:29 +05:30
|
|
|
- if project.creator && use_creator_avatar
|
2019-03-02 22:35:43 +05:30
|
|
|
= image_tag avatar_icon_for_user(project.creator, 48), class: "avatar s65", alt:''
|
2017-08-17 22:00:37 +05:30
|
|
|
- else
|
2019-03-02 22:35:43 +05:30
|
|
|
= project_icon(project, alt: '', class: 'avatar project-avatar s48', width: 48, height: 48)
|
|
|
|
.project-details.d-sm-flex.flex-sm-fill.align-items-center
|
|
|
|
.flex-wrapper
|
|
|
|
.d-flex.align-items-center.flex-wrap.project-title
|
2019-02-15 15:39:39 +05:30
|
|
|
%h2.d-flex.prepend-top-8
|
|
|
|
= link_to project_path(project), class: 'text-plain' do
|
|
|
|
%span.project-full-name.append-right-8><
|
|
|
|
%span.namespace-name
|
|
|
|
- if project.namespace && !skip_namespace
|
|
|
|
= project.namespace.human_name
|
|
|
|
\/
|
|
|
|
%span.project-name<
|
|
|
|
= project.name
|
|
|
|
|
|
|
|
%span.metadata-info.visibility-icon.append-right-10.prepend-top-8.has-tooltip{ data: { container: 'body', placement: 'top' }, title: visibility_icon_description(project) }
|
|
|
|
= visibility_level_icon(project.visibility_level, fw: true)
|
|
|
|
|
|
|
|
- if explore_projects_tab? && project.repository.license
|
|
|
|
%span.metadata-info.d-inline-flex.align-items-center.append-right-10.prepend-top-8
|
|
|
|
= sprite_icon('scale', size: 14, css_class: 'append-right-4')
|
|
|
|
= project.repository.license.name
|
|
|
|
|
|
|
|
- if !explore_projects_tab? && access&.nonzero?
|
|
|
|
-# haml-lint:disable UnnecessaryStringOutput
|
|
|
|
= ' ' # prevent haml from eating the space between elements
|
|
|
|
.metadata-info.prepend-top-8
|
|
|
|
%span.user-access-role.d-block= Gitlab::Access.human_access(access)
|
|
|
|
|
|
|
|
- if show_last_commit_as_description
|
2019-03-02 22:35:43 +05:30
|
|
|
.description.d-none.d-sm-block.append-right-default
|
2019-02-15 15:39:39 +05:30
|
|
|
= link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message")
|
|
|
|
- elsif project.description.present?
|
2019-03-02 22:35:43 +05:30
|
|
|
.description.d-none.d-sm-block.append-right-default
|
2019-02-15 15:39:39 +05:30
|
|
|
= markdown_field(project, :description)
|
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
.controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0{ class: css_controls_class }
|
2019-02-15 15:39:39 +05:30
|
|
|
.icon-container.d-flex.align-items-center
|
|
|
|
- if project.archived
|
|
|
|
%span.d-flex.icon-wrapper.badge.badge-warning archived
|
|
|
|
- if stars
|
|
|
|
%span.d-flex.align-items-center.icon-wrapper.stars.has-tooltip{ data: { container: 'body', placement: 'top' }, title: _('Stars') }
|
|
|
|
= sprite_icon('star', size: 14, css_class: 'append-right-4')
|
|
|
|
= 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
|
|
|
|
= sprite_icon('fork', size: 14, css_class: 'append-right-4')
|
|
|
|
= number_with_delimiter(project.forks_count)
|
|
|
|
- if show_merge_request_count?(disabled: !merge_requests, compact_mode: compact_mode)
|
|
|
|
= link_to project_merge_requests_path(project),
|
2019-03-02 22:35:43 +05:30
|
|
|
class: "d-none d-xl-flex align-items-center icon-wrapper merge-requests has-tooltip",
|
2019-02-15 15:39:39 +05:30
|
|
|
title: _('Merge Requests'), data: { container: 'body', placement: 'top' } do
|
|
|
|
= sprite_icon('git-merge', size: 14, css_class: 'append-right-4')
|
|
|
|
= number_with_delimiter(project.open_merge_requests_count)
|
|
|
|
- if show_issue_count?(disabled: !issues, compact_mode: compact_mode)
|
|
|
|
= link_to project_issues_path(project),
|
2019-03-02 22:35:43 +05:30
|
|
|
class: "d-none d-xl-flex align-items-center icon-wrapper issues has-tooltip",
|
2019-02-15 15:39:39 +05:30
|
|
|
title: _('Issues'), data: { container: 'body', placement: 'top' } do
|
|
|
|
= sprite_icon('issues', size: 14, css_class: 'append-right-4')
|
|
|
|
= number_with_delimiter(project.open_issues_count)
|
|
|
|
- if pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project)
|
|
|
|
%span.icon-wrapper.pipeline-status
|
|
|
|
= render_project_pipeline_status(project.pipeline_status, tooltip_placement: 'top')
|
|
|
|
.updated-note
|
|
|
|
%span Updated #{updated_tooltip}
|