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
4705cdc5
Commit
4705cdc5
authored
Dec 01, 2021
by
Axel García
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: GTM and OneTrust to terms view
- Move scripts views from layout to the view - Add CSP to TermsController
parent
87fd6e5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
app/controllers/users/terms_controller.rb
app/controllers/users/terms_controller.rb
+1
-0
app/views/layouts/terms.html.haml
app/views/layouts/terms.html.haml
+0
-4
app/views/users/terms/index.html.haml
app/views/users/terms/index.html.haml
+4
-0
No files found.
app/controllers/users/terms_controller.rb
View file @
4705cdc5
...
...
@@ -3,6 +3,7 @@
module
Users
class
TermsController
<
ApplicationController
include
InternalRedirect
include
OneTrustCSP
skip_before_action
:authenticate_user!
,
only:
[
:index
]
skip_before_action
:enforce_terms!
...
...
app/views/layouts/terms.html.haml
View file @
4705cdc5
...
...
@@ -3,12 +3,8 @@
-
@hide_breadcrumbs
=
true
%html
{
lang:
I18n
.
locale
,
class:
page_class
}
=
render
"layouts/head"
-
content_for
:page_specific_javascripts
do
=
render
"layouts/google_tag_manager_head"
=
render
"layouts/one_trust"
%body
{
data:
{
page:
body_data_page
}
}
=
render
"layouts/google_tag_manager_body"
.layout-page.terms
{
class:
page_class
}
.content-wrapper.gl-pb-5
.mobile-overlay
...
...
app/views/users/terms/index.html.haml
View file @
4705cdc5
-
redirect_params
=
{
redirect:
@redirect
}
if
@redirect
-
accept_term_link
=
accept_term_path
(
@term
,
redirect_params
)
-
content_for
:page_specific_javascripts
do
=
render
"layouts/google_tag_manager_head"
=
render
"layouts/one_trust"
=
render
"layouts/google_tag_manager_body"
-
if
Feature
.
enabled?
(
:terms_of_service_vue
,
current_user
,
default_enabled: :yaml
)
#js-terms-of-service
{
data:
{
terms_data:
terms_data
(
@term
,
@redirect
)
}
}
...
...
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