1- avatar = true unless local_assigns[:avatar] == false 2- stars = true unless local_assigns[:stars] == false 3- forks = true unless local_assigns[:forks] == false 4- merge_requests = true unless local_assigns[:merge_requests] == false 5- issues = true unless local_assigns[:issues] == false 6- pipeline_status = true unless local_assigns[:pipeline_status] == false 7- skip_namespace = false unless local_assigns[:skip_namespace] == true 8- access = max_project_member_access(project) 9- compact_mode = false unless local_assigns[:compact_mode] == true 10- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && can_show_last_commit_in_list?(project) 11- css_class = '' unless local_assigns[:css_class] 12- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description 13- cache_key = project_list_cache_key(project, pipeline_status: pipeline_status) 14- updated_tooltip = time_ago_with_tooltip(project.last_activity_date) 15- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) 16- last_pipeline = project.last_pipeline if show_pipeline_status_icon 17- css_controls_class = compact_mode ? [] : ["flex-lg-row", "justify-content-lg-between"] 18- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present? 19- avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar' 20 21%li.project-row.d-flex{ class: css_class } 22 = cache(cache_key) do 23 - if avatar 24 .avatar-container.s48.flex-grow-0.flex-shrink-0{ class: avatar_container_class } 25 = link_to project_path(project), class: dom_class(project) do 26 - if project.creator && use_creator_avatar 27 = image_tag avatar_icon_for_user(project.creator, 48), class: "avatar s48", alt: '' 28 - else 29 = project_icon(project, alt: '', class: 'avatar project-avatar s48', width: 48, height: 48) 30 .project-details.d-sm-flex.flex-sm-fill.align-items-center{ data: { qa_selector: 'project_content', qa_project_name: project.name } } 31 .flex-wrapper 32 .d-flex.align-items-center.flex-wrap.project-title 33 %h2.d-flex.gl-mt-3 34 = link_to project_path(project), class: 'text-plain js-prefetch-document' do 35 %span.project-full-name.gl-mr-3>< 36 %span.namespace-name 37 - if project.namespace && !skip_namespace 38 = project.namespace.human_name 39 \/ 40 %span.project-name< 41 = project.name 42 43 %span.metadata-info.visibility-icon.gl-mr-3.gl-mt-3.text-secondary.has-tooltip{ data: { container: 'body', placement: 'top' }, title: visibility_icon_description(project) } 44 = visibility_level_icon(project.visibility_level) 45 46 - if explore_projects_tab? && project_license_name(project) 47 %span.metadata-info.d-inline-flex.align-items-center.gl-mr-3.gl-mt-3 48 = sprite_icon('scale', size: 14, css_class: 'gl-mr-2') 49 = project_license_name(project) 50 51 - if !explore_projects_tab? && access&.nonzero? 52 -# haml-lint:disable UnnecessaryStringOutput 53 = ' ' # prevent haml from eating the space between elements 54 .metadata-info.gl-mt-3 55 %span.user-access-role.d-block{ data: { qa_selector: 'user_role_content' } }= Gitlab::Access.human_access(access) 56 57 - if !explore_projects_tab? 58 .metadata-info.gl-mt-3 59 = render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: project 60 61 - if show_last_commit_as_description 62 .description.d-none.d-sm-block.gl-mr-3 63 = link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message") 64 - elsif project.description.present? 65 .description.d-none.d-sm-block.gl-mr-3 66 = markdown_field(project, :description) 67 68 - if project.topics.any? 69 .gl-mt-2 70 = render "shared/projects/topics", project: project.present(current_user: current_user) 71 72 = render_if_exists 'shared/projects/removed', project: project 73 74 .controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class.join(" ") } 75 .icon-container.d-flex.align-items-center 76 - if show_pipeline_status_icon && last_pipeline.present? 77 - pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref) 78 %span.icon-wrapper.pipeline-status 79 = render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path 80 81 = render_if_exists 'shared/projects/archived', project: project 82 - if stars 83 = link_to project_starrers_path(project), 84 class: "d-flex align-items-center icon-wrapper stars has-tooltip", 85 title: _('Stars'), data: { container: 'body', placement: 'top' } do 86 = sprite_icon('star', size: 14, css_class: 'gl-mr-2') 87 = number_with_delimiter(project.star_count) 88 - if forks 89 = link_to project_forks_path(project), 90 class: "align-items-center icon-wrapper forks has-tooltip", 91 title: _('Forks'), data: { container: 'body', placement: 'top' } do 92 = sprite_icon('fork', size: 14, css_class: 'gl-mr-2') 93 = number_with_delimiter(project.forks_count) 94 - if show_merge_request_count?(disabled: !merge_requests, compact_mode: compact_mode) 95 = link_to project_merge_requests_path(project), 96 class: "d-none d-xl-flex align-items-center icon-wrapper merge-requests has-tooltip", 97 title: _('Merge requests'), data: { container: 'body', placement: 'top' } do 98 = sprite_icon('git-merge', size: 14, css_class: 'gl-mr-2') 99 = number_with_delimiter(project.open_merge_requests_count) 100 - if show_issue_count?(disabled: !issues, compact_mode: compact_mode) 101 = link_to project_issues_path(project), 102 class: "d-none d-xl-flex align-items-center icon-wrapper issues has-tooltip", 103 title: _('Issues'), data: { container: 'body', placement: 'top' } do 104 = sprite_icon('issues', size: 14, css_class: 'gl-mr-2') 105 = number_with_delimiter(project.open_issues_count) 106 .updated-note 107 %span 108 = _('Updated') 109 = updated_tooltip 110