diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-18 12:56:32 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-18 12:56:32 -0400 |
commit | 46eafe105fe97b7be8b8a25a72b491bef03fea8c (patch) | |
tree | c499a668b23ca6edf4cd158e4f8dc57d6b31edd6 /app/Template/user | |
parent | ac6e7bdfbf3479c655d7b883e50b6b01aa08784d (diff) |
Add ical export for users
Diffstat (limited to 'app/Template/user')
-rw-r--r-- | app/Template/user/share.php | 17 | ||||
-rw-r--r-- | app/Template/user/show.php | 29 | ||||
-rw-r--r-- | app/Template/user/sidebar.php | 3 |
3 files changed, 47 insertions, 2 deletions
diff --git a/app/Template/user/share.php b/app/Template/user/share.php new file mode 100644 index 00000000..98010d4f --- /dev/null +++ b/app/Template/user/share.php @@ -0,0 +1,17 @@ +<div class="page-header"> + <h2><?= t('Public access') ?></h2> +</div> + +<?php if (! empty($user['token'])): ?> + + <div class="listing"> + <ul class="no-bullet"> + <li><strong><i class="fa fa-calendar"></i> <?= $this->a(t('iCalendar (iCal format, *.ics)'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + </ul> + </div> + + <?= $this->a(t('Disable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?> + +<?php else: ?> + <?= $this->a(t('Enable public access'), 'user', 'share', array('user_id' => $user['id'], 'switch' => 'enable'), true, 'btn btn-blue') ?> +<?php endif ?> diff --git a/app/Template/user/show.php b/app/Template/user/show.php index 490d8fb3..9473b382 100644 --- a/app/Template/user/show.php +++ b/app/Template/user/show.php @@ -5,10 +5,35 @@ <li><?= t('Username:') ?> <strong><?= $this->e($user['username']) ?></strong></li> <li><?= t('Name:') ?> <strong><?= $this->e($user['name']) ?: t('None') ?></strong></li> <li><?= t('Email:') ?> <strong><?= $this->e($user['email']) ?: t('None') ?></strong></li> +</ul> + +<div class="page-header"> + <h2><?= t('Security') ?></h2> +</div> +<ul class="listing"> + <li><?= t('Group:') ?> <strong><?= $user['is_admin'] ? t('Administrator') : t('Regular user') ?></strong></li> + <li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li> + <li><?= $user['twofactor_activated'] == 1 ? t('Two factor authentication enabled') : t('Two factor authentication disabled') ?></li> +</ul> + +<div class="page-header"> + <h2><?= t('Preferences') ?></h2> +</div> +<ul class="listing"> <li><?= t('Default project:') ?> <strong><?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? $this->e($projects[$user['default_project_id']]) : t('None') ?></strong></li> <li><?= t('Timezone:') ?> <strong><?= $this->inList($user['timezone'], $timezones) ?></strong></li> <li><?= t('Language:') ?> <strong><?= $this->inList($user['language'], $languages) ?></strong></li> <li><?= t('Notifications:') ?> <strong><?= $user['notifications_enabled'] == 1 ? t('Enabled') : t('Disabled') ?></strong></li> - <li><?= t('Group:') ?> <strong><?= $user['is_admin'] ? t('Administrator') : t('Regular user') ?></strong></li> - <li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li> </ul> + +<?php if (! empty($user['token'])): ?> + <div class="page-header"> + <h2><?= t('Public access') ?></h2> + </div> + + <div class="listing"> + <ul class="no-bullet"> + <li><strong><i class="fa fa-calendar"></i> <?= $this->a(t('iCalendar (iCal format, *.ics)'), 'ical', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + </ul> + </div> +<?php endif ?> diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index ff0fb009..8c7e3cf8 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -49,6 +49,9 @@ <?php endif ?> <li> + <?= $this->a(t('Public access'), 'user', 'share', array('user_id' => $user['id'])) ?> + </li> + <li> <?= $this->a(t('Email notifications'), 'user', 'notifications', array('user_id' => $user['id'])) ?> </li> <li> |