Skip to content
Permalink
Browse files

MDL-55813 message: add online/offline help icons on preferences page

  • Loading branch information...
ryanwyllie authored and markn86 committed Sep 28, 2016
1 parent fadb831 commit 7b477f5982b065bc2b788dc6dbaf75f3c3cb6b70
@@ -83,9 +83,11 @@
$string['keywordssearchresultstoomany'] = 'More than {$a} messages found. Refine your search.';
$string['loading'] = 'Loading ...';
$string['loggedin'] = 'Online';
$string['loggedindescription'] = 'When I\'m logged in';
$string['loggedoff'] = 'Not online';
$string['loggedoffdescription'] = 'When I\'m offline';
$string['loggedin_help'] = 'Configure how you would like to receive notifications when you are logged into Moodle';
$string['loggedindescription'] = 'When you are logged into Moodle';
$string['loggedoff'] = 'Offline';
$string['loggedoff_help'] = 'Configure how you would like to receive notifications when you are not logged into Moodle';
$string['loggedoffdescription'] = 'When you are not logged into Moodle';
$string['managecontacts'] = 'Manage my contacts';
$string['managemessageoutputs'] = 'Manage message outputs';
$string['messageoutputs'] = 'Message outputs';
@@ -162,6 +162,15 @@ public function export_for_template(\renderer_base $output) {
$context['components'][] = $notificationcomponent->export_for_template($output);
}
// This is fairly nasty but we don't currently have a way to add help icons
// in templates, so we'll need to provide it in the context.
//
// We only want the first component to render with the help icon.
if (!empty($context['components'])) {
$context['components'][0]['onlinehelphtml'] = $output->help_icon('loggedin', 'message');
$context['components'][0]['offlinehelphtml'] = $output->help_icon('loggedoff', 'message');
}
return $context;
}
}
@@ -99,8 +99,14 @@
<td class="align-bottom">
<div class="container-fluid">
<div class="row-fluid">
<div class="span6">{{#str}} online, message {{/str}}</div>
<div class="span6">{{#str}} offline, message {{/str}}</div>
<div class="span6">
{{#str}} loggedin, message {{/str}}
{{#onlinehelphtml}}{{{.}}}{{/onlinehelphtml}}
</div>
<div class="span6">
{{#str}} loggedoff, message {{/str}}
{{#offlinehelphtml}}{{{.}}}{{/offlinehelphtml}}
</div>
</div>
</div>
</td>
@@ -120,8 +120,14 @@
<td class="align-bottom">
<div class="container-fluid">
<div class="row-fluid">
<div class="span6">{{#str}} online, message {{/str}}</div>
<div class="span6">{{#str}} offline, message {{/str}}</div>
<div class="span6">
{{#str}} loggedin, message {{/str}}
{{#onlinehelphtml}}{{{.}}}{{/onlinehelphtml}}
</div>
<div class="span6">
{{#str}} loggedoff, message {{/str}}
{{#offlinehelphtml}}{{{.}}}{{/offlinehelphtml}}
</div>
</div>
</div>
</td>

0 comments on commit 7b477f5

Please sign in to comment.
You can’t perform that action at this time.