Commit 499bb3a1 authored by Clement Ho's avatar Clement Ho

Merge branch 'ee-protected-tags-bundle-refactor' into 'master'

Ee protected tags bundle refactor

See merge request gitlab-org/gitlab-ee!4710
parents c4bdfa92 e8844652
/* eslint-disable no-new */
import ProtectedTagCreate from '~/protected_tags/protected_tag_create';
import ProtectedTagEditList from '~/protected_tags/protected_tag_edit_list';
import initSettingsPanels from '~/settings_panels'; import initSettingsPanels from '~/settings_panels';
import initDeployKeys from '~/deploy_keys'; import initDeployKeys from '~/deploy_keys';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
new ProtectedTagCreate();
new ProtectedTagEditList();
initDeployKeys(); initDeployKeys();
initSettingsPanels(); initSettingsPanels();
}); });
/* eslint-disable no-unused-vars */
import ProtectedTagCreate from './protected_tag_create';
import ProtectedTagEditList from './protected_tag_edit_list';
$(() => {
const protectedtTagCreate = new ProtectedTagCreate();
const protectedtTagEditList = new ProtectedTagEditList();
});
- content_for :page_specific_javascripts do
= webpack_bundle_tag('protected_tags')
- content_for :create_protected_tag do - content_for :create_protected_tag do
= render 'projects/protected_tags/create_protected_tag' = render 'projects/protected_tags/create_protected_tag'
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
-# Those are used throughout the actual views. These `shared` views are then -# Those are used throughout the actual views. These `shared` views are then
-# reused in EE. -# reused in EE.
- if @project.feature_available?(:protected_refs_for_users, current_user) - if @project.feature_available?(:protected_refs_for_users, current_user)
= render "projects/protected_branches/ee/index" .js-protected-refs-for-users
= render "projects/protected_tags/ee/index" = render "projects/protected_branches/ee/index"
= render "projects/protected_tags/ee/index"
- else - else
= render "projects/protected_branches/index" = render "projects/protected_branches/index"
= render "projects/protected_tags/index" = render "projects/protected_tags/index"
......
...@@ -57,7 +57,6 @@ function generateEntries() { ...@@ -57,7 +57,6 @@ function generateEntries() {
pdf_viewer: './blob/pdf_viewer.js', pdf_viewer: './blob/pdf_viewer.js',
project_import_gl: './projects/project_import_gitlab_project.js', project_import_gl: './projects/project_import_gitlab_project.js',
protected_branches: './protected_branches', protected_branches: './protected_branches',
protected_tags: './protected_tags',
registry_list: './registry/index.js', registry_list: './registry/index.js',
sketch_viewer: './blob/sketch_viewer.js', sketch_viewer: './blob/sketch_viewer.js',
stl_viewer: './blob/stl_viewer.js', stl_viewer: './blob/stl_viewer.js',
...@@ -86,7 +85,6 @@ function generateEntries() { ...@@ -86,7 +85,6 @@ function generateEntries() {
ldap_group_links: 'ee/groups/ldap_group_links.js', ldap_group_links: 'ee/groups/ldap_group_links.js',
mirrors: 'ee/mirrors', mirrors: 'ee/mirrors',
ee_protected_branches: 'ee/protected_branches', ee_protected_branches: 'ee/protected_branches',
ee_protected_tags: 'ee/protected_tags',
service_desk: 'ee/projects/settings_service_desk/service_desk_bundle.js', service_desk: 'ee/projects/settings_service_desk/service_desk_bundle.js',
service_desk_issues: 'ee/service_desk_issues/index.js', service_desk_issues: 'ee/service_desk_issues/index.js',
roadmap: 'ee/roadmap', roadmap: 'ee/roadmap',
......
import '~/pages/projects/settings/repository/show/index'; /* eslint-disable no-new */
import UsersSelect from '~/users_select'; import UsersSelect from '~/users_select';
import UserCallout from '~/user_callout'; import UserCallout from '~/user_callout';
import initSettingsPanels from '~/settings_panels';
import initDeployKeys from '~/deploy_keys';
import ProtectedTagCreate from 'ee/protected_tags/protected_tag_create';
import ProtectedTagEditList from 'ee/protected_tags/protected_tag_edit_list';
import CEProtectedTagCreate from '~/protected_tags/protected_tag_create';
import CEProtectedTagEditList from '~/protected_tags/protected_tag_edit_list';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
new UsersSelect(); // eslint-disable-line no-new new UsersSelect();
new UserCallout(); // eslint-disable-line no-new new UserCallout();
if (document.querySelector('.js-protected-refs-for-users')) {
new ProtectedTagCreate();
new ProtectedTagEditList();
} else {
new CEProtectedTagCreate();
new CEProtectedTagEditList();
}
initDeployKeys();
initSettingsPanels();
}); });
/* eslint-disable no-unused-vars */
import ProtectedTagCreate from './protected_tag_create';
import ProtectedTagEditList from './protected_tag_edit_list';
$(() => {
const protectedtTagCreate = new ProtectedTagCreate();
const protectedtTagEditList = new ProtectedTagEditList();
});
- content_for :page_specific_javascripts do
= webpack_bundle_tag 'ee_protected_tags'
- content_for :create_protected_tag do - content_for :create_protected_tag do
= render 'projects/protected_tags/ee/create_protected_tag' = render 'projects/protected_tags/ee/create_protected_tag'
......
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