mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-21 00:46:27 +02:00
add datatables everywhere
This commit is contained in:
parent
a426c699f9
commit
6f1c726284
33 changed files with 373 additions and 144 deletions
|
@ -31,13 +31,10 @@ namespace controllers\publics;
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les users, sous forme d'un tableau permettant l'administration de ces users.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$commands = $this->internal_command->list_for_user($_SESSION['user']['id'], 25, $page);
|
||||
$commands = $this->internal_command->list_for_user($_SESSION['user']['id']);
|
||||
$this->render('command/list', ['commands' => $commands]);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,13 +37,10 @@ namespace controllers\publics;
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les contacts, sous forme d'un tableau permettant l'administration de ces contacts.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$contacts = $this->internal_contact->list_for_user($_SESSION['user']['id'], 25, $page);
|
||||
$contacts = $this->internal_contact->list_for_user($_SESSION['user']['id']);
|
||||
|
||||
return $this->render('contact/list', ['contacts' => $contacts]);
|
||||
}
|
||||
|
|
|
@ -38,12 +38,10 @@ namespace controllers\publics;
|
|||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$limit = 25;
|
||||
$events = $this->internal_event->list_for_user($_SESSION['user']['id'], $limit, $page);
|
||||
$this->render('event/list', ['events' => $events, 'limit' => $limit, 'page' => $page, 'nb_results' => \count($events)]);
|
||||
$events = $this->internal_event->list_for_user($_SESSION['user']['id']);
|
||||
$this->render('event/list', ['events' => $events, 'nb_results' => \count($events)]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,13 +39,10 @@ namespace controllers\publics;
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les groups, sous forme d'un tableau permettant l'administration de ces groups.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$groups = $this->internal_group->list_for_user($_SESSION['user']['id'], 25, $page);
|
||||
$groups = $this->internal_group->list_for_user($_SESSION['user']['id']);
|
||||
|
||||
foreach ($groups as $key => $group)
|
||||
{
|
||||
|
|
|
@ -30,15 +30,12 @@ class Phone extends \descartes\Controller
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les phones, sous forme d'un tableau permettant l'administration de ces phones.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$id_user = $_SESSION['user']['id'];
|
||||
$api_key = $_SESSION['user']['api_key'];
|
||||
$page = (int) $page;
|
||||
$phones = $this->internal_phone->list_for_user($id_user, 25, $page);
|
||||
$phones = $this->internal_phone->list_for_user($id_user);
|
||||
|
||||
$adapters = [];
|
||||
$adapters = $this->internal_adapter->list_adapters();
|
||||
|
|
|
@ -38,14 +38,10 @@ namespace controllers\publics;
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les receiveds, sous forme d'un tableau permettant l'administration de ces receiveds.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$limit = 25;
|
||||
$receiveds = $this->internal_received->list_for_user($_SESSION['user']['id'], $limit, $page);
|
||||
$receiveds = $this->internal_received->list_for_user($_SESSION['user']['id']);
|
||||
|
||||
foreach ($receiveds as $key => $received)
|
||||
{
|
||||
|
@ -70,19 +66,15 @@ namespace controllers\publics;
|
|||
}
|
||||
}
|
||||
|
||||
$this->render('received/list', ['receiveds' => $receiveds, 'page' => $page, 'limit' => $limit, 'nb_results' => \count($receiveds)]);
|
||||
$this->render('received/list', ['receiveds' => $receiveds, 'nb_results' => \count($receiveds)]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all unread receiveds messages.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list_unread($page = 0)
|
||||
public function list_unread()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$limit = 25;
|
||||
$receiveds = $this->internal_received->list_unread_for_user($_SESSION['user']['id'], $limit, $page);
|
||||
$receiveds = $this->internal_received->list_unread_for_user($_SESSION['user']['id']);
|
||||
|
||||
foreach ($receiveds as $key => $received)
|
||||
{
|
||||
|
@ -104,7 +96,7 @@ namespace controllers\publics;
|
|||
}
|
||||
}
|
||||
|
||||
$this->render('received/list_unread', ['receiveds' => $receiveds, 'page' => $page, 'limit' => $limit, 'nb_results' => \count($receiveds)]);
|
||||
$this->render('received/list_unread', ['receiveds' => $receiveds, 'nb_results' => \count($receiveds)]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,13 +44,10 @@ namespace controllers\publics;
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les scheduleds, sous forme d'un tableau permettant l'administration de ces scheduleds.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$scheduleds = $this->internal_scheduled->list_for_user($_SESSION['user']['id'], 25, $page);
|
||||
$scheduleds = $this->internal_scheduled->list_for_user($_SESSION['user']['id']);
|
||||
$this->render('scheduled/list', ['scheduleds' => $scheduleds]);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,11 +40,9 @@ namespace controllers\publics;
|
|||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$limit = 25;
|
||||
$sendeds = $this->internal_sended->list_for_user($_SESSION['user']['id'], $limit, $page);
|
||||
$sendeds = $this->internal_sended->list_for_user($_SESSION['user']['id']);
|
||||
|
||||
foreach ($sendeds as $key => $sended)
|
||||
{
|
||||
|
@ -64,7 +62,7 @@ namespace controllers\publics;
|
|||
}
|
||||
}
|
||||
|
||||
$this->render('sended/list', ['sendeds' => $sendeds, 'page' => $page, 'limit' => $limit, 'nb_results' => \count($sendeds)]);
|
||||
$this->render('sended/list', ['sendeds' => $sendeds, 'nb_results' => \count($sendeds)]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,12 +37,10 @@ namespace controllers\publics;
|
|||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$limit = 25;
|
||||
$smsstops = $this->internal_sms_stop->list_for_user($_SESSION['user']['id'], $limit, $page);
|
||||
$this->render('smsstop/list', ['page' => $page, 'smsstops' => $smsstops, 'limit' => $limit, 'nb_results' => \count($smsstops)]);
|
||||
$smsstops = $this->internal_sms_stop->list_for_user($_SESSION['user']['id']);
|
||||
$this->render('smsstop/list', ['smsstops' => $smsstops, 'nb_results' => \count($smsstops)]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,13 +39,10 @@ class User extends \descartes\Controller
|
|||
|
||||
/**
|
||||
* Cette fonction retourne tous les users, sous forme d'un tableau permettant l'administration de ces users.
|
||||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$users = $this->internal_user->list(25, $page);
|
||||
$users = $this->internal_user->list();
|
||||
$this->render('user/list', ['users' => $users]);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,9 @@ namespace controllers\publics;
|
|||
*
|
||||
* @param mixed $page
|
||||
*/
|
||||
public function list($page = 0)
|
||||
public function list()
|
||||
{
|
||||
$page = (int) $page;
|
||||
$webhooks = $this->internal_webhook->list_for_user($_SESSION['user']['id'], 25, $page);
|
||||
$webhooks = $this->internal_webhook->list_for_user($_SESSION['user']['id']);
|
||||
$this->render('webhook/list', ['webhooks' => $webhooks]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue