Skip to content

Commit 7477200

Browse files
committed
Added help link - because this is a partial used by many pages - kind of hacky and changes some translations
1 parent 7bef30b commit 7477200

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

application/layouts/scripts/1-column-blue-grey-tabs.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ require PARTIAL_DIR . 'header-start.php';
4848
$(document).ready(function() {
4949
$('#Tabs').tabs();
5050

51-
$('ul.nav>li').live('click', function(e) {
51+
$('ul.nav>li').not('[data-external-link=true]').live('click', function(e) {
5252
e.preventDefault();
5353
var href = $(this).find('a').attr('href');
5454
document.location = '/' + href + $('div#Tabs li.ui-tabs-selected>a').attr('href');

application/layouts/scripts/partials/nav.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66
<li class="<?php if ($lang==='nl'): ?>active<?php endif; ?>">
77
<a href="<?php echo EngineBlock_View::setLanguage('nl'); ?>">NL</a>
88
</li>
9+
<?php if (EngineBlock_View::moduleName() == 'profile'): ?>
10+
<li data-external-link="true">
11+
<a href="https://wiki.surfnet.nl/display/conextsupport/Profile+page" target="_blank">Help</a>
12+
</li>
13+
<?php endif; ?>
914
</ul>

languages/en.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
'profile_apps_eula_th' => 'EULA',
129129
'profile_apps_support_name_th' => 'Support person name',
130130
'profile_apps_support_url_th' => 'Support URL',
131-
'profile_apps_support_email_th' => 'Support person email',
131+
'profile_apps_support_email_th' => 'Support email',
132132
'profile_apps_support_phone_th' => 'Support person phone',
133133
'profile_apps_consent_th' => 'Consent group information',
134134
'profile_revoke_consent' => 'Revoke',

library/EngineBlock/View.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,17 @@ public static function profileUrl($path = "")
149149
return $settings->profile->protocol . '://'. $settings->profile->host . $path;
150150
}
151151

152+
/**
153+
* Return the module name
154+
*
155+
* @return string
156+
*/
157+
public static function moduleName()
158+
{
159+
$serverName = $_SERVER['SERVER_NAME'];
160+
return $serverName ? strtolower(trim(substr($serverName, 0, strpos($serverName, '.')))) : 'engine';
161+
}
162+
152163
/**
153164
* Set the language on the query string and return the new query string
154165
*

0 commit comments

Comments
 (0)