GlisWeb framework
_ticket.view.php
Vai alla documentazione di questo file.
1 <?php
2 
12  // tabella della vista
13  $ct['view']['table'] = 'task';
14 
15  // campi della vista
16  $ct['view']['cols'] = array(
17  'id' => '#',
18  'priorita' => 'urgenza',
19  'pianificazione' => 'pianificato',
20  'attivita' => 'attività',
21  'cliente' => 'da fare per',
22  'responsabile' => 'assegnato a',
23  'progresso' => 'ore'
24  );
25 
26  // stili della vista
27  $ct['view']['class'] = array(
28  'id' => 'd-none d-md-table-cell',
29  'priorita' => 'text-left no-wrap d-none d-md-table-cell',
30  'pianificazione' => 'text-left no-wrap',
31  'cliente' => 'text-left no-wrap d-none d-md-table-cell',
32  'attivita' => 'text-left',
33  'responsabile' => 'text-left no-wrap d-none d-sm-table-cell',
34  'progresso' => 'text-right no-wrap d-none d-sm-table-cell'
35  );
36 
37  // template filtri custom
38 # $ct['etc']['include']['filters'] = 'task.view.filters.html';
39 
40  // preset filtro custom task completati
41  if( ! isset( $_REQUEST['__view__'][ $ct['view']['table'] ]['__filters__']['completato']['EQ'] ) ) {
42  $_REQUEST['__view__'][ $ct['view']['table'] ]['__filters__']['completato']['EQ'] = 0;
43  }
44 
45  // preset ordinamento
46  if( ! isset( $_REQUEST['__view__'][ $ct['view']['table'] ]['__sort__'] ) ) {
47  $_REQUEST['__view__'][ $ct['view']['table'] ]['__sort__']['pianificazione'] = 'ASC';
48  }
49 
50  // filtri specifici per cliente/operatore
51  if( empty( $_SESSION['account']['se_cliente'] ) ) {
52  if( ! isset( $_REQUEST['__view__'][ $ct['view']['table'] ]['__extra__']['assegnato'] ) || $_REQUEST['__view__'][ $ct['view']['table'] ]['__extra__']['assegnato'] == '__me__' ) {
53  $_REQUEST['__view__'][ $ct['view']['table'] ]['__extra__']['assegnato'] = '__me__';
54  if( isset( $_SESSION['account']['id_anagrafica'] ) ) {
55  $_REQUEST['__view__'][ $ct['view']['table'] ]['__filters__']['id_responsabile']['EQ'] = $_SESSION['account']['id_anagrafica'];
56  }
57  } elseif( $_REQUEST['__view__'][ $ct['view']['table'] ]['__extra__']['assegnato'] == '__nessuno__' ) {
58  $_REQUEST['__view__'][ $ct['view']['table'] ]['__extra__']['assegnato'] = '__nessuno__';
59  if( isset( $_SESSION['account']['id_anagrafica'] ) ) {
60  $_REQUEST['__view__'][ $ct['view']['table'] ]['__filters__']['id_responsabile']['NL'] = true;
61  }
62  }
63  }
64 
65  // pagina per la gestione degli oggetti esistenti
66  $ct['view']['open']['page'] = 'task_gestione';
67 
68  // generazione vista
69  require DIRECTORY_BASE . '_src/_inc/_macro/_default.view.php';
70 
71  // debug
72  // print_r( $ct['view'] );
73  // print_r( $_REQUEST['__view__'] );
74  // print_r( $_SESSION['__view__'] );
75 
76 ?>
const DIRECTORY_BASE
Definition: _osm.php:3
if(isset( $_REQUEST['amazonCheckoutSessionId'])) $_SESSION['carrello']
if(! isset( $_REQUEST['__view__'][ $ct['view']['id']]['__extra__']['assegnato'])|| $_REQUEST['__view__'][ $ct['view']['id']]['__extra__']['assegnato']=='__me__') elseif($_REQUEST[ '__view__'][$ct[ 'view'][ 'id']][ '__extra__'][ 'assegnato']=='__nessuno__')
$ct['view']['table']
$_REQUEST['__view__'][ $ct['view']['id']]['__restrict__']['id_progetto']['EQ']