2015-08-26 16:44:02 -04:00
|
|
|
- avatar = true unless local_assigns[:avatar] == false
|
|
|
|
- stars = true unless local_assigns[:stars] == false
|
2016-01-11 19:44:05 -05:00
|
|
|
- forks = false unless local_assigns[:forks] == true
|
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)
|
2015-09-02 07:02:16 -04:00
|
|
|
- css_class = '' unless local_assigns[:css_class]
|
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)
|
2016-01-12 20:07:59 -05:00
|
|
|
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
|
2017-03-16 05:53:48 -04:00
|
|
|
- cache_key = project_list_cache_key(project)
|
2017-06-26 01:42:44 -04:00
|
|
|
- updated_tooltip = time_ago_with_tooltip(project.last_activity_date)
|
2016-01-08 18:47:25 -05:00
|
|
|
|
2015-08-26 16:44:02 -04:00
|
|
|
%li.project-row{ 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
|
|
|
|
.avatar-container.s40
|
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
|
2018-02-09 06:32:08 -05:00
|
|
|
= image_tag avatar_icon_for_user(project.creator, 40), class: "avatar s40", alt:''
|
2017-04-19 04:05:48 -04:00
|
|
|
- else
|
2018-08-07 02:04:33 -04:00
|
|
|
= project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40)
|
2017-03-23 06:36:17 -04:00
|
|
|
.project-details
|
|
|
|
%h3.prepend-top-0.append-bottom-0
|
2017-11-23 00:04:22 -05:00
|
|
|
= link_to project_path(project), class: 'text-plain' do
|
2017-12-07 04:11:41 -05:00
|
|
|
%span.project-full-name><
|
2017-03-23 06:36:17 -04:00
|
|
|
%span.namespace-name
|
|
|
|
- if project.namespace && !skip_namespace
|
|
|
|
= project.namespace.human_name
|
|
|
|
\/
|
2017-12-07 04:11:41 -05:00
|
|
|
%span.project-name<
|
2017-03-23 06:36:17 -04:00
|
|
|
= project.name
|
|
|
|
|
2017-12-07 04:11:41 -05:00
|
|
|
- if access&.nonzero?
|
|
|
|
-# haml-lint:disable UnnecessaryStringOutput
|
|
|
|
= ' ' # prevent haml from eating the space between elements
|
|
|
|
%span.user-access-role= Gitlab::Access.human_access(access)
|
|
|
|
|
2017-03-23 06:36:17 -04:00
|
|
|
- if show_last_commit_as_description
|
|
|
|
.description.prepend-top-5
|
2017-08-23 12:53:29 -04:00
|
|
|
= link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message")
|
2017-03-23 06:36:17 -04:00
|
|
|
- elsif project.description.present?
|
|
|
|
.description.prepend-top-5
|
|
|
|
= markdown_field(project, :description)
|
|
|
|
|
2016-02-25 13:44:11 -05:00
|
|
|
.controls
|
2017-01-02 20:55:26 -05:00
|
|
|
.prepend-top-0
|
|
|
|
- if project.archived
|
2018-04-13 15:34:22 -04:00
|
|
|
%span.prepend-left-10.badge.badge-warning archived
|
2017-12-11 09:21:06 -05:00
|
|
|
- if can?(current_user, :read_cross_project) && project.pipeline_status.has_status?
|
2017-01-02 20:55:26 -05:00
|
|
|
%span.prepend-left-10
|
|
|
|
= render_project_pipeline_status(project.pipeline_status)
|
|
|
|
- if forks
|
|
|
|
%span.prepend-left-10
|
2018-01-16 10:52:22 -05:00
|
|
|
= sprite_icon('fork', size: 12)
|
2017-01-02 20:55:26 -05:00
|
|
|
= 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)
|
2017-04-26 09:33:43 -04:00
|
|
|
.prepend-top-0
|
2017-01-02 20:55:26 -05:00
|
|
|
updated #{updated_tooltip}
|