Drupal: Added user roles to forum user info, below username and stats.

https://dev.gridrepublic.org/browse/DBOINCP-253
This commit is contained in:
Shawn Kwang 2017-05-10 15:23:55 -05:00
parent 50e8f9eac0
commit 3ada381c7e
3 changed files with 18 additions and 0 deletions
drupal/sites/default/boinc/themes/boinc/templates

View File

@ -102,6 +102,12 @@
?>
<div class="name"><?php print $author; ?></div>
<?php if ($account->uid): ?>
<?php if (in_array('moderator', $account->roles)): ?>
<div class="moderator"><?php print bts('Moderator', array(), NULL, 'boinc:user-info'); ?></div>
<?php endif; ?>
<?php if (in_array('administrator', $account->roles)): ?>
<div class="administrator"><?php print bts('Administrator', array(), NULL, 'boinc:user-info'); ?></div>
<?php endif; ?>
<?php $nf = new NumberFormatter($locality, NumberFormatter::DECIMAL); ;?>
<?php $nf->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, 0); ;?>
<?php $nf->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, 0); ;?>

View File

@ -157,6 +157,12 @@
?>
<div class="name"><?php print $name; ?></div>
<?php if ($account->uid): ?>
<?php if (in_array('moderator', $account->roles)): ?>
<div class="moderator"><?php print bts('Moderator', array(), NULL, 'boinc:user-info'); ?></div>
<?php endif; ?>
<?php if (in_array('administrator', $account->roles)): ?>
<div class="administrator"><?php print bts('Administrator', array(), NULL, 'boinc:user-info'); ?></div>
<?php endif; ?>
<?php $nf = new NumberFormatter($locality, NumberFormatter::DECIMAL); ;?>
<?php $nf->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, 0); ;?>
<?php $nf->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, 0); ;?>

View File

@ -173,6 +173,12 @@
?>
<div class="name"><?php print $name; ?></div>
<?php if ($account->uid): ?>
<?php if (in_array('moderator', $account->roles)): ?>
<div class="moderator"><?php print bts('Moderator', array(), NULL, 'boinc:user-info'); ?></div>
<?php endif; ?>
<?php if (in_array('administrator', $account->roles)): ?>
<div class="administrator"><?php print bts('Administrator', array(), NULL, 'boinc:user-info'); ?></div>
<?php endif; ?>
<?php $nf = new NumberFormatter($locality, NumberFormatter::DECIMAL); ;?>
<?php $nf->setAttribute(NumberFormatter::MIN_FRACTION_DIGITS, 0); ;?>
<?php $nf->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, 0); ;?>