64 lines
3 KiB
Text
64 lines
3 KiB
Text
- avatar = true unless local_assigns[:avatar] == false
|
|
- stars = true unless local_assigns[:stars] == false
|
|
- forks = false unless local_assigns[:forks] == true
|
|
- ci = false unless local_assigns[:ci] == true
|
|
- skip_namespace = false unless local_assigns[:skip_namespace] == true
|
|
- user = local_assigns[:user]
|
|
- access = user&.max_member_access_for_project(project.id) unless user.nil?
|
|
- css_class = '' unless local_assigns[:css_class]
|
|
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && can_show_last_commit_in_list?(project)
|
|
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
|
|
- cache_key = project_list_cache_key(project)
|
|
- updated_tooltip = time_ago_with_tooltip(project.last_activity_date)
|
|
|
|
%li.project-row{ class: css_class }
|
|
= cache(cache_key) do
|
|
- if avatar
|
|
.avatar-container.s40
|
|
= link_to project_path(project), class: dom_class(project) do
|
|
- if project.creator && use_creator_avatar
|
|
= image_tag avatar_icon_for_user(project.creator, 40), class: "avatar s40", alt:''
|
|
- else
|
|
= project_icon(project, alt: '', class: 'avatar project-avatar s40')
|
|
.project-details
|
|
%h3.prepend-top-0.append-bottom-0
|
|
= link_to project_path(project), class: 'text-plain' do
|
|
%span.project-full-name><
|
|
%span.namespace-name
|
|
- if project.namespace && !skip_namespace
|
|
= project.namespace.human_name
|
|
\/
|
|
%span.project-name<
|
|
= project.name
|
|
|
|
- if access&.nonzero?
|
|
-# haml-lint:disable UnnecessaryStringOutput
|
|
= ' ' # prevent haml from eating the space between elements
|
|
%span.user-access-role= Gitlab::Access.human_access(access)
|
|
|
|
- if show_last_commit_as_description
|
|
.description.prepend-top-5
|
|
= link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message")
|
|
- elsif project.description.present?
|
|
.description.prepend-top-5
|
|
= markdown_field(project, :description)
|
|
|
|
.controls
|
|
.prepend-top-0
|
|
- if project.archived
|
|
%span.prepend-left-10.label.label-warning archived
|
|
- if can?(current_user, :read_cross_project) && project.pipeline_status.has_status?
|
|
%span.prepend-left-10
|
|
= render_project_pipeline_status(project.pipeline_status)
|
|
- if forks
|
|
%span.prepend-left-10
|
|
= sprite_icon('fork', size: 12)
|
|
= number_with_delimiter(project.forks_count)
|
|
- if stars
|
|
%span.prepend-left-10
|
|
= icon('star')
|
|
= number_with_delimiter(project.star_count)
|
|
%span.prepend-left-10.visibility-icon.has-tooltip{ data: { container: 'body', placement: 'left' }, title: visibility_icon_description(project) }
|
|
= visibility_level_icon(project.visibility_level, fw: true)
|
|
.prepend-top-0
|
|
updated #{updated_tooltip}
|