blob: 566d719f8a9433172603697efec957c955ca5ced (
plain)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
<style>
.gButtonLink {
border-width: 1px;
border-style: solid;
border-color: #ececec #c8c8c8 #c8c8c8 #ececec;
background-image: url('/gallery3/themes/admin_default/images/backg-buttonlink.png');
padding: .2em .3em;
font-weight: bold;
}
.gButtonLink:hover {
border-color: #c8c8c8 #ececec #ececec #c8c8c8;
}
.gBlock h2 a {
font-size: .7em;
float: right;
position: relative;
top: -1.69em;
}
.gUserAdminList li {
padding: .4em .4em .3em .4em;
position: relative;
}
.gUserAdminList li img {
width: 20px;
height: 20px;
cursor: move;
}
.gFirstRow {
border-bottom: 1px solid grey;
padding-bottom: .5em;
padding-left: 30px !important;
}
.gOddRow {
background-color: #f1f1f1;
}
.gActions {
position: absolute;
left: 400px;
}
.gActions a, .gActions span {
margin-right: 40px;
}
.gPanel {
display: none;
}
li.gGroup {
float: left;
display: block;
width: 200px;
height: 200px;
border: 1px solid gray;
padding: .5em;
margin-right: 1em;
}
</style>
<div class="gBlock">
<h2>
<?= t("User Admin") ?>
<a class="gButtonLink" href="#" title="<?= t("Create a new user") ?>">+ <?= t("Add user") ?></a>
</h2>
<div class="gBlockContent">
<ul class="gUserAdminList">
<li class="gFirstRow">
<strong>Username</strong>
(Full name)
<span class="understate">last login</span>
</li>
<? foreach ($users as $i => $user): ?>
<li class="<?= ($i % 2 == 0) ? "gEvenRow" : "gOddRow" ?>">
<img src="<?= $theme->url("images/avatar.jpg") ?>"
title="<?= t("Drag user onto group below to add as a new member") ?>"
width="20" height="20" />
<strong><?= $user->name ?></strong>
(<?= $user->full_name ?>)
<span class="understate">
<?= ($user->last_login == 0) ? "" : date("M j, Y", $user->last_login) ?>
</span>
<span class="gActions">
<a href="users/edit_form/<?= $user->id ?>" class="gPanelLink"><?= t("edit") ?></a>
<!--<a href="users/edit_form/<?= $user->id ?>" class="gDialogLink"><?= t("edit") ?></a>-->
<? if (!(user::active()->id == $user->id || user::guest()->id == $user->id)): ?>
<a href="users/delete_form/<?= $user->id ?>" class="gDialogLink"><?= t("delete") ?></a>
<? else: ?>
<span class="inactive" title="<?= t("This user can't be deleted") ?>">
<?= t("delete") ?>
</span>
<? endif ?>
</span>
<form id="gUserEdit-<?= $user->id ?>" class="gPanel">
<fieldset>
<label>Username</label>
<input type="text" />
<label>Full name</label>
<input type="text" />
<label>Email</label>
<input type="text" />
...
<input type="submit" value="Save changes" />
<a href="#" class="gPanelLink"><?= t("cancel") ?></a>
</fieldset>
</form>
</li>
<? endforeach ?>
</ul>
<br />
<a href="users/add_form" class="gDialogLink gButtonLink" title="<?= t("Create a new user") ?>">
+ <?= t("Add a new user") ?>
</a>
</div>
</div>
<div class="gBlock">
<h2>
<?= t("Group Admin") ?>
<a class="gButtonLink" href="#" title="<?= t("Create a new group") ?>">+ <?= t("Add group") ?></a>
</h2>
<div id="gGroupAdmin" class="gBlockContent">
<ul>
<? foreach ($groups as $i => $group): ?>
<li class="gGroup">
<strong><?= $group->name?></strong><br />
<ul>
<? foreach ($group->users as $i => $user): ?>
<li class="gUser">
<?= $user->name ?>
<a href="groups/remove_users/<?= $user->id ?>">X</a>
</li>
<? endforeach ?>
</ul>
</li>
<? endforeach ?>
<li class="gGroup">
<a href="groups/add_form" title="<?= t("Create a new group") ?>">
+ <?= t("Add a new group") ?>
</a
</li>
</ul>
</div>
</div>
|