BigW Consortium Gitlab

Commit a7a24017 by Rémy Coutable

Merge branch 'feat/add-section-headers-to-project-repo-buttons' into 'master'

Improve empty project overview See merge request gitlab-org/gitlab-ce!16617
parents 7d8c624b a8ebe367
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
- else - else
.row-content-block.second-block.center .row-content-block.second-block.center
%h3.page-title %h4
This project does not have a README yet This project does not have a README yet
- if can?(current_user, :push_code, @project) - if can?(current_user, :push_code, @project)
%p %p
A A
%code README %code README
file contains information about other files in a repository and is commonly file contains information about other files in a repository and is commonly
distributed with computer software, forming part of its documentation. distributed with computer software, forming part of its documentation.
GitLab will render it here instead of this message.
%p %p
We recommend you to = link_to "Add Readme", add_special_file_path(@project, file_name: 'README.md'), class: 'btn btn-new'
= link_to "add a README", add_special_file_path(@project, file_name: 'README.md')
file to the repository and GitLab will render it here instead of this message.
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
%ul.dropdown-menu.dropdown-menu-align-right.project-home-dropdown %ul.dropdown-menu.dropdown-menu-align-right.project-home-dropdown
- can_create_issue = can?(current_user, :create_issue, @project) - can_create_issue = can?(current_user, :create_issue, @project)
- merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project)) - merge_project = can?(current_user, :create_merge_request, @project) ? @project : (current_user && current_user.fork_of(@project))
- can_create_snippet = can?(current_user, :create_snippet, @project) - can_create_project_snippet = can?(current_user, :create_project_snippet, @project)
- if can_create_issue || merge_project || can_create_project_snippet
%li.dropdown-header= _('This project')
- if can_create_issue - if can_create_issue
%li= link_to _('New issue'), new_project_issue_path(@project) %li= link_to _('New issue'), new_project_issue_path(@project)
...@@ -14,11 +17,11 @@ ...@@ -14,11 +17,11 @@
- if merge_project - if merge_project
%li= link_to _('New merge request'), project_new_merge_request_path(merge_project) %li= link_to _('New merge request'), project_new_merge_request_path(merge_project)
- if can_create_snippet - if can_create_project_snippet
%li= link_to _('New snippet'), new_project_snippet_path(@project) %li= link_to _('New snippet'), new_project_snippet_path(@project)
- if can_create_issue || merge_project || can_create_snippet - if can?(current_user, :push_code, @project)
%li.divider %li.dropdown-header= _('This repository')
- if can?(current_user, :push_code, @project) - if can?(current_user, :push_code, @project)
%li= link_to _('New file'), project_new_blob_path(@project, @project.default_branch || 'master') %li= link_to _('New file'), project_new_blob_path(@project, @project.default_branch || 'master')
...@@ -31,5 +34,5 @@ ...@@ -31,5 +34,5 @@
- continue_params = { to: project_new_blob_path(@project, @project.default_branch || 'master'), - continue_params = { to: project_new_blob_path(@project, @project.default_branch || 'master'),
notice: edit_in_new_fork_notice, notice: edit_in_new_fork_notice,
notice_now: edit_in_new_fork_notice_now } notice_now: edit_in_new_fork_notice_now }
- fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params) - fork_path = project_forks_path(@project, namespace_key: current_user.namespace.id, continue: continue_params)
%li= link_to _('New file'), fork_path, method: :post %li= link_to _('New file'), fork_path, method: :post
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
= render "home_panel" = render "home_panel"
.row-content-block.second-block.center .row-content-block.second-block.center
%h3.page-title %h4
The repository for this project is empty The repository for this project is empty
- if can?(current_user, :push_code, @project) - if can?(current_user, :push_code, @project)
%p %p
If you already have files you can push them using command line instructions below. If you already have files you can push them using command line instructions below.
...@@ -28,8 +29,8 @@ ...@@ -28,8 +29,8 @@
%p %p
- link = link_to(s_('AutoDevOps|Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings')) - link = link_to(s_('AutoDevOps|Auto DevOps (Beta)'), project_settings_ci_cd_path(@project, anchor: 'js-general-pipeline-settings'))
= s_('AutoDevOps|You can activate %{link_to_settings} for this project.').html_safe % { link_to_settings: link } = s_('AutoDevOps|You can activate %{link_to_settings} for this project.').html_safe % { link_to_settings: link }
%p %p= s_('AutoDevOps|It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.')
= s_('AutoDevOps|It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.') %p= link_to _('New file'), project_new_blob_path(@project, @project.default_branch || 'master'), class: 'btn btn-new'
- if can?(current_user, :push_code, @project) - if can?(current_user, :push_code, @project)
%div{ class: container_class } %div{ class: container_class }
...@@ -79,4 +80,4 @@ ...@@ -79,4 +80,4 @@
- if can? current_user, :remove_project, @project - if can? current_user, :remove_project, @project
.prepend-top-20 .prepend-top-20
= link_to 'Remove project', [@project.namespace.becomes(Namespace), @project], data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right" = link_to 'Remove project', [@project.namespace.becomes(Namespace), @project], data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-inverted btn-remove pull-right"
---
title: Improve empty project overview
merge_request: 16617
author: George Tsiolis
type: added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment