90 lines
4.9 KiB
Text
90 lines
4.9 KiB
Text
- empty_repo = @project.empty_repo?
|
|
- show_auto_devops_callout = show_auto_devops_callout?(@project)
|
|
- max_project_topic_length = 15
|
|
- emails_disabled = @project.emails_disabled?
|
|
|
|
= render 'projects/invite_members_modal', project: @project
|
|
|
|
.project-home-panel.js-show-on-project-root.gl-my-5{ class: [("empty-project" if empty_repo)] }
|
|
.row.gl-mb-3
|
|
.home-panel-title-row.col-md-12.col-lg-6.d-flex
|
|
.avatar-container.rect-avatar.s64.home-panel-avatar.gl-flex-shrink-0.gl-w-11.gl-h-11.gl-mr-3.float-none
|
|
= project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'image')
|
|
.d-flex.flex-column.flex-wrap.align-items-baseline
|
|
.d-inline-flex.align-items-baseline
|
|
%h1.home-panel-title.gl-mt-3.gl-mb-2.gl-font-size-h1.gl-line-height-24.gl-font-weight-bold{ data: { qa_selector: 'project_name_content' }, itemprop: 'name' }
|
|
= @project.name
|
|
%span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) }
|
|
= visibility_level_icon(@project.visibility_level, options: { class: 'icon' })
|
|
= render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project
|
|
.home-panel-metadata.d-flex.flex-wrap.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal
|
|
- if can?(current_user, :read_project, @project)
|
|
%span.text-secondary{ itemprop: 'identifier', data: { qa_selector: 'project_id_content' } }
|
|
= s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id }
|
|
- if current_user
|
|
%span.access-request-links.gl-ml-3
|
|
= render 'shared/members/access_request_links', source: @project
|
|
- if @project.tag_list.present?
|
|
%span.home-panel-topic-list.mt-2.w-100.d-inline-flex.gl-font-base.gl-font-weight-normal.gl-align-items-center
|
|
= sprite_icon('tag', css_class: 'icon gl-relative gl-mr-2')
|
|
|
|
- @project.topics_to_show.each do |topic|
|
|
- project_topics_classes = "badge badge-pill badge-secondary gl-mr-2"
|
|
- explore_project_topic_path = explore_projects_path(tag: topic)
|
|
- if topic.length > max_project_topic_length
|
|
%a{ class: "#{ project_topics_classes } str-truncated-30 has-tooltip", data: { container: "body" }, title: topic, href: explore_project_topic_path, itemprop: 'keywords' }
|
|
= topic.titleize
|
|
- else
|
|
%a{ class: project_topics_classes, href: explore_project_topic_path, itemprop: 'keywords' }
|
|
= topic.titleize
|
|
|
|
- if @project.has_extra_topics?
|
|
.text-nowrap.has-tooltip{ data: { container: 'body' }, title: @project.has_extra_topics? ? @project.topics_not_shown.join(', ') : nil }
|
|
= _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown }
|
|
|
|
|
|
.project-repo-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end
|
|
- if current_user
|
|
.d-inline-flex
|
|
= render 'shared/notifications/new_button', notification_setting: @notification_setting, btn_class: 'btn-xs', dropdown_container_class: 'gl-mr-3', emails_disabled: emails_disabled
|
|
|
|
.count-buttons.d-inline-flex
|
|
= render 'projects/buttons/star'
|
|
= render 'projects/buttons/fork'
|
|
|
|
- if can?(current_user, :download_code, @project)
|
|
%nav.project-stats
|
|
.nav-links.quick-links
|
|
- if @project.empty_repo?
|
|
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors
|
|
- else
|
|
= render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout)
|
|
|
|
.home-panel-home-desc.mt-1
|
|
- if @project.description.present?
|
|
.home-panel-description.text-break
|
|
.home-panel-description-markdown.read-more-container{ itemprop: 'description' }
|
|
= markdown_field(@project, :description)
|
|
%button.btn.btn-blank.btn-link.js-read-more-trigger.d-lg-none{ type: "button" }
|
|
= _("Read more")
|
|
|
|
- if @project.forked?
|
|
%p
|
|
- source = visible_fork_source(@project)
|
|
- if source
|
|
#{ s_('ForkedFromProjectPath|Forked from') }
|
|
= link_to source.full_name, project_path(source), data: { qa_selector: 'forked_from_link' }
|
|
- else
|
|
= s_('ForkedFromProjectPath|Forked from an inaccessible project')
|
|
|
|
= render_if_exists "projects/home_mirror"
|
|
|
|
- if @project.badges.present?
|
|
.project-badges.mb-2
|
|
- @project.badges.each do |badge|
|
|
%a.gl-mr-3{ href: badge.rendered_link_url(@project),
|
|
target: '_blank',
|
|
rel: 'noopener noreferrer' }>
|
|
%img.project-badge{ src: badge.rendered_image_url(@project),
|
|
'aria-hidden': true,
|
|
alt: 'Project badge' }>
|