2018-06-15 11:58:25 +00:00
- @content_class = "limit-container-width" unless fluid_layout
2016-01-14 20:44:20 +00:00
- @no_container = true
2018-03-29 12:06:49 +00:00
- breadcrumb_title _("Details")
2016-01-14 20:44:20 +00:00
2017-06-29 11:43:01 +00:00
= render partial: 'flash_messages', locals: { project: @project }
2015-10-17 06:33:49 +00:00
2013-11-06 15:13:21 +00:00
= render "home_panel"
2012-09-04 16:05:08 +00:00
2018-02-02 21:50:09 +00:00
.project-empty-note-panel
2018-06-15 11:47:37 +00:00
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
2018-02-02 21:50:09 +00:00
.prepend-top-20
%h4
= _('The repository for this project is empty')
2018-02-22 16:57:58 +00:00
- if @project.can_current_user_push_code?
2018-02-02 21:50:09 +00:00
%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-05-04 19:26:54 +00:00
- link_to_auto_devops_settings = link_to(s_('AutoDevOps|enable Auto DevOps'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings'))
2018-02-21 16:22:38 +00:00
- link_to_add_kubernetes_cluster = link_to(s_('AutoDevOps|add a Kubernetes cluster'), new_project_cluster_path(@project))
2018-02-02 21:50:09 +00:00
= 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
2017-10-16 16:16:42 +00:00
%p
2018-02-02 21:50:09 +00:00
= _('Otherwise it is recommended you start with one of the options below.')
.prepend-top-20
2018-09-06 07:27:39 +00:00
%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
2017-10-16 16:16:42 +00:00
2016-02-22 17:37:26 +00:00
- if can?(current_user, :push_code, @project)
2018-06-15 11:47:37 +00:00
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
2016-01-14 20:44:20 +00:00
.prepend-top-20
.empty_wrapper
2018-02-02 21:50:09 +00:00
%h3#repo-command-line-instructions.page-title-empty
2016-01-14 20:44:20 +00:00
Command line instructions
2018-09-06 07:27:39 +00:00
.git-empty.js-git-empty
2016-01-14 20:44:20 +00:00
%fieldset
%h5 Git global setup
2018-06-13 20:41:53 +00:00
%pre.bg-light
2016-01-14 20:44:20 +00:00
:preserve
git config --global user.name "#{h git_user_name}"
git config --global user.email "#{h git_user_email}"
2012-01-17 23:19:57 +00:00
2016-01-14 20:44:20 +00:00
%fieldset
%h5 Create a new repository
2018-06-13 20:41:53 +00:00
%pre.bg-light
2016-01-14 20:44:20 +00:00
:preserve
2018-09-06 07:27:39 +00:00
git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
2016-01-14 20:44:20 +00:00
cd #{h @project.path}
touch README.md
git add README.md
git commit -m "add README"
2018-04-18 10:44:12 +00:00
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin master
2012-01-17 23:19:57 +00:00
2016-01-14 20:44:20 +00:00
%fieldset
2017-01-15 14:34:17 +00:00
%h5 Existing folder
2018-06-13 20:41:53 +00:00
%pre.bg-light
2016-01-14 20:44:20 +00:00
:preserve
cd existing_folder
git init
2018-09-06 07:27:39 +00:00
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
2016-01-14 20:44:20 +00:00
git add .
2017-04-25 05:50:59 +00:00
git commit -m "Initial commit"
2018-04-18 10:44:12 +00:00
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin master
2013-08-12 15:21:47 +00:00
2016-03-29 21:51:31 +00:00
%fieldset
%h5 Existing Git repository
2018-06-13 20:41:53 +00:00
%pre.bg-light
2016-03-29 21:51:31 +00:00
:preserve
cd existing_repo
2017-10-20 06:58:41 +00:00
git remote rename origin old-origin
2018-09-06 07:27:39 +00:00
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
2018-04-18 10:44:12 +00:00
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin --all
git push -u origin --tags
2016-03-29 21:51:31 +00:00
2016-01-14 20:44:20 +00:00
- if can? current_user, :remove_project, @project
.prepend-top-20
2018-04-09 17:42:45 +00:00
= 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"