debian-mirror-gitlab/app/views/projects/empty.html.haml

98 lines
4.3 KiB
Text
Raw Normal View History

2018-11-08 19:23:39 +05:30
- @content_class = "limit-container-width" unless fluid_layout
- @no_container = true
2018-05-09 12:01:36 +05:30
- breadcrumb_title _("Details")
2017-09-10 17:25:29 +05:30
= render partial: 'flash_messages', locals: { project: @project }
2015-04-26 12:48:37 +05:30
2014-09-02 18:07:02 +05:30
= render "home_panel"
2018-03-27 19:54:05 +05:30
.project-empty-note-panel
2018-11-08 19:23:39 +05:30
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
2018-03-27 19:54:05 +05:30
.prepend-top-20
2018-12-05 23:21:45 +05:30
%h4.append-bottom-20
2018-03-27 19:54:05 +05:30
= _('The repository for this project is empty')
- if @project.can_current_user_push_code?
%p
- link_to_cli = link_to _('command line instructions'), '#repo-command-line-instructions'
= _('If you already have files you can push them using the %{link_to_cli} below.').html_safe % { link_to_cli: link_to_cli }
%p
%em
- link_to_protected_branches = link_to _('Learn more about protected branches'), help_page_path('user/project/protected_branches')
= _('Note that the master branch is automatically protected. %{link_to_protected_branches}').html_safe % { link_to_protected_branches: link_to_protected_branches }
%hr
%p
2018-11-08 19:23:39 +05:30
- link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings'))
2018-03-27 19:54:05 +05:30
- link_to_add_kubernetes_cluster = link_to(s_('AutoDevOps|add a Kubernetes cluster'), new_project_cluster_path(@project))
= s_('AutoDevOps|You can automatically build and test your application if you %{link_to_auto_devops_settings} for this project. You can automatically deploy it as well, if you %{link_to_add_kubernetes_cluster}.').html_safe % { link_to_auto_devops_settings: link_to_auto_devops_settings, link_to_add_kubernetes_cluster: link_to_add_kubernetes_cluster }
%hr
2018-03-17 18:26:18 +05:30
%p
2018-03-27 19:54:05 +05:30
= _('Otherwise it is recommended you start with one of the options below.')
.prepend-top-20
2018-11-20 20:47:30 +05:30
%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
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_anchors
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons
2018-03-17 18:26:18 +05:30
2016-06-02 11:05:42 +05:30
- if can?(current_user, :push_code, @project)
2018-11-08 19:23:39 +05:30
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
.prepend-top-20
.empty_wrapper
2018-03-27 19:54:05 +05:30
%h3#repo-command-line-instructions.page-title-empty
Command line instructions
2018-11-20 20:47:30 +05:30
.git-empty.js-git-empty
%fieldset
%h5 Git global setup
2018-11-08 19:23:39 +05:30
%pre.bg-light
:preserve
git config --global user.name "#{h git_user_name}"
git config --global user.email "#{h git_user_email}"
2014-09-02 18:07:02 +05:30
%fieldset
%h5 Create a new repository
2018-11-08 19:23:39 +05:30
%pre.bg-light
:preserve
2018-11-20 20:47:30 +05:30
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"
2018-05-09 12:01:36 +05:30
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin master
2014-09-02 18:07:02 +05:30
%fieldset
2017-08-17 22:00:37 +05:30
%h5 Existing folder
2018-11-08 19:23:39 +05:30
%pre.bg-light
:preserve
cd existing_folder
git init
2018-11-20 20:47:30 +05:30
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
git add .
2017-08-17 22:00:37 +05:30
git commit -m "Initial commit"
2018-05-09 12:01:36 +05:30
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin master
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
%fieldset
%h5 Existing Git repository
2018-11-08 19:23:39 +05:30
%pre.bg-light
2017-08-17 22:00:37 +05:30
:preserve
cd existing_repo
2018-03-17 18:26:18 +05:30
git remote rename origin old-origin
2018-11-20 20:47:30 +05:30
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
2018-05-09 12:01:36 +05:30
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin --all
git push -u origin --tags
2017-08-17 22:00:37 +05:30
- if can? current_user, :remove_project, @project
.prepend-top-20
2018-11-08 19:23:39 +05:30
= 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"