File "a945aa0624d6f2efaf0b43d8c58e9a5bd8f24704_0.file.admin-users.tmpl.php"

Full Path: /srv/www/www.cadoro.it/src/templates_c/a945aa0624d6f2efaf0b43d8c58e9a5bd8f24704_0.file.admin-users.tmpl.php
File size: 8.37 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/* Smarty version 3.1.29, created on 2024-02-21 17:52:14
  from "/srv/www/www.cadoro.it/src/templates/admin-users.tmpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_65d62a3e75ec16_52414804',
  'file_dependency' => 
  array (
    'a945aa0624d6f2efaf0b43d8c58e9a5bd8f24704' => 
    array (
      0 => '/srv/www/www.cadoro.it/src/templates/admin-users.tmpl',
      1 => 1708527642,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:layout-admin.tmpl' => 1,
    'file:admin-pagination.tmpl' => 1,
  ),
),false)) {
function content_65d62a3e75ec16_52414804 ($_smarty_tpl) {
$_smarty_tpl->ext->_inheritance->init($_smarty_tpl, true);
?>

<html>
  <body>
    <?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "breadcrumbs", array (
  0 => 'block_55059703765d62a3e734107_33050568',
  1 => false,
  3 => 0,
  2 => 0,
));
?>

    <?php 
$_smarty_tpl->ext->_inheritance->processBlock($_smarty_tpl, 0, "content", array (
  0 => 'block_99014249165d62a3e735b27_25613588',
  1 => false,
  3 => 0,
  2 => 0,
));
?>

  </body>
</html>
<?php $_smarty_tpl->ext->_inheritance->endChild($_smarty_tpl);
$_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:layout-admin.tmpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 2, false);
}
/* {block 'breadcrumbs'}  file:admin-users.tmpl */
function block_55059703765d62a3e734107_33050568($_smarty_tpl, $_blockParentStack) {
?>

    <div class="breadcrumbs">
      <strong>Utenti registrati</strong>
    </div>
    <?php
}
/* {/block 'breadcrumbs'} */
/* {block 'content'}  file:admin-users.tmpl */
function block_99014249165d62a3e735b27_25613588($_smarty_tpl, $_blockParentStack) {
?>

    <div class="sheet">
      <div class="sheet-header">
        <h1>
          Utenti registrati
          <small>Gestione degli utenti di registrati</small>
        </h1>
      </div>
      <div class="sheet-body">
        <?php if (_get('add')) {?>
        <div class="alert alert-success">
          <strong>L'utente è stato aggiunto con successo.</strong>
        </div>
        <?php } elseif ($_smarty_tpl->tpl_vars['delete']->value) {?>
        <div class="alert alert-success">
          <strong>L'utente è stato eliminato con successo.</strong>
        </div>
        <?php }?>
        <form method="get" action="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users" class="form-search well">
          <div class="row">
            <div class="col-sm-6 mb10">
              <input type="text" name="q" class="form-control" value="<?php echo _fr('q');?>
" datahaviour="autofocus" autocomplete="off">
            </div>
            <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 1) {?>
			<div class="col-sm-6 mb10">
              <select name="filter" class="form-control">
                <option value="">Tutti gli utenti</option>
                <option value="app"<?php if (_request('filter') == 'app') {?> selected="selected"<?php }?>>Utenti con app mobile</option>
              </select>
            </div>
			<?php }?>
          </div>
          <button type="submit" class="btn btn-default">Cerca</button>
          <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 1) {?>
          <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users/add" class="btn btn-primary pull-right">
            <i class="glyphicon glyphicon-plus"></i> Aggiungi utente registrato&hellip;
          </a>
          <?php }?>
        </form>
        <div class="table-responsive">
          <table class="table table-striped table-bordered">
            <thead>
              <tr>
                <th>ID</th>
                <th>Cognome</th>
                <th>Nome</th>
                <th>Email</th>
                <th>Tessera</th>
                <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 1) {?><th>App</th><?php }?>
                <th>Stato</th>
                <th style="width: 200px;">Azioni</th>
              </tr>
            </thead>
            <tbody>
              <?php
$_from = $_smarty_tpl->tpl_vars['users']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_user_0_saved_item = isset($_smarty_tpl->tpl_vars['user']) ? $_smarty_tpl->tpl_vars['user'] : false;
$_smarty_tpl->tpl_vars['user'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['user']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['user']->value) {
$_smarty_tpl->tpl_vars['user']->_loop = true;
$__foreach_user_0_saved_local_item = $_smarty_tpl->tpl_vars['user'];
?>
              <tr>
                <td>#<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['user']->value['lastname'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['user']->value['firstname'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['user']->value['email'];?>
</td>
                <td><?php echo $_smarty_tpl->tpl_vars['user']->value['card'];?>
</td>
                
				<?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 1) {?>
				<td>
                  <?php if ($_smarty_tpl->tpl_vars['user']->value['app_details']) {?>
                    <span class="label label-warning"><?php echo _a($_smarty_tpl->tpl_vars['user']->value['app_details'],'platform','mobile');?>
</span>
                  <?php } else { ?>
                    -
                  <?php }?>
                </td>
				<?php }?>
				
                <td>
                  <?php if ($_smarty_tpl->tpl_vars['user']->value['deleted_at']) {?>
                    <span class="label label-danger">eliminato</span>
                  <?php } elseif ($_smarty_tpl->tpl_vars['user']->value['active'] && $_smarty_tpl->tpl_vars['user']->value['card']) {?>
                    <span class="label label-success">attivo</span>
                  <?php } elseif ($_smarty_tpl->tpl_vars['user']->value['active'] && !$_smarty_tpl->tpl_vars['user']->value['card']) {?>
                    <span class="label label-warning">attesa punto vendita</span>
                  <?php } else { ?>
                    <span class="label label-default">attesa double opt-in</span>
                  <?php }?>
                </td>
                <td>
				  <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 1 || ($_smarty_tpl->tpl_vars['user']->value['active'] && $_smarty_tpl->tpl_vars['user']->value['card'])) {?>
                  <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users/<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
?pdf=1" class="btn btn-info btn-xs">PDF</a>
				  <?php }?>
				  <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 1 || ($_smarty_tpl->tpl_vars['user']->value['active'] && !$_smarty_tpl->tpl_vars['user']->value['card'])) {?>
                  <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users/<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
" class="btn btn-default btn-xs">Modifica</a>
                  <?php if ($_smarty_tpl->tpl_vars['principal']->value['role'] == 1) {?>
				  <?php if ($_smarty_tpl->tpl_vars['user']->value['deleted_at']) {?>
                    <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users?q=<?php echo _fr('q');?>
&undelete=<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
" class="btn btn-warning btn-xs" datahaviour="link_confirm">Ripristina</a>
                  <?php } else { ?>
                    <a href="<?php echo $_smarty_tpl->tpl_vars['base_url']->value;?>
/admin/users?q=<?php echo _fr('q');?>
&delete=<?php echo $_smarty_tpl->tpl_vars['user']->value['id'];?>
" class="btn btn-danger btn-xs" datahaviour="link_confirm">Elimina</a>
                  <?php }?>
				  <?php }?>
				  <?php }?>
                </td>
              </tr>
              <?php
$_smarty_tpl->tpl_vars['user'] = $__foreach_user_0_saved_local_item;
}
if ($__foreach_user_0_saved_item) {
$_smarty_tpl->tpl_vars['user'] = $__foreach_user_0_saved_item;
}
?>
            </tbody>
          </table>
        </div>
        <?php $_smarty_tpl->smarty->ext->_subtemplate->render($_smarty_tpl, "file:admin-pagination.tmpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

      </div>
    </div>
    <?php
}
/* {/block 'content'} */
}