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-09-24 08:00:23 -04:00
|
|
|
- ci = false unless local_assigns[:ci] == true
|
2015-10-09 12:35:09 -04:00
|
|
|
- skip_namespace = false unless local_assigns[:skip_namespace] == true
|
2015-09-02 07:02:16 -04:00
|
|
|
- css_class = '' unless local_assigns[:css_class]
|
2016-02-19 02:09:20 -05:00
|
|
|
- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && project.commit
|
2016-01-12 20:07:59 -05:00
|
|
|
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
|
2016-03-18 14:02:08 -04:00
|
|
|
- cache_key = [project.namespace, project, controller.controller_name, controller.action_name, current_application_settings, 'v2.3']
|
2016-04-11 10:55:40 -04:00
|
|
|
- cache_key.push(project.commit.status) if project.commit.try(:status)
|
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
|
2016-02-25 13:44:11 -05:00
|
|
|
.controls
|
2016-08-12 16:55:53 -04:00
|
|
|
- if project.archived
|
|
|
|
%span.label.label-warning archived
|
2016-04-11 10:55:40 -04:00
|
|
|
- if project.commit.try(:status)
|
2016-02-03 12:05:58 -05:00
|
|
|
%span
|
2016-04-13 10:51:52 -04:00
|
|
|
= render_commit_status(project.commit)
|
2016-01-11 19:44:05 -05:00
|
|
|
- if forks
|
|
|
|
%span
|
2016-01-18 17:27:50 -05:00
|
|
|
= icon('code-fork')
|
2016-08-09 14:24:16 -04:00
|
|
|
= number_with_delimiter(project.forks_count)
|
2015-08-26 16:44:02 -04:00
|
|
|
- if stars
|
2015-09-24 08:00:23 -04:00
|
|
|
%span
|
2016-01-18 17:27:50 -05:00
|
|
|
= icon('star')
|
2016-08-09 14:24:16 -04:00
|
|
|
= number_with_delimiter(project.star_count)
|
2016-12-26 05:47:16 -05:00
|
|
|
%span.visibility-icon.has-tooltip{ data: { container: 'body', placement: 'left' }, title: visibility_icon_description(project) }
|
2016-07-25 16:15:44 -04:00
|
|
|
= visibility_level_icon(project.visibility_level, fw: true)
|
2016-03-18 14:02:08 -04:00
|
|
|
|
|
|
|
.title
|
|
|
|
= link_to project_path(project), class: dom_class(project) do
|
|
|
|
- if avatar
|
|
|
|
.dash-project-avatar
|
2016-11-03 10:26:22 -04:00
|
|
|
.avatar-container.s40
|
2016-10-31 15:14:05 -04:00
|
|
|
- if use_creator_avatar
|
|
|
|
= image_tag avatar_icon(project.creator.email, 40), class: "avatar s40", alt:''
|
|
|
|
- else
|
|
|
|
= project_icon(project, alt: '', class: 'avatar project-avatar s40')
|
2016-03-18 14:02:08 -04:00
|
|
|
%span.project-full-name
|
|
|
|
%span.namespace-name
|
|
|
|
- if project.namespace && !skip_namespace
|
|
|
|
= project.namespace.human_name
|
|
|
|
\/
|
|
|
|
%span.project-name.filter-title
|
|
|
|
= project.name
|
|
|
|
|
2016-01-12 20:07:59 -05:00
|
|
|
- if show_last_commit_as_description
|
2016-02-26 09:02:34 -05:00
|
|
|
.description
|
2016-01-12 20:07:59 -05:00
|
|
|
= link_to_gfm project.commit.title, namespace_project_commit_path(project.namespace, project, project.commit),
|
|
|
|
class: "commit-row-message"
|
|
|
|
- elsif project.description.present?
|
2016-02-26 09:02:34 -05:00
|
|
|
.description
|
2016-10-06 18:01:42 -04:00
|
|
|
= markdown_field(project, :description)
|