Redesign users list layout
This commit is contained in:
parent
954b7324f0
commit
159c31cd3f
|
|
@ -5,6 +5,10 @@ New features:
|
|||
|
||||
* Add Croatian language translation
|
||||
|
||||
Improvements:
|
||||
|
||||
* Change users list layout
|
||||
|
||||
Version 1.0.40 (Feb 24 2017)
|
||||
----------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class UserListController extends BaseController
|
|||
{
|
||||
$paginator = $this->userPagination->getListingPaginator();
|
||||
|
||||
$this->response->html($this->helper->layout->app('user_list/show', array(
|
||||
$this->response->html($this->helper->layout->app('user_list/listing', array(
|
||||
'title' => t('Users').' ('.$paginator->getTotal().')',
|
||||
'paginator' => $paginator,
|
||||
)));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<?= $this->text->e($task['column_name']) ?>
|
||||
|
||||
<?php if (! empty($task['category_id'])): ?>
|
||||
<span class="task-list-category">
|
||||
<span class="table-list-category">
|
||||
<?php if ($this->user->hasProjectAccess('TaskModificationController', 'edit', $task['project_id'])): ?>
|
||||
<?= $this->url->link(
|
||||
$this->text->e($task['category_name']),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
<div class="table-list-header">
|
||||
<div class="table-list-header-count">
|
||||
<?php if ($paginator->getTotal() > 1): ?>
|
||||
<?= t('%d users', $paginator->getTotal()) ?>
|
||||
<?php else: ?>
|
||||
<?= t('%d user', $paginator->getTotal()) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="table-list-header-menu">
|
||||
<?= $this->render('user_list/sort_menu', array('paginator' => $paginator)) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<div class="page-header">
|
||||
<?php if ($this->user->hasAccess('UserCreationController', 'show')): ?>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->modal->medium('plus', t('New user'), 'UserCreationController', 'show') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('paper-plane', t('Invite people'), 'UserInviteController', 'show') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('upload', t('Import'), 'UserImportController', 'show') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('users', t('View all groups'), 'GroupListController', 'index') ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('No users found.') ?></p>
|
||||
<?php elseif (! $paginator->isEmpty()): ?>
|
||||
<div class="table-list">
|
||||
<?= $this->render('user_list/header', array('paginator' => $paginator)) ?>
|
||||
<?php foreach ($paginator->getCollection() as $user): ?>
|
||||
<div class="table-list-row table-border-left">
|
||||
<?= $this->render('user_list/user_title', array(
|
||||
'user' => $user,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('user_list/user_details', array(
|
||||
'user' => $user,
|
||||
)) ?>
|
||||
|
||||
<?= $this->render('user_list/user_icons', array(
|
||||
'user' => $user,
|
||||
)) ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
||||
<?= $paginator ?>
|
||||
<?php endif ?>
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
<section id="main">
|
||||
<div class="page-header">
|
||||
<?php if ($this->user->hasAccess('UserCreationController', 'show')): ?>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->modal->medium('plus', t('New user'), 'UserCreationController', 'show') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('paper-plane', t('Invite people'), 'UserInviteController', 'show') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->modal->medium('upload', t('Import'), 'UserImportController', 'show') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $this->url->icon('users', t('View all groups'), 'GroupListController', 'index') ?>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php if ($paginator->isEmpty()): ?>
|
||||
<p class="alert"><?= t('No user') ?></p>
|
||||
<?php else: ?>
|
||||
<table class="table-scrolling table-striped table-hover">
|
||||
<tr>
|
||||
<th class="column-5"><?= $paginator->order(t('Id'), 'id') ?></th>
|
||||
<th class="column-18"><?= $paginator->order(t('Username'), 'username') ?></th>
|
||||
<th class="column-18"><?= $paginator->order(t('Name'), 'name') ?></th>
|
||||
<th class="column-15"><?= $paginator->order(t('Email'), 'email') ?></th>
|
||||
<th class="column-15"><?= $paginator->order(t('Role'), 'role') ?></th>
|
||||
<th class="column-12"><?= $paginator->order(t('Two Factor'), 'twofactor_activated') ?></th>
|
||||
<th class="column-10"><?= $paginator->order(t('Account type'), 'is_ldap_user') ?></th>
|
||||
<th class="column-12"><?= $paginator->order(t('Status'), 'is_active') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($paginator->getCollection() as $user): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $this->render('user_list/dropdown', array('user' => $user)) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->url->link($this->text->e($user['username']), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->text->e($user['name']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="mailto:<?= $this->text->e($user['email']) ?>"><?= $this->text->e($user['email']) ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->user->getRoleName($user['role']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['twofactor_activated'] ? t('Yes') : t('No') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($user['is_active'] == 1): ?>
|
||||
<?= t('Active') ?>
|
||||
<?php else: ?>
|
||||
<?= t('Inactive') ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
|
||||
<?= $paginator ?>
|
||||
<?php endif ?>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<div class="dropdown">
|
||||
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><strong><?= t('Sort') ?> <i class="fa fa-caret-down"></i></strong></a>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $paginator->order(t('User ID'), \Kanboard\Model\UserModel::TABLE.'.id') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Username'), \Kanboard\Model\UserModel::TABLE.'.username') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Name'), \Kanboard\Model\UserModel::TABLE.'.name') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Email'), \Kanboard\Model\UserModel::TABLE.'.email') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Account type'), \Kanboard\Model\UserModel::TABLE.'.is_ldap_user') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Role'), \Kanboard\Model\UserModel::TABLE.'.role') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Two Factor'), \Kanboard\Model\UserModel::TABLE.'.twofactor_activated') ?>
|
||||
</li>
|
||||
<li>
|
||||
<?= $paginator->order(t('Status'), \Kanboard\Model\UserModel::TABLE.'.is_active') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<div class="table-list-details table-list-details-with-icons">
|
||||
<span class="table-list-category">
|
||||
<?= $this->user->getRoleName($user['role']) ?>
|
||||
</span>
|
||||
|
||||
<?php if (! empty($user['name'])): ?>
|
||||
<span><?= $this->text->e($user['username']) ?></span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! empty($user['email'])): ?>
|
||||
<span><a href="mailto:<?= $this->text->e($user['email']) ?>"><?= $this->text->e($user['email']) ?></a></span>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
<div class="table-list-icons">
|
||||
<?php if ($user['notifications_enabled'] == 1): ?>
|
||||
<span title="<?= t('Notifications are activated') ?>">
|
||||
<i class="fa fa-bell-o" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['notifications_enabled'] == 0): ?>
|
||||
<span title="<?= t('Notifications are disabled') ?>">
|
||||
<i class="fa fa-bell-slash-o" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['twofactor_activated'] == 1): ?>
|
||||
<span title="<?= t('Two factor authentication enabled') ?>">
|
||||
<i class="fa fa-key" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['is_ldap_user'] == 1): ?>
|
||||
<span title="<?= t('Remote user') ?>">
|
||||
<i class="fa fa-cloud" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['lock_expiration_date'] != 0): ?>
|
||||
<span title="<?= t('Account locked until:') ?> <?= $this->dt->datetime($user['lock_expiration_date']) ?>">
|
||||
<i class="fa fa-lock" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['role'] == 'app-admin'): ?>
|
||||
<span title="<?= $this->user->getRoleName($user['role']) ?>">
|
||||
<i class="fa fa-star" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['role'] == 'app-manager'): ?>
|
||||
<span title="<?= $this->user->getRoleName($user['role']) ?>">
|
||||
<i class="fa fa-star-half-o" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['role'] == 'app-user'): ?>
|
||||
<span title="<?= $this->user->getRoleName($user['role']) ?>">
|
||||
<i class="fa fa-star-o" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($user['is_active'] == 0): ?>
|
||||
<span title="<?= t('User disabled') ?>">
|
||||
<i class="fa fa-ban" aria-hidden="true"></i>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<div>
|
||||
<?= $this->render('user_list/dropdown', array('user' => $user)) ?>
|
||||
<span class="table-list-title <?= $user['is_active'] == 0 ? 'status-closed' : '' ?>">
|
||||
<?= $this->avatar->small(
|
||||
$user['id'],
|
||||
$user['username'],
|
||||
$user['name'],
|
||||
$user['email'],
|
||||
$user['avatar_path'],
|
||||
'avatar-inline'
|
||||
) ?>
|
||||
<?= $this->url->link($this->text->e($user['name'] ?: $user['username']), 'UserViewController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</span>
|
||||
</div>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
.table-list-title
|
||||
font-weight: 500
|
||||
line-height: 23px
|
||||
&.status-closed
|
||||
text-decoration: line-through
|
||||
margin-right: 10px
|
||||
|
|
@ -55,10 +56,52 @@
|
|||
color: color('light')
|
||||
font-weight: 300
|
||||
line-height: 30px
|
||||
span
|
||||
margin-left: 5px
|
||||
&:first-child
|
||||
margin-left: 0
|
||||
li
|
||||
display: inline
|
||||
list-style-type: none
|
||||
&:after
|
||||
content: ', '
|
||||
&:last-child:after
|
||||
content: ''
|
||||
content: ''
|
||||
|
||||
.table-list-details-with-icons
|
||||
float: left
|
||||
@include sm-device
|
||||
float: none
|
||||
|
||||
.table-list-icons
|
||||
font-size: size('small')
|
||||
text-align: right
|
||||
line-height: 30px
|
||||
|
||||
@include sm-device
|
||||
text-align: left
|
||||
line-height: 20px
|
||||
|
||||
span
|
||||
margin-left: 5px
|
||||
|
||||
a
|
||||
text-decoration: none
|
||||
&:hover
|
||||
color: link-color('hover')
|
||||
i
|
||||
color: link-color('hover')
|
||||
|
||||
.table-list-category
|
||||
font-size: size('compact')
|
||||
font-weight: 500
|
||||
color: color('dark')
|
||||
padding: 1px 3px 1px 2px
|
||||
border-radius: 3px
|
||||
background: bg-color('light')
|
||||
border: 1px solid #ccc
|
||||
a
|
||||
text-decoration: none
|
||||
color: color('dark')
|
||||
&:hover
|
||||
color: link-color('primary')
|
||||
|
|
|
|||
|
|
@ -7,22 +7,11 @@
|
|||
|
||||
.task-board-category
|
||||
border: 1px solid #555
|
||||
a
|
||||
&:hover
|
||||
text-decoration: underline
|
||||
|
||||
.task-list-category
|
||||
background: bg-color('light')
|
||||
border: 1px solid #ccc
|
||||
a
|
||||
text-decoration: none
|
||||
color: color('dark')
|
||||
&:hover
|
||||
color: link-color('primary')
|
||||
|
||||
.task-board-category, .task-list-category
|
||||
font-size: size('compact')
|
||||
font-weight: 500
|
||||
color: color('dark')
|
||||
padding: 1px 3px 1px 2px
|
||||
border-radius: 3px
|
||||
a
|
||||
&:hover
|
||||
text-decoration: underline
|
||||
|
|
|
|||
Loading…
Reference in New Issue