debian-mirror-gitlab/app/views/shared/projects/_project.html.haml

36 lines
1.4 KiB
Text
Raw Normal View History

2015-09-25 12:07:36 +05:30
- avatar = true unless local_assigns[:avatar] == false
- stars = true unless local_assigns[:stars] == false
2015-10-24 18:46:33 +05:30
- ci = false unless local_assigns[:ci] == true
- skip_namespace = false unless local_assigns[:skip_namespace] == true
2015-09-25 12:07:36 +05:30
- css_class = '' unless local_assigns[:css_class]
- css_class += " no-description" unless project.description.present?
- ci_commit = project.ci_commit(project.commit.sha) if ci && !project.empty_repo? && project.commit
- cache_key = [project.namespace, project, controller.controller_name, controller.action_name, current_application_settings, 'v2.2']
- cache_key.push(ci_commit.status) if ci_commit
2015-09-25 12:07:36 +05:30
%li.project-row{ class: css_class }
= cache(cache_key) do
2015-09-25 12:07:36 +05:30
= link_to project_path(project), class: dom_class(project) do
- if avatar
.dash-project-avatar
= project_icon(project, alt: '', class: 'avatar project-avatar s46')
%span.project-full-name
%span.namespace-name
2015-10-24 18:46:33 +05:30
- if project.namespace && !skip_namespace
2015-09-25 12:07:36 +05:30
= project.namespace.human_name
\/
%span.project-name.filter-title
= project.name
2015-10-24 18:46:33 +05:30
.project-controls
- if ci_commit
= render_ci_status(ci_commit)
 
2015-09-25 12:07:36 +05:30
- if stars
2015-10-24 18:46:33 +05:30
%span
2015-09-25 12:07:36 +05:30
%i.fa.fa-star
= project.star_count
- if project.description.present?
.project-description
= markdown(project.description, pipeline: :description)