File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 <!-- If page_banner is not empty the text is used to create a page banner strip -->
1616 <page_banner ></page_banner >
1717
18+ <!-- Documentation links to be configurable -->
19+ <project >
20+ <doc_link ></doc_link >
21+ </project >
22+
23+ <ngi >
24+ <doc_link ></doc_link >
25+ </ngi >
26+
27+ <service_group >
28+ <doc_link ></doc_link >
29+ </service_group >
30+
1831 <!-- Email addresses to send from and reply to -->
1932 <email_from >no-reply@localhost</email_from >
2033 <email_to >gocdb-admins@localhost</email_to >
Original file line number Diff line number Diff line change 121121 </xs : complexType >
122122 </xs : element >
123123 <xs : element name =" send_email" type =" xs:boolean" minOccurs =" 0" />
124+
125+ <xs : element name =" project" minOccurs =" 0" >
126+ <xs : complexType >
127+ <xs : all >
128+ <xs : element name =" doc_link" type =" xs:string" />
129+ </xs : all >
130+ </xs : complexType >
131+ </xs : element >
132+
133+ <xs : element name =" ngi" minOccurs =" 0" >
134+ <xs : complexType >
135+ <xs : all >
136+ <xs : element name =" doc_link" type =" xs:string" />
137+ </xs : all >
138+ </xs : complexType >
139+ </xs : element >
140+
141+ <xs : element name =" service_group" minOccurs =" 0" >
142+ <xs : complexType >
143+ <xs : all >
144+ <xs : element name =" doc_link" type =" xs:string" />
145+ </xs : all >
146+ </xs : complexType >
147+ </xs : element >
148+
124149 </xs : all >
125150 <xs : attribute name =" url" type =" xs:anyURI" />
126151 </xs : complexType >
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ function view_ngis() {
2525 require_once __DIR__ . '/../utils.php ' ;
2626 require_once __DIR__ .'/../../../../lib/Gocdb_Services/Factory.php ' ;
2727
28+ $ configService = \Factory::getConfigservice ();
29+
2830 $ filterParams = array ();
2931
3032// $scope = '%%';
@@ -68,6 +70,11 @@ function view_ngis() {
6870 $ params ['ngis ' ] = $ ngis ;
6971 $ params ['scopes ' ]=$ scopes ;
7072 $ params ['selectedScopes ' ]=$ selectedScopes ;
73+
74+ // adding the configurable ngi documentation link to the params array
75+ $ ngiDocLink = $ configService ->getNgiDocLink ();
76+ $ params ['ngiDocLink ' ] = $ ngiDocLink ;
77+
7178 show_view ('ngi/view_ngis.php ' , $ params , "NGIs " );
7279}
7380
Original file line number Diff line number Diff line change 2222
2323function show_all_projects () {
2424 require_once __DIR__ .'/../../../../lib/Gocdb_Services/Factory.php ' ;
25- $ projects = \Factory::getProjectService ()->getProjects ();
25+
26+ $ params = array ();
27+
28+ $ configService = \Factory::getConfigService ();
29+ $ projectService = \Factory::getProjectService ();
30+
31+ $ projects = $ projectService ->getProjects ();
2632 $ params ['Projects ' ] = $ projects ;
33+
34+ // adding the configurable project documentation link to the params array
35+ $ projectDocLink = $ configService ->getProjectDocLink ();
36+ $ params ['projectDocLink ' ] = $ projectDocLink ;
37+
2738 show_view ('project/view_all.php ' , $ params , "Projects " );
2839}
2940
30- ?>
41+ ?>
Original file line number Diff line number Diff line change 2222function showAllServiceGroups (){
2323 require_once __DIR__ .'/../../../../lib/Gocdb_Services/Factory.php ' ;
2424
25+ $ configService = \Factory::getConfigService ();
26+
2527 $ filterParams = array ();
2628
2729 // Scope parameters
@@ -90,5 +92,11 @@ function showAllServiceGroups(){
9092 $ params ['selectedExtKeyName ' ] = $ extensionPropName ; //$sgKeyNames;
9193 $ params ['selectedExtKeyValue ' ] = $ extensionPropValue ; //$sgKeyValues;
9294 $ params ['extKeyName ' ] = $ keynames ;
95+
96+ // adding the configurable service group documentation link
97+ // to the params array.
98+ $ serviceGroupDocLink = $ configService ->getServiceGroupDocLink ();
99+ $ params ['serviceGroupDocLink ' ] = $ serviceGroupDocLink ;
100+
93101 show_view ("service_group/view_all.php " , $ params );
94102}
Original file line number Diff line number Diff line change 1313 National Grid Initiatives
1414 </span>
1515 <span style="clear: both; float: left; padding-bottom: 0.4em;">
16- <a style="float: left; padding-top: 0.3em;" href="http://www.egi.eu/about/glossary/glossary_N.html ">What is an NGI?</a>
16+ <a style="float: left; padding-top: 0.3em;" href="<?php echo $ params [ ' ngiDocLink ' ] ?> ">What is an NGI?</a>
1717 </span>
1818 </div>
1919
Original file line number Diff line number Diff line change 1111 </span>
1212 <span style="clear: both; float: left; padding-bottom: 0.4em;">
1313<!-- TODO: link -->
14- <a style="float: left; padding-top: 0.3em;" href="https://wiki.egi.eu/wiki/GOCDB/Input_System_User_Documentation#Projects ">
14+ <a style="float: left; padding-top: 0.3em;" href="<?php echo $ params [ ' projectDocLink ' ] ?> ">
1515 What is a project?
1616 </a>
1717 </span>
Original file line number Diff line number Diff line change 1010 All Service Groups in GOCDB.
1111 </span>
1212 <span style="clear: both; float: left; padding-bottom: 0.4em;">
13- <a style="float: left; padding-top: 0.3em;" href="https://wiki.egi.eu/wiki/GOCDB/Input_System_User_Documentation#Service_Groups ">
13+ <a style="float: left; padding-top: 0.3em;" href="<?php echo $ params [ ' serviceGroupDocLink ' ] ?> ">
1414 What is a service group?
1515 </a>
1616 </span>
Original file line number Diff line number Diff line change @@ -567,4 +567,26 @@ public function getEmailTo()
567567
568568 return $ emailTo ;
569569 }
570+
571+ public function getProjectDocLink ()
572+ {
573+ $ projectDocLink = $ this ->GetLocalInfoXML ()->project ->doc_link ;
574+
575+ return $ projectDocLink ;
576+ }
577+
578+ public function getNgiDocLink ()
579+ {
580+ $ ngiDocLink = $ this ->GetLocalInfoXML ()->ngi ->doc_link ;
581+
582+ return $ ngiDocLink ;
583+ }
584+
585+ public function getServiceGroupDocLink ()
586+ {
587+ $ localInfo = $ this ->GetLocalInfoXML ();
588+ $ serviceGroupDocLink = $ localInfo ->service_group ->doc_link ;
589+
590+ return $ serviceGroupDocLink ;
591+ }
570592}
You can’t perform that action at this time.
0 commit comments