diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-12-07 14:11:42 +0000 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-12-07 14:11:42 +0000 |
commit | 75496059a1c36c2139bf29fa20fd4370c511fdd1 (patch) | |
tree | 5280f0a090b8bc445e03a7c6e74ff06d6d4edbce /app/views/projects | |
parent | 61d91f640b94d6e273dee502b77e723b599ab86c (diff) | |
download | gitlab-ce-75496059a1c36c2139bf29fa20fd4370c511fdd1.tar.gz |
Further design iteration on project overview
Continues the iteration on the project overview UI:
- moved star, fork and new clone button
(copy SSH/HTTPS URLs) to top right,
made them smaller
- avatar is now larger (64px)
- 'Request access' is now a link instead
of a button
- overview comes before the description +
changed styling and added icons
- description font-size is now 16px (large-paragraph)
- quick links to files are moved downwards
below the commit/pipeline info
- margins changed to group content into
4 groups to clean up the interface
- visibility info reduced to icon-only and
moved to the right of the title
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/_files.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/_home_panel.html.haml | 130 | ||||
-rw-r--r-- | app/views/projects/_stat_anchor_list.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/buttons/_clone.html.haml | 31 | ||||
-rw-r--r-- | app/views/projects/buttons/_download.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/buttons/_fork.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/buttons/_notifications.html.haml | 27 | ||||
-rw-r--r-- | app/views/projects/buttons/_star.html.haml | 12 | ||||
-rw-r--r-- | app/views/projects/empty.html.haml | 122 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/tree/_tree_header.html.haml | 4 |
11 files changed, 204 insertions, 156 deletions
diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml index 79530e78154..22a721ee9ad 100644 --- a/app/views/projects/_files.html.haml +++ b/app/views/projects/_files.html.haml @@ -1,7 +1,9 @@ +- is_project_overview = local_assigns.fetch(:is_project_overview, false) - commit = local_assigns.fetch(:commit) { @repository.commit } - ref = local_assigns.fetch(:ref) { current_ref } - project = local_assigns.fetch(:project) { @project } - content_url = local_assigns.fetch(:content_url) { @tree.readme ? project_blob_path(@project, tree_join(@ref, @tree.readme.path)) : project_tree_path(@project, @ref) } +- show_auto_devops_callout = show_auto_devops_callout?(@project) #tree-holder.tree-holder.clearfix .nav-block @@ -10,4 +12,8 @@ - if commit = render 'shared/commit_well', commit: commit, ref: ref, project: project + - if is_project_overview + .project-buttons.append-bottom-default + = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout) + = render 'projects/tree/tree_content', tree: @tree, content_url: content_url diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index dcef4dd5b69..e191b009db2 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -1,83 +1,75 @@ - empty_repo = @project.empty_repo? -- license = @project.license_anchor_data +- show_auto_devops_callout = show_auto_devops_callout?(@project) .project-home-panel{ class: ("empty-project" if empty_repo) } - .limit-container-width{ class: container_class } - .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 - = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s24', width: 24, height: 24) - %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 } + .project-header.row.append-bottom-8 + .project-title-row.col-md-12.col-lg-7.d-flex + .avatar-container.project-avatar.float-none + = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64) + .d-flex.flex-column.flex-wrap.align-items-baseline + .d-inline-flex.align-items-baseline + %h1.project-title.qa-project-name + = @project.name + %span.project-visibility.prepend-left-8.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'}) + .project-metadata.d-flex.align-items-center + - if can?(current_user, :read_project, @project) + %span.text-secondary + = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } + - if current_user + %span.access-request-links.prepend-left-8 + = render 'shared/members/access_request_links', source: @project + - if @project.tag_list.present? + %span.project-tag-list.d-inline-flex.prepend-left-8.has-tooltip{ data: { container: 'body' }, title: @project.has_extra_tags? ? @project.tag_list.join(', ') : nil } + = sprite_icon('tag', size: 16, css_class: 'icon append-right-4') + = @project.tags_to_show + - if @project.has_extra_tags? + = _("+ %{count} more") % { count: @project.count_of_extra_tags_not_shown } - .project-home-desc - - if @project.description.present? - .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") - - - if can?(current_user, :read_project, @project) - .text-secondary.prepend-top-8 - = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } - - - if @project.forked? - %p - - if @project.fork_source - #{ s_('ForkedFromProjectPath|Forked from') } - = link_to project_path(@project.fork_source) do - = fork_source_name(@project) - - else - - deleted_message = s_('ForkedFromProjectPath|Forked from %{project_name} (deleted)') - = deleted_message % { project_name: fork_source_name(@project) } - - - 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.col-md-12.col-lg-5.d-inline-flex.flex-wrap.justify-content-lg-end + - if current_user + .d-inline-flex + = render 'projects/buttons/notifications', notification_setting: @notification_setting, btn_class: 'btn-xs' - .project-repo-buttons.d-inline-flex.flex-wrap .count-buttons.d-inline-flex = render 'projects/buttons/star' = render 'projects/buttons/fork' - if can?(current_user, :download_code, @project) - .project-clone-holder.d-inline-flex.d-sm-none + .project-clone-holder.d-inline-flex.d-md-none.btn-block = render "shared/mobile_clone_panel" - .project-clone-holder.d-none.d-sm-inline-flex - = render "shared/clone_panel" + .project-clone-holder.d-none.d-md-inline-flex + = render "projects/buttons/clone" - - if show_xcode_link?(@project) - .project-action-button.project-xcode.inline - = render "projects/buttons/xcode_link" + - if can?(current_user, :download_code, @project) + %nav.project-stats + .nav-links.quick-links.mt-3 + = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) - - if current_user - - if can?(current_user, :download_code, @project) - .d-none.d-sm-inline-flex - = render 'projects/buttons/download', project: @project, ref: @ref - .d-none.d-sm-inline-flex - = render 'projects/buttons/dropdown' + .project-home-desc.mt-1 + - if @project.description.present? + .project-description + .project-description-markdown.read-more-container + = 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 + - if @project.fork_source + #{ s_('ForkedFromProjectPath|Forked from') } + = link_to project_path(@project.fork_source) do + = fork_source_name(@project) + - else + - deleted_message = s_('ForkedFromProjectPath|Forked from %{project_name} (deleted)') + = deleted_message % { project_name: fork_source_name(@project) } - .d-none.d-sm-inline-flex - = render 'shared/notifications/button', notification_setting: @notification_setting - .d-none.d-sm-inline-flex - = render 'shared/members/access_request_buttons', source: @project + - if @project.badges.present? + .project-badges.mb-2 + - @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' }> diff --git a/app/views/projects/_stat_anchor_list.html.haml b/app/views/projects/_stat_anchor_list.html.haml index 4cf49f3cf62..8e3d759b683 100644 --- a/app/views/projects/_stat_anchor_list.html.haml +++ b/app/views/projects/_stat_anchor_list.html.haml @@ -4,5 +4,5 @@ %ul.nav - anchors.each do |anchor| %li.nav-item - = link_to_if anchor.link, anchor.label, anchor.link, class: anchor.enabled ? 'nav-link stat-link' : "nav-link btn btn-#{anchor.class_modifier || 'missing'}" do - .stat-text= anchor.label + = link_to_if anchor.link, anchor.label, anchor.link, class: anchor.is_link ? 'nav-link stat-link d-flex align-items-center' : "nav-link btn btn-#{anchor.class_modifier || 'missing'} d-flex align-items-center" do + .stat-text.d-flex.align-items-center= anchor.label diff --git a/app/views/projects/buttons/_clone.html.haml b/app/views/projects/buttons/_clone.html.haml new file mode 100644 index 00000000000..d82a3dd70f9 --- /dev/null +++ b/app/views/projects/buttons/_clone.html.haml @@ -0,0 +1,31 @@ +- project = project || @project + +.git-clone-holder.js-git-clone-holder.input-group + - if allowed_protocols_present? + .input-group-text.clone-dropdown-btn.btn + %span.js-clone-dropdown-label + = enabled_project_button(project, enabled_protocol) + - else + %a#clone-dropdown.input-group-text.btn.btn-primary.btn-xs.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } } + %span.append-right-4.js-clone-dropdown-label + = _('Clone') + = sprite_icon("arrow-down", css_class: "icon") + %form.p-3.dropdown-menu.dropdown-menu-right.dropdown-menu-large.dropdown-menu-selectable.clone-options-dropdown + %li.pb-2 + %label.label-bold + = _('Clone with SSH') + .input-group + = text_field_tag :ssh_project_clone, project.ssh_url_to_repo, class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' } + .input-group-append + = clipboard_button(target: '#ssh_project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard") + = render_if_exists 'projects/buttons/geo' + %li + %label.label-bold + = _('Clone with %{http_label}') % { http_label: gitlab_config.protocol.upcase } + .input-group + = text_field_tag :http_project_clone, project.http_url_to_repo, class: "js-select-on-focus form-control", readonly: true, aria: { label: 'Project clone URL' } + .input-group-append + = clipboard_button(target: '#http_project_clone', title: _("Copy URL to clipboard"), class: "input-group-text btn-default btn-clipboard") + = render_if_exists 'projects/buttons/geo' + += render_if_exists 'shared/geo_info_modal', project: project diff --git a/app/views/projects/buttons/_download.html.haml b/app/views/projects/buttons/_download.html.haml index f7551434d47..4eb53faa6ff 100644 --- a/app/views/projects/buttons/_download.html.haml +++ b/app/views/projects/buttons/_download.html.haml @@ -5,8 +5,8 @@ .project-action-button.dropdown.inline> %button.btn.has-tooltip{ title: s_('DownloadSource|Download'), 'data-toggle' => 'dropdown', 'aria-label' => s_('DownloadSource|Download'), 'data-display' => 'static' } = sprite_icon('download') - = icon("caret-down") %span.sr-only= _('Select Archive Format') + = sprite_icon("arrow-down") %ul.dropdown-menu.dropdown-menu-right{ role: 'menu' } %li.dropdown-header #{ _('Source code') } diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index 8da27ca7cb3..bc0a89bea62 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -1,9 +1,6 @@ - unless @project.empty_repo? - if current_user && can?(current_user, :fork_project, @project) .count-badge.d-inline-flex.align-item-stretch.append-right-8 - %span.fork-count.count-badge-count.d-flex.align-items-center - = link_to project_forks_path(@project), title: n_(s_('ProjectOverview|Fork'), s_('ProjectOverview|Forks'), @project.forks_count), class: 'count' do - = @project.forks_count - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2 = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: s_('ProjectOverview|Go to your fork'), class: 'btn btn-default has-tooltip count-badge-button d-flex align-items-center fork-btn' do = sprite_icon('fork', { css_class: 'icon' }) @@ -15,3 +12,6 @@ title: (s_('ProjectOverview|You have reached your project limit') unless can_create_fork) do = sprite_icon('fork', { css_class: 'icon' }) %span= s_('ProjectOverview|Fork') + %span.fork-count.count-badge-count.d-flex.align-items-center + = link_to project_forks_path(@project), title: n_(s_('ProjectOverview|Fork'), s_('ProjectOverview|Forks'), @project.forks_count), class: 'count' do + = @project.forks_count diff --git a/app/views/projects/buttons/_notifications.html.haml b/app/views/projects/buttons/_notifications.html.haml new file mode 100644 index 00000000000..745983ace7e --- /dev/null +++ b/app/views/projects/buttons/_notifications.html.haml @@ -0,0 +1,27 @@ +- btn_class = local_assigns.fetch(:btn_class, "btn-xs") + +- if notification_setting + .js-notification-dropdown.notification-dropdown.project-action-button.dropdown.inline + = form_for notification_setting, remote: true, html: { class: "inline notification-form no-label" } do |f| + = hidden_setting_source_input(notification_setting) + = hidden_field_tag "hide_label", true + = f.hidden_field :level, class: "notification_setting_level" + .js-notification-toggle-btns + %div{ class: ("btn-group" if notification_setting.custom?) } + - if notification_setting.custom? + %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) }, class: "#{btn_class}", "aria-label" => _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) }, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } + = sprite_icon("notifications", css_class: "icon notifications-icon js-notifications-icon") + %span.js-notification-loading.fa.hidden + %button.btn.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } + = sprite_icon("arrow-down", css_class: "icon") + .sr-only Toggle dropdown + - else + %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting - #{notification_title(notification_setting.level)}", class: "#{btn_class}", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } + = sprite_icon("notifications", css_class: "icon notifications-icon js-notifications-icon") + %span.js-notification-loading.fa.hidden + = sprite_icon("arrow-down", css_class: "icon") + + = render "shared/notifications/notification_dropdown", notification_setting: notification_setting + + = content_for :scripts_body do + = render "shared/notifications/custom_notifications", notification_setting: notification_setting diff --git a/app/views/projects/buttons/_star.html.haml b/app/views/projects/buttons/_star.html.haml index 0d04ecb3a58..090d1549aa7 100644 --- a/app/views/projects/buttons/_star.html.haml +++ b/app/views/projects/buttons/_star.html.haml @@ -1,19 +1,19 @@ - if current_user .count-badge.d-inline-flex.align-item-stretch.append-right-8 - %span.star-count.count-badge-count.d-flex.align-items-center - = @project.star_count - %button.count-badge-button.btn.btn-default.d-flex.align-items-center.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } } + %button.count-badge-button.btn.btn-default.btn-xs.d-flex.align-items-center.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } } - if current_user.starred?(@project) = sprite_icon('star', { css_class: 'icon' }) %span.starred= s_('ProjectOverview|Unstar') - else = sprite_icon('star-o', { css_class: 'icon' }) %span= s_('ProjectOverview|Star') + %span.star-count.count-badge-count.d-flex.align-items-center + = @project.star_count - else .count-badge.d-inline-flex.align-item-stretch.append-right-8 - %span.star-count.count-badge-count.d-flex.align-items-center - = @project.star_count - = link_to new_user_session_path, class: 'btn btn-default has-tooltip count-badge-button d-flex align-items-center star-btn', title: s_('ProjectOverview|You must sign in to star a project') do + = link_to new_user_session_path, class: 'btn btn-default btn-xs has-tooltip count-badge-button d-flex align-items-center star-btn', title: s_('ProjectOverview|You must sign in to star a project') do = sprite_icon('star-o', { css_class: 'icon' }) %span= s_('ProjectOverview|Star') + %span.star-count.count-badge-count.d-flex.align-items-center + = @project.star_count diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 936900a0087..aa690b12eb7 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -4,11 +4,10 @@ = render partial: 'flash_messages', locals: { project: @project } -= render "home_panel" +%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } + = render "home_panel" -.project-empty-note-panel - %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - .prepend-top-20 + .project-empty-note-panel %h4.append-bottom-20 = _('The repository for this project is empty') @@ -32,66 +31,65 @@ = _('Otherwise it is recommended you start with one of the options below.') .prepend-top-20 -%nav.project-stats{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller - .fade-left= icon('angle-left') - .fade-right= icon('angle-right') - .nav-links.scrolling-tabs.quick-links - = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors - = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons + %nav.project-buttons + .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller + .fade-left= icon('angle-left') + .fade-right= icon('angle-right') + .nav-links.scrolling-tabs.quick-links + = render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons -- if can?(current_user, :push_code, @project) - %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - .prepend-top-20 - .empty_wrapper - %h3#repo-command-line-instructions.page-title-empty - Command line instructions - .git-empty.js-git-empty - %fieldset - %h5 Git global setup - %pre.bg-light - :preserve - git config --global user.name "#{h git_user_name}" - git config --global user.email "#{h git_user_email}" + - if can?(current_user, :push_code, @project) + %div + .prepend-top-20 + .empty_wrapper + %h3#repo-command-line-instructions.page-title-empty + = _('Command line instructions') + .git-empty.js-git-empty + %fieldset + %h5= _('Git global setup') + %pre.bg-light + :preserve + git config --global user.name "#{h git_user_name}" + git config --global user.email "#{h git_user_email}" - %fieldset - %h5 Create a new repository - %pre.bg-light - :preserve - git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - cd #{h @project.path} - touch README.md - git add README.md - git commit -m "add README" - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin master + %fieldset + %h5= _('Create a new repository') + %pre.bg-light + :preserve + git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + cd #{h @project.path} + touch README.md + git add README.md + git commit -m "add README" + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master - %fieldset - %h5 Existing folder - %pre.bg-light - :preserve - cd existing_folder - git init - git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - git add . - git commit -m "Initial commit" - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin master + %fieldset + %h5= _('Existing folder') + %pre.bg-light + :preserve + cd existing_folder + git init + git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + git add . + git commit -m "Initial commit" + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin master - %fieldset - %h5 Existing Git repository - %pre.bg-light - :preserve - cd existing_repo - git remote rename origin old-origin - git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} - - if @project.can_current_user_push_to_default_branch? - %span>< - git push -u origin --all - git push -u origin --tags + %fieldset + %h5= _('Existing Git repository') + %pre.bg-light + :preserve + cd existing_repo + git remote rename origin old-origin + git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')} + - if @project.can_current_user_push_to_default_branch? + %span>< + git push -u origin --all + git push -u origin --tags - - if can? current_user, :remove_project, @project - .prepend-top-20 - = link_to 'Remove project', [@project.namespace.becomes(Namespace), @project], data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove float-right" + - if can? current_user, :remove_project, @project + .prepend-top-20 + = link_to _('Remove project'), [@project.namespace.becomes(Namespace), @project], data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove float-right" diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index f29ce4f5c06..c87a084740b 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,7 +1,6 @@ - @no_container = true - breadcrumb_title _("Details") - @content_class = "limit-container-width" unless fluid_layout -- show_auto_devops_callout = show_auto_devops_callout?(@project) = content_for :meta_tags do = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") @@ -15,20 +14,11 @@ %div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } = render "projects/last_push" -= render "home_panel" - -- if can?(current_user, :download_code, @project) - %nav.project-stats{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller - .fade-left= icon('angle-left') - .fade-right= icon('angle-right') - .nav-links.scrolling-tabs.quick-links - = render 'stat_anchor_list', anchors: @project.statistics_anchors(show_auto_devops_callout: show_auto_devops_callout) - = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout) + = render "home_panel" + - if can?(current_user, :download_code, @project) && @project.repository_languages.present? = repository_languages_bar(@project.repository_languages) -%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] } - if @project.archived? .text-warning.center.prepend-top-20 %p @@ -41,4 +31,4 @@ = render 'shared/auto_devops_callout' %div{ class: project_child_container_class(view_path) } - = render view_path + = render view_path, is_project_overview: true diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index 601e3f25852..a89df6adfb3 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -85,4 +85,8 @@ = link_to ide_edit_path(@project, @ref, @path), class: 'btn btn-default qa-web-ide-button' do = _('Web IDE') + - if show_xcode_link?(@project) + .project-action-button.project-xcode.inline + = render "projects/buttons/xcode_link" + = render 'projects/buttons/download', project: @project, ref: @ref |