}
}
-class TrombiView extends ProfileView
-{
- public function __construct(PlSet $set, array $params)
- {
- $this->entriesPerPage = 24;
- $this->defaultkey = 'name';
- if (@$params['with_score']) {
- $this->addSort(new PlViewOrder('score', array(
- new UFO_Score(true),
- new UFO_ProfileUpdate(true),
- new UFO_Promo(UserFilter::DISPLAY, true),
- new UFO_Name(Profile::DN_SORT),
- ), 'pertinence'));
- }
- $set->addCond(new UFC_Photo());
- $this->addSort(new PlViewOrder('name', array(new UFO_Name(Profile::DN_SORT)), 'nom'));
- $this->addSort(new PlViewOrder('promo', array(
- new UFO_Promo(UserFilter::DISPLAY, true),
- new UFO_Name(Profile::DN_SORT),
- ), 'promotion'));
- parent::__construct($set, $params);
- }
-
- public function templateName()
- {
- return 'include/plview.trombi.tpl';
- }
-
- public function apply(PlPage $page)
- {
- if (!empty($GLOBALS['IS_XNET_SITE'])) {
- global $globals;
- $page->assign('mainsiteurl', 'https://' . $globals->core->secure_domain . '/');
- }
- return parent::apply($page);
- }
-}
-
/** A multipage view for users
* Allows the display of bounds when sorting by name or promo.
*/
}
}
+class TrombiView extends UserView
+{
+ public function __construct(PlSet $set, array $params)
+ {
+ $this->entriesPerPage = 24;
+ $this->defaultkey = 'name';
+ if (@$params['with_score']) {
+ $this->addSort(new PlViewOrder('score', array(
+ new UFO_Score(true),
+ new UFO_ProfileUpdate(true),
+ new UFO_Promo(UserFilter::DISPLAY, true),
+ new UFO_Name(Profile::DN_SORT),
+ ), 'pertinence'));
+ }
+ $set->addCond(new UFC_Photo());
+ $this->addSort(new PlViewOrder('name', array(new UFO_Name(Profile::DN_SORT)), 'nom'));
+ $this->addSort(new PlViewOrder('promo', array(
+ new UFO_Promo(UserFilter::DISPLAY, true),
+ new UFO_Name(Profile::DN_SORT),
+ ), 'promotion'));
+ parent::__construct($set, $params);
+ }
+
+ public function templateName()
+ {
+ return 'include/plview.trombi.tpl';
+ }
+
+ public function apply(PlPage $page)
+ {
+ if (!empty($GLOBALS['IS_XNET_SITE'])) {
+ global $globals;
+ $page->assign('mainsiteurl', 'https://' . $globals->core->secure_domain . '/');
+ }
+ return parent::apply($page);
+ }
+}
+
class GadgetView implements PlView
{
public function __construct(PlSet $set, array $params)
list(,$members) = $this->client->get_members($liste);
if ($action == 'moderators') {
- $members = $owners;
+ $users = $owners;
$show_moderators = true;
$action = $subaction;
$subaction = '';
} else {
$show_moderators = false;
- }
- $users = array();
- foreach ($members as $m) {
- $users[] = $m[1];
+ $users = array();
+ foreach ($members as $m) {
+ $users[] = $m[1];
+ }
}
require_once 'userset.inc.php';
- if ($action == 'listmember' || $action == '') {
- $view = new UserArraySet($users);
- } else {
- $view = new ProfileArraySet($users);
- }
+ $view = new UserArraySet($users);
$view->addMod('trombi', 'Trombinoscope', false, array('with_promo' => true));
- $view->addMod('minifiche', 'Mini-fiches', false);
$view->addMod('listmember', 'Annuaire', true);
// TODO: Reactivate when the new map is completed.
// $view->addMod('geoloc', 'Planisphère');
__autoload('userset');
$admins = false;
- if ($action == 'trombi') {
- $view = new ProfileSet(new UFC_Group($globals->asso('id')));
- } else {
- if ($action == 'admins') {
- $admins = true;
- $action = $subaction;
- }
- $view = new UserSet(new UFC_Group($globals->asso('id'), $admins));
+ if ($action == 'admins') {
+ $admins = true;
+ $action = $subaction;
}
- $view->addMod('xnetfiche', 'Annuaire');
+ $view = new UserSet(new UFC_Group($globals->asso('id'), $admins));
+ $view->addMod('groupmember', 'Annuaire');
$view->addMod('trombi', 'Trombinoscope');
$view->apply('annuaire', $page, $action);
$page->assign('only_admin', $admins);
{assign var=key_cur value=$set_keys[trombi]}
{assign var=key_next value=$set_keys[trombi.index_next]}
<tr>
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_prev] photo=true}
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=true}
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_next] photo=true}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_prev]->profile() photo=true}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur]->profile() photo=true}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_next]->profile() photo=true}
</tr>
<tr>
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_prev] photo=false}
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=false}
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_next] photo=false}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_prev]->profile() photo=false}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur]->profile() photo=false}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_next]->profile() photo=false}
</tr>
{elseif ($smarty.section.trombi.index % 3 == 0) && ($smarty.section.trombi.last)}
{assign var=key_cur value=$set_keys[trombi]}
<tr>
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=true}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur]->profile() photo=true}
<td></td><td></td>
</tr>
<tr style="margin-top: 0; padding-top: 0">
- {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur] photo=false}
+ {include file="include/plview.trombi.entry.tpl" profile=$set[$key_cur]->profile() photo=false}
<td></td><td></td>
</tr>
{/if}