Commit fb5bb717 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'yogi-hide-templates-buttons' into 'master'

Remove template tabs in new project page for GitLab.com

See merge request gitlab-org/gitlab!59083
parents a4a789c6 16c7d5b1
...@@ -51,11 +51,12 @@ ...@@ -51,11 +51,12 @@
= render 'new_project_fields', f: f, project_name_id: "blank-project-name" = render 'new_project_fields', f: f, project_name_id: "blank-project-name"
#create-from-template-pane.tab-pane.js-toggle-container.px-0.pb-0{ class: active_when(active_tab == 'template'), role: 'tabpanel' } #create-from-template-pane.tab-pane.js-toggle-container.px-0.pb-0{ class: active_when(active_tab == 'template'), role: 'tabpanel' }
.card.card-slim.m-4.p-4 .gl-card.gl-my-5
%div .gl-card-body
- contributing_templates_url = 'https://gitlab.com/gitlab-org/project-templates/contributing' %div
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contributing_templates_url } - contributing_templates_url = 'https://gitlab.com/gitlab-org/project-templates/contributing'
= _('Learn how to %{link_start}contribute to the built-in templates%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contributing_templates_url }
= _('Learn how to %{link_start}contribute to the built-in templates%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= form_for @project, html: { class: 'new_project' } do |f| = form_for @project, html: { class: 'new_project' } do |f|
.project-template .project-template
.form-group .form-group
......
---
title: Remove template tabs in new project page for GitLab.com
merge_request: 59083
author: Yogi (@yo)
type: changed
...@@ -2,21 +2,22 @@ ...@@ -2,21 +2,22 @@
- project_template_count = current_user.available_custom_project_templates.count - project_template_count = current_user.available_custom_project_templates.count
- group_id = params[:namespace_id] - group_id = params[:namespace_id]
.project-templates-buttons - unless Gitlab.com?
%ul.nav-tabs.nav-links.nav.scrolling-tabs .project-templates-buttons
%li.built-in-tab %ul.nav-tabs.nav-links.nav.scrolling-tabs
%a.nav-link.active{ href: "#built-in", data: { toggle: 'tab'} } %li.built-in-tab
= _('Built-in') %a.nav-link.active{ href: "#built-in", data: { toggle: 'tab'} }
%span.badge.badge-pill= Gitlab::ProjectTemplate.all.count + Gitlab::SampleDataTemplate.all.count = _('Built-in')
%li.custom-instance-project-templates-tab %span.badge.badge-pill= Gitlab::ProjectTemplate.all.count + Gitlab::SampleDataTemplate.all.count
%a.nav-link.js-custom-instance-project-templates-nav-link.qa-instance-templates-tab{ href: "#custom-instance-project-templates", data: { toggle: 'tab'} } %li.custom-instance-project-templates-tab
= _('Instance') %a.nav-link.js-custom-instance-project-templates-nav-link.qa-instance-templates-tab{ href: "#custom-instance-project-templates", data: { toggle: 'tab'} }
%span.badge.badge-pill.qa-instance-template-tab-badge= project_template_count = _('Instance')
%li.custom-group-project-templates-tab %span.badge.badge-pill.qa-instance-template-tab-badge= project_template_count
%a.nav-link.js-custom-group-project-templates-nav-link.qa-group-templates-tab{ href: "#custom-group-project-templates", data: { toggle: 'tab'} } %li.custom-group-project-templates-tab
= _('Group') %a.nav-link.js-custom-group-project-templates-nav-link.qa-group-templates-tab{ href: "#custom-group-project-templates", data: { toggle: 'tab'} }
%span.badge.badge-pill.qa-group-template-tab-badge = _('Group')
= group_project_templates_count(group_id) %span.badge.badge-pill.qa-group-template-tab-badge
= group_project_templates_count(group_id)
.tab-content .tab-content
.project-templates-buttons.import-buttons.tab-pane.active#built-in .project-templates-buttons.import-buttons.tab-pane.active#built-in
......
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