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
3256f1fc
Commit
3256f1fc
authored
Jul 20, 2022
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxd: Show more than one ICP on footer page
ICPs should be listed in a string serapared by space
parent
b150a446
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
app/helpers/page_layout_helper.rb
app/helpers/page_layout_helper.rb
+7
-2
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+3
-0
app/views/layouts/devise.html.haml
app/views/layouts/devise.html.haml
+2
-0
No files found.
app/helpers/page_layout_helper.rb
View file @
3256f1fc
...
@@ -135,7 +135,12 @@ module PageLayoutHelper
...
@@ -135,7 +135,12 @@ module PageLayoutHelper
# TODO render ICP only for requests from China
# TODO render ICP only for requests from China
end
end
def
render_icp
def
render_icp
(
index
=
0
)
link_to
extra_config
.
ICP
,
"http://www.miibeian.gov.cn/"
icp_list
=
extra_config
.
ICP
.
split
link_to
icp_list
[
index
],
"https://beian.miit.gov.cn/#Integrated/index"
end
def
has_second_icp?
should_render_icp?
&&
extra_config
.
ICP
.
split
.
count
>
1
end
end
end
end
app/views/layouts/_page.html.haml
View file @
3256f1fc
...
@@ -29,3 +29,6 @@
...
@@ -29,3 +29,6 @@
-
if
should_render_icp?
-
if
should_render_icp?
|
|
=
render_icp
=
render_icp
-
if
has_second_icp?
|
=
render_icp
(
1
)
app/views/layouts/devise.html.haml
View file @
3256f1fc
...
@@ -45,3 +45,5 @@
...
@@ -45,3 +45,5 @@
=
link_to
_
(
"About Nexedi"
),
"http://www.nexedi.com/"
=
link_to
_
(
"About Nexedi"
),
"http://www.nexedi.com/"
-
if
should_render_icp?
-
if
should_render_icp?
=
render_icp
=
render_icp
-
if
has_second_icp?
=
render_icp
(
1
)
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