Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d9aff879
Commit
d9aff879
authored
Oct 13, 2021
by
Tom Quirk
Committed by
Simon Knox
Oct 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use gl_tabs_nav helper for integration overrides
parent
50001036
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
24 deletions
+8
-24
app/helpers/integrations_helper.rb
app/helpers/integrations_helper.rb
+0
-9
app/views/shared/integrations/_tabs.html.haml
app/views/shared/integrations/_tabs.html.haml
+8
-15
No files found.
app/helpers/integrations_helper.rb
View file @
d9aff879
...
@@ -125,15 +125,6 @@ module IntegrationsHelper
...
@@ -125,15 +125,6 @@ module IntegrationsHelper
!
Gitlab
.
com?
!
Gitlab
.
com?
end
end
def
integration_tabs
(
integration
:)
[
{
key:
'edit'
,
text:
_
(
'Settings'
),
href:
scoped_edit_integration_path
(
integration
)
},
(
{
key:
'overrides'
,
text:
s_
(
'Integrations|Projects using custom settings'
),
href:
scoped_overrides_integration_path
(
integration
)
}
if
integration
.
instance_level?
)
].
compact
end
def
jira_issue_breadcrumb_link
(
issue_reference
)
def
jira_issue_breadcrumb_link
(
issue_reference
)
link_to
''
,
{
class:
'gl-display-flex gl-align-items-center gl-white-space-nowrap'
}
do
link_to
''
,
{
class:
'gl-display-flex gl-align-items-center gl-white-space-nowrap'
}
do
icon
=
image_tag
image_path
(
'illustrations/logos/jira.svg'
),
width:
15
,
height:
15
,
class:
'gl-mr-2'
icon
=
image_tag
image_path
(
'illustrations/logos/jira.svg'
),
width:
15
,
height:
15
,
class:
'gl-mr-2'
...
...
app/views/shared/integrations/_tabs.html.haml
View file @
d9aff879
-
active_tab
=
local_assigns
.
fetch
(
:active_tab
,
'edit'
)
-
if
integration
.
instance_level?
-
active_classes
=
'gl-tab-nav-item-active gl-tab-nav-item-active-indigo active'
-
tabs
=
integration_tabs
(
integration:
integration
)
-
if
tabs
.
length
<=
1
=
yield
-
else
.tabs.gl-tabs
.tabs.gl-tabs
%div
%div
%ul
.nav.gl-tabs-nav
{
role:
'tablist'
}
=
gl_tabs_nav
({
class:
'gl-mb-5'
})
do
-
tabs
.
each
do
|
tab
|
=
gl_tab_link_to
_
(
'Settings'
),
scoped_edit_integration_path
(
integration
)
%li
.nav-item
{
role:
'presentation'
}
=
gl_tab_link_to
s_
(
'Integrations|Projects using custom settings'
),
scoped_overrides_integration_path
(
integration
)
%a
.nav-link.gl-tab-nav-item
{
role:
'tab'
,
class:
(
active_classes
if
tab
[
:key
]
==
active_tab
),
href:
tab
[
:href
]
}
=
tab
[
:text
]
.tab-content.gl-tab-content
=
yield
.tab-pane.gl-pt-3.active
{
role:
'tabpanel'
}
=
yield
-
else
=
yield
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment