Indefero

Indefero Commit Details


Date:2009-01-02 04:38:35 (15 years 11 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:404e2cd150c930108bb65961e9278d7e9464b37d
Parents: 3aaf24d3bb13b45275d458a55b955bf1494a64fb
Message:Added the filtering of the non validated users by default.

Changes:

File differences

src/IDF/Views/Admin.php
147147
148148
149149
150
150
151151
152
153152
153
154
155
156
157
158
159
160
161
154162
155163
156164
......
164172
165173
166174
167
175
168176
169177
170178
......
173181
174182
175183
184
176185
177186
178187
188
189
190
191
192
193
194
195
196
179197
180198
181199
*
*/
public $users_precond = array('Pluf_Precondition::staffRequired');
public function users($request, $match)
public function users($request, $match, $not_validated=false)
{
$title = __('User List');
$pag = new Pluf_Paginator(new Pluf_User());
$db =& Pluf::db();
$true = Pluf_DB_BooleanToDb(true, $db);
if ($not_validated) {
$pag->forced_where = new Pluf_SQL('first_name = \'---\' AND active!='.$true);
$title = __('Not Validated User List');
} else {
$pag->forced_where = new Pluf_SQL('first_name != \'---\' AND active='.$true);
$title = __('User List');
}
$pag->class = 'recent-issues';
$pag->summary = __('This table shows the users in the forge.');
$pag->action = 'IDF_Views_Admin::users';
array('active', 'IDF_Views_Admin_bool', __('Active')),
array('last_login', 'Pluf_Paginator_DateYMDHM', __('Last Login')),
);
$pag->extra_classes = array('', 'a-c', 'a-c', 'a-c', 'a-c', 'a-c');
$pag->extra_classes = array('', '', 'a-c', 'a-c', 'a-c', 'a-c');
$pag->configure($list_display, array(), array('login'));
$pag->items_per_page = 50;
$pag->no_results_text = __('No users were found.');
array(
'page_title' => $title,
'users' => $pag,
'not_validated' => $not_validated,
),
$request);
}
/**
* Not validated users.
*/
public $usersNotValidated_precond = array('Pluf_Precondition::staffRequired');
public function usersNotValidated($request, $match)
{
return $this->users($request, $match, true);
}
/**
* Edition of a user.
src/IDF/conf/urls.php
423423
424424
425425
426
427
428
429
430
431
426432
427433
428434
'model' => 'IDF_Views_Admin',
'method' => 'users');
$ctl[] = array('regex' => '#^/admin/users/notvalid/$#',
'base' => $base,
'priority' => 4,
'model' => 'IDF_Views_Admin',
'method' => 'usersNotValidated');
$ctl[] = array('regex' => '#^/admin/users/(\d+)/$#',
'base' => $base,
'priority' => 4,
src/IDF/templates/idf/gadmin/users/index.html
66
77
88
9
10
11
12
913
1014
1115
{$users.render}
{/block}
{block context}
<p>{trans 'Number of users:'} <strong>{$users.nb_items}</strong></p>
{if !$not_validated}{aurl 'url', 'IDF_Views_Admin::usersNotValidated'}
<p class="helptext">{blocktrans}See <a href="{$url}">not validated users</a>.{/blocktrans}</p>
{/if}
<div class="issue-submit-info">
{blocktrans}<p>You have here an overview of the users registered in the forge.</p>{/blocktrans}
</div>

Archive Download the corresponding diff file

Page rendered in 0.07867s using 13 queries.