Commit ce77e904 authored by Eugie Limpin's avatar Eugie Limpin Committed by Miguel Rincon

Use gl_tabs_nav in Project Usage Quota index page

parent d1fb9295
...@@ -9,11 +9,10 @@ ...@@ -9,11 +9,10 @@
%a{ href: help_page_path('user/usage_quotas.md'), target: '_blank', rel: 'noopener noreferrer' } %a{ href: help_page_path('user/usage_quotas.md'), target: '_blank', rel: 'noopener noreferrer' }
= s_('UsageQuota|Learn more about usage quotas') + '.' = s_('UsageQuota|Learn more about usage quotas') + '.'
.top-area.scrolling-tabs-container.inner-page-scroll-tabs = gl_tabs_nav do
%ul.nav.nav-tabs.nav-links.scrolling-tabs.separator.js-usage-quota-tabs{ role: 'tablist' } = gl_tab_link_to '#storage-quota-tab', item_active: true do
%li.nav-item
%a.nav-link#storage-quota{ data: { toggle: "tab", action: '#storage-quota-tab' }, href: '#storage-quota-tab', 'aria-controls': '#storage-quota-tab', 'aria-selected': 'true' }
= s_('UsageQuota|Storage') = s_('UsageQuota|Storage')
.tab-content .tab-content
.tab-pane#storage-quota-tab .tab-pane.active#storage-quota-tab
#js-project-storage-count-app{ data: { project_path: @project.full_path } } #js-project-storage-count-app{ data: { project_path: @project.full_path } }
import LinkedTabs from '~/lib/utils/bootstrap_linked_tabs';
import initProjectStorage from 'ee/usage_quotas/storage/init_project_storage'; import initProjectStorage from 'ee/usage_quotas/storage/init_project_storage';
import initSearchSettings from '~/search_settings'; import initSearchSettings from '~/search_settings';
const initLinkedTabs = () => {
if (!document.querySelector('.js-usage-quota-tabs')) {
return false;
}
return new LinkedTabs({
defaultAction: '#storage-quota-tab',
parentEl: '.js-usage-quota-tabs',
hashedTabs: true,
});
};
const initVueApp = () => { const initVueApp = () => {
initProjectStorage('js-project-storage-count-app'); initProjectStorage('js-project-storage-count-app');
}; };
initVueApp(); initVueApp();
initLinkedTabs();
initSearchSettings(); initSearchSettings();
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