srchub

srchub Commit Details


Date:2015-08-30 20:24:03 (9 years 3 months ago)
Author:Natalie Adams
Branch:master
Commit:90ce6fda4cea41943f75e7e0e6794f28fbaf0b49
Parents: 5c61ef6d52ccc64b57b7722d9efdefcd4ce1c888
Message:old tickets Issue 38: Add tab for inactive users in forge management Issue 37: Add tab for active users in forge management

Changes:

File differences

indefero/src/IDF/Views/Admin.php
344344
345345
346346
347
347
348348
349349
350350
351351
352
352
353353
354354
355355
356
357
358
359
356360
357
361
358362
359363
360364
......
381385
382386
383387
384
385388
386389
387390
......
392395
393396
394397
395
398
399
400
401
402
403
404
405
406
407
396408
397409
398410
*
*/
public $users_precond = array('Pluf_Precondition::staffRequired');
public function users($request, $match, $not_validated=false)
public function users($request, $match, $pageType=null)
{
$pag = new Pluf_Paginator(new Pluf_User());
$db =& Pluf::db();
$true = Pluf_DB_BooleanToDb(true, $db);
if ($not_validated) {
if ($pageType === 0) {
$pag->forced_where = new Pluf_SQL('first_name = \'---\' AND active!='.$true);
$title = __('Not Validated User List');
$pag->action = 'IDF_Views_Admin::usersNotValidated';
} elseif ($pageType == 1) {
$pag->forced_where = new Pluf_SQL('first_name != \'---\' AND active!='.$true);
$title = __('Not Active User List');
$pag->action = 'IDF_Views_Admin::usersNotValidated';
} else {
$pag->forced_where = new Pluf_SQL('first_name != \'---\'');
$pag->forced_where = new Pluf_SQL('first_name != \'---\' AND active='.$true);
$title = __('User List');
$pag->action = 'IDF_Views_Admin::users';
}
array(
'page_title' => $title,
'users' => $pag,
'not_validated' => $not_validated,
),
$request);
}
public $usersNotValidated_precond = array('Pluf_Precondition::staffRequired');
public function usersNotValidated($request, $match)
{
return $this->users($request, $match, true);
return $this->users($request, $match, 0);
}
/**
* Not validated users.
*/
public $usersInActive_precond = array('Pluf_Precondition::staffRequired');
public function usersInActive($request, $match)
{
return $this->users($request, $match, 1);
}
/**
indefero/src/IDF/conf/urls.php
556556
557557
558558
559
560
561
562
563
559564
560565
561566
'model' => 'IDF_Views_Admin',
'method' => 'usersNotValidated');
$ctl[] = array('regex' => '#^/admin/users/inactive/$#',
'base' => $base,
'model' => 'IDF_Views_Admin',
'method' => 'usersInActive');
$ctl[] = array('regex' => '#^/admin/users/(\d+)/$#',
'base' => $base,
'model' => 'IDF_Views_Admin',
indefero/src/IDF/templates/idf/gadmin/users/index.html
77
88
99
10
10
1111
12
12
13
14
15
1316
1417
1518
{/block}
{block context}
<p>{trans 'Number of users:'} <strong>{$users.nb_items}</strong></p>
{if !$not_validated}{aurl 'url', 'IDF_Views_Admin::usersNotValidated'}
{aurl 'url', 'IDF_Views_Admin::usersNotValidated'}
<p class="helptext">{blocktrans}See <a href="{$url}">not validated users</a>.{/blocktrans}</p>
{/if}
{aurl 'url', 'IDF_Views_Admin::usersInActive'}
<p class="helptext">See <a href="{$url}">inactive users</a>.</p><br>
{aurl 'url', 'IDF_Views_Admin::users'}
<p class="helptext">See <a href="{$url}">active users</a>.</p>
<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

Branches

Number of commits:
Page rendered in 0.06454s using 16 queries.