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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
38bcf699
Commit
38bcf699
authored
Sep 07, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get the project path through the DOM instead of `gon`
Open the settings section based on the location hash
parent
edfb5d7b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
9 deletions
+8
-9
app/assets/javascripts/settings_panels.js
app/assets/javascripts/settings_panels.js
+4
-0
app/assets/javascripts/user_callout.js
app/assets/javascripts/user_callout.js
+1
-1
app/controllers/projects/application_controller.rb
app/controllers/projects/application_controller.rb
+0
-1
app/views/projects/settings/ci_cd/show.html.haml
app/views/projects/settings/ci_cd/show.html.haml
+1
-1
app/views/shared/_auto_devops_callout.html.haml
app/views/shared/_auto_devops_callout.html.haml
+2
-2
lib/gitlab/gon_helper.rb
lib/gitlab/gon_helper.rb
+0
-4
No files found.
app/assets/javascripts/settings_panels.js
View file @
38bcf699
...
...
@@ -41,4 +41,8 @@ export default function initSettingsPanels() {
$section
.
on
(
'
click.toggleSection
'
,
'
.js-settings-toggle
'
,
()
=>
toggleSection
(
$section
));
$section
.
find
(
'
.settings-content:not(.expanded)
'
).
on
(
'
scroll.expandSection
'
,
()
=>
expandSection
(
$section
));
});
if
(
location
.
hash
)
{
expandSection
(
$
(
location
.
hash
));
}
}
app/assets/javascripts/user_callout.js
View file @
38bcf699
...
...
@@ -22,7 +22,7 @@ export default class UserCallout {
const
$currentTarget
=
$
(
e
.
currentTarget
);
if
(
this
.
options
.
setCalloutPerProject
)
{
Cookies
.
set
(
this
.
cookieName
,
'
true
'
,
{
expires
:
365
,
path
:
gon
.
project_path
});
Cookies
.
set
(
this
.
cookieName
,
'
true
'
,
{
expires
:
365
,
path
:
this
.
userCalloutBody
.
data
(
'
project-path
'
)
});
}
else
{
Cookies
.
set
(
this
.
cookieName
,
'
true
'
,
{
expires
:
365
});
}
...
...
app/controllers/projects/application_controller.rb
View file @
38bcf699
...
...
@@ -5,7 +5,6 @@ class Projects::ApplicationController < ApplicationController
before_action
:redirect_git_extension
before_action
:project
before_action
:repository
before_action
:add_gon_project_variables
layout
'project'
helper_method
:repository
,
:can_collaborate_with_project?
...
...
app/views/projects/settings/ci_cd/show.html.haml
View file @
38bcf699
...
...
@@ -6,7 +6,7 @@
-
expanded
=
Rails
.
env
.
test?
%section
.settings
%section
.settings
#js-general-pipeline-settings
.settings-header
%h4
General pipelines settings
...
...
app/views/shared/_auto_devops_callout.html.haml
View file @
38bcf699
.user-callout
{
data:
{
uid:
'auto_devops_settings_dismissed'
}
}
.user-callout
{
data:
{
uid:
'auto_devops_settings_dismissed'
,
project_path:
project_path
(
@project
)
}
}
.bordered-box.landing.content-block
%button
.btn.btn-default.close.js-close-callout
{
type:
'button'
,
'aria-label'
=>
'Dismiss Auto DevOps box'
}
...
...
@@ -12,4 +12,4 @@
#{
s_
(
'LearnMoreInThe|Learn more in the'
)
}
=
link_to
_
(
'Auto DevOps documentation'
),
help_page_path
(
'topics/autodevops/index.md'
),
target:
'_blank'
,
rel:
'noopener noreferrer'
=
link_to
_
(
'Enable in settings'
),
project_settings_ci_cd_path
(
@project
),
class:
'btn btn-primary js-close-callout'
=
link_to
_
(
'Enable in settings'
),
project_settings_ci_cd_path
(
@project
,
anchor:
'js-general-pipeline-settings'
),
class:
'btn btn-primary js-close-callout'
lib/gitlab/gon_helper.rb
View file @
38bcf699
...
...
@@ -28,9 +28,5 @@ module Gitlab
gon
.
current_user_avatar_url
=
current_user
.
avatar_url
end
end
def
add_gon_project_variables
gon
.
project_path
=
project_path
(
project
)
end
end
end
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