Commit f4b76cb1 authored by Alain Takoudjou's avatar Alain Takoudjou

nxd: Show more than one ICP on footer page

ICPs should be listed in a string serapared by space
parent 29ab96c5
...@@ -206,6 +206,12 @@ module PageLayoutHelper ...@@ -206,6 +206,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
...@@ -7,4 +7,6 @@ ...@@ -7,4 +7,6 @@
= link_to _("About GitLab"), "https://about.gitlab.com/" = link_to _("About GitLab"), "https://about.gitlab.com/"
- if should_render_icp? - if should_render_icp?
= render_icp = render_icp
- if has_second_icp?
= render_icp(1)
= footer_message = footer_message
...@@ -36,3 +36,6 @@ ...@@ -36,3 +36,6 @@
- if should_render_icp? - if should_render_icp?
| |
= render_icp = render_icp
- if has_second_icp?
|
= render_icp(1)
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