-
Notifications
You must be signed in to change notification settings - Fork 34
/
index.php
84 lines (80 loc) · 5.57 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
$userMapper = $this->get('userMapper');
$profileFieldsContentMapper = $this->get('profileFieldsContentMapper');
$profileIconFields = $this->get('profileIconFields');
$profileFieldsTranslation = $this->get('profileFieldsTranslation');
$group = $this->get('group');
$groupText = (!empty($group)) ? ' ('.$this->getTrans('group').': '.$this->escape($group->getName()).')' : '';
?>
<link href="<?=$this->getModuleUrl('static/css/user.css') ?>" rel="stylesheet">
<h1><?=$this->getTrans('menuUserList').$groupText ?></h1>
<?=$this->get('pagination')->getHtml($this, ['action' => 'index']) ?>
<div class="userlist">
<div class="row">
<div class="col-lg-12">
<div class="table-responsive">
<table class="table table-hover table-bordered">
<colgroup>
<col class="col-lg-3" />
<col class="col-lg-3" />
<col class="col-lg-3" />
<col class="col-lg-3" />
</colgroup>
<thead>
<tr>
<th><?=$this->getTrans('userlistName') ?></th>
<th><?=$this->getTrans('userlistRegist') ?></th>
<th><?=$this->getTrans('userDateLastActivity') ?></th>
<th><?=$this->getTrans('userlistContact') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->get('userList') as $userlist): ?>
<?php $ilchDate = new Ilch\Date($userlist->getDateCreated()); ?>
<?php $ilchLastDate = (!empty($userlist->getDateLastActivity())) ? new Ilch\Date($userlist->getDateLastActivity()) : ''; ?>
<?php $profileFieldsContent = $profileFieldsContentMapper->getProfileFieldContentByUserId($userlist->getId()); ?>
<tr>
<td>
<a href="<?=$this->getUrl(['controller' => 'profil', 'action' => 'index', 'user' => $userlist->getId()]) ?>" title="<?=$this->escape($userlist->getName()) ?>s <?=$this->getTrans('profile') ?>" class="user-link"><?=$this->escape($userlist->getName()) ?></a>
</td>
<td>
<?=substr($this->getTrans($ilchDate->format('l')), 0, 2).', '.$ilchDate->format('d. ').$this->getTrans($ilchDate->format('M')).$ilchDate->format(' Y') ?>
</td>
<td>
<?=(!empty($ilchLastDate)) ? substr($this->getTrans($ilchLastDate->format('l')), 0, 2).', '.$ilchLastDate->format('d. ').$this->getTrans($ilchLastDate->format('M')).$ilchLastDate->format(' Y') : '' ?>
</td>
<td>
<?php if ($this->getUser() && $this->getUser()->getId() != $this->escape($userlist->getID())): ?>
<a href="<?=$this->getUrl(['controller' => 'panel', 'action' => 'dialognew', 'id' => $userlist->getId()]) ?>" class="fa fa-comment fa-lg user-link" title="<?=$this->getTrans('privateMessage') ?>"></a>
<?php endif; ?>
<?php if ($userlist->getOptMail() == 1 && $this->getUser() && $this->getUser()->getId() != $userlist->getID()): ?>
<a href="<?=$this->getUrl(['controller' => 'mail', 'action' => 'index', 'user' => $userlist->getId()]) ?>" class="fa fa-envelope fa-lg user-link" title="<?=$this->getTrans('email') ?>"></a>
<?php endif; ?>
<?php foreach ($profileIconFields as $profileIconField) {
if ($profileIconField->getShow()) {
foreach ($profileFieldsContent as $profileFieldContent) {
if ($profileFieldContent->getValue() && $profileIconField->getId() == $profileFieldContent->getFieldId()) {
$profileFieldName = $profileIconField->getKey();
foreach ($profileFieldsTranslation as $profileFieldTrans) {
if ($profileIconField->getId() == $profileFieldTrans->getFieldId()) {
$profileFieldName = $profileFieldTrans->getName();
break;
}
}
echo '<a href="'.$profileIconField->getAddition().$profileFieldContent->getValue().'" target="_blank" rel="noopener" class="fa '.$profileIconField->getIcon().' fa-lg user-link" title="'.$profileFieldName.'"></a>';
break;
}
}
}
}
?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?=$this->get('pagination')->getHtml($this, ['action' => 'index']) ?>