2013-11-06 10:13:21 -05:00
|
|
|
- empty_repo = @project.empty_repo?
|
2018-09-06 03:27:39 -04:00
|
|
|
- license = @project.license_anchor_data
|
|
|
|
.project-home-panel{ class: ("empty-project" if empty_repo) }
|
2017-03-30 14:37:35 -04:00
|
|
|
.limit-container-width{ class: container_class }
|
2018-09-06 03:27:39 -04:00
|
|
|
.project-header.d-flex.flex-row.flex-wrap.align-items-center.append-bottom-8
|
|
|
|
.project-title-row.d-flex.align-items-center
|
|
|
|
.avatar-container.project-avatar.float-none
|
2018-11-17 10:44:07 -05:00
|
|
|
= project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s24', width: 24, height: 24)
|
2018-09-06 03:27:39 -04:00
|
|
|
%h1.project-title.d-flex.align-items-baseline.qa-project-name
|
|
|
|
= @project.name
|
|
|
|
.project-metadata.d-flex.flex-row.flex-wrap.align-items-baseline
|
|
|
|
.project-visibility.d-inline-flex.align-items-baseline.visibility-icon.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) }
|
|
|
|
= visibility_level_icon(@project.visibility_level, fw: false, options: {class: 'icon'})
|
|
|
|
= visibility_level_label(@project.visibility_level)
|
|
|
|
- if license.present?
|
|
|
|
.project-license.d-inline-flex.align-items-baseline
|
|
|
|
= link_to_if license.link, sprite_icon('scale', size: 16, css_class: 'icon') + license.label, license.link, class: license.enabled ? 'btn btn-link btn-secondary-hover-link' : 'btn btn-link'
|
|
|
|
- if @project.tag_list.present?
|
|
|
|
.project-tag-list.d-inline-flex.align-items-baseline.has-tooltip{ data: { container: 'body' }, title: @project.has_extra_tags? ? @project.tag_list.join(', ') : nil }
|
|
|
|
= sprite_icon('tag', size: 16, css_class: 'icon')
|
|
|
|
= @project.tags_to_show
|
|
|
|
- if @project.has_extra_tags?
|
|
|
|
= _("+ %{count} more") % { count: @project.count_of_extra_tags_not_shown }
|
2016-02-18 18:08:11 -05:00
|
|
|
|
2016-06-29 11:56:27 -04:00
|
|
|
.project-home-desc
|
|
|
|
- if @project.description.present?
|
2018-09-06 03:27:39 -04:00
|
|
|
.project-description
|
|
|
|
.project-description-markdown.read-more-container
|
|
|
|
= markdown_field(@project, :description)
|
|
|
|
%button.btn.btn-blank.btn-link.text-secondary.js-read-more-trigger.text-secondary.d-lg-none{ type: "button" }
|
|
|
|
= _("Read more")
|
|
|
|
|
2018-07-18 02:58:21 -04:00
|
|
|
- if can?(current_user, :read_project, @project)
|
|
|
|
.text-secondary.prepend-top-8
|
|
|
|
= s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id }
|
2015-07-07 09:22:56 -04:00
|
|
|
|
2017-10-03 13:41:37 -04:00
|
|
|
- if @project.forked?
|
2016-06-29 11:56:27 -04:00
|
|
|
%p
|
2017-11-03 06:08:36 -04:00
|
|
|
- if @project.fork_source
|
2017-10-03 13:41:37 -04:00
|
|
|
#{ s_('ForkedFromProjectPath|Forked from') }
|
2017-11-03 06:08:36 -04:00
|
|
|
= link_to project_path(@project.fork_source) do
|
|
|
|
= fork_source_name(@project)
|
2017-10-03 13:41:37 -04:00
|
|
|
- else
|
|
|
|
- deleted_message = s_('ForkedFromProjectPath|Forked from %{project_name} (deleted)')
|
2017-11-03 06:08:36 -04:00
|
|
|
= deleted_message % { project_name: fork_source_name(@project) }
|
2015-07-07 09:22:56 -04:00
|
|
|
|
2018-09-06 03:27:39 -04:00
|
|
|
- if @project.badges.present?
|
|
|
|
.project-badges.prepend-top-default.append-bottom-default
|
|
|
|
- @project.badges.each do |badge|
|
|
|
|
%a.append-right-8{ 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' }>
|
|
|
|
|
|
|
|
.project-repo-buttons.d-inline-flex.flex-wrap
|
|
|
|
.count-buttons.d-inline-flex
|
2016-06-29 08:07:12 -04:00
|
|
|
= render 'projects/buttons/star'
|
|
|
|
= render 'projects/buttons/fork'
|
2015-09-24 12:36:15 -04:00
|
|
|
|
2018-09-06 03:27:39 -04:00
|
|
|
- if can?(current_user, :download_code, @project)
|
|
|
|
.project-clone-holder.d-inline-flex.d-sm-none
|
|
|
|
= render "shared/mobile_clone_panel"
|
2016-12-14 16:51:25 -05:00
|
|
|
|
2018-09-06 03:27:39 -04:00
|
|
|
.project-clone-holder.d-none.d-sm-inline-flex
|
|
|
|
= render "shared/clone_panel"
|
2018-06-05 06:10:34 -04:00
|
|
|
|
2018-09-06 03:27:39 -04:00
|
|
|
- if show_xcode_link?(@project)
|
|
|
|
.project-action-button.project-xcode.inline
|
|
|
|
= render "projects/buttons/xcode_link"
|
|
|
|
|
|
|
|
- if current_user
|
|
|
|
- if can?(current_user, :download_code, @project)
|
|
|
|
.d-none.d-sm-inline-flex
|
2017-02-13 03:45:10 -05:00
|
|
|
= render 'projects/buttons/download', project: @project, ref: @ref
|
2018-09-06 03:27:39 -04:00
|
|
|
.d-none.d-sm-inline-flex
|
2017-02-13 03:45:10 -05:00
|
|
|
= render 'projects/buttons/dropdown'
|
|
|
|
|
2018-09-06 03:27:39 -04:00
|
|
|
.d-none.d-sm-inline-flex
|
2017-02-13 03:38:26 -05:00
|
|
|
= render 'shared/notifications/button', notification_setting: @notification_setting
|
2018-09-06 03:27:39 -04:00
|
|
|
.d-none.d-sm-inline-flex
|
2016-12-16 10:46:24 -05:00
|
|
|
= render 'shared/members/access_request_buttons', source: @project
|