123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- {include="header"}
- <div class="row">
- <div class="span3 bs-docs-sidebar">
- <ul class="nav nav-tabs nav-stacked">
- <li {if="isset($_['section']) && $_['section']=='plugin'"}class="active"{/if}><a href="setting.php?section=plugin"><i class="fa fa-angle-right"></i> Plugins</a></li>
- <li {if="isset($_['section']) && $_['section']=='user'"}class="active"{/if}><a href="setting.php?section=user"><i class="fa fa-angle-right"></i> Utilisateurs</a></li>
- <li {if="isset($_['section']) && $_['section']=='access'"}class="active"{/if}><a href="setting.php?section=access"><i class="fa fa-angle-right"></i> Accès</a></li>
- {function="Plugin::callHook("setting_menu", array())"}
-
- </ul>
- </div>
- <div class="span9">
- <!-- SECTION RANK -->
- {if="@$_['section']=='access'"}
- <div class="span9 accessBloc">
- {function="Plugin::callHook("access_pre_display", array(&$accesss))"}
- <h1>Rangs</h1>
- <p>Gestion des rangs du programme</p>
- <form action="action.php?action=access_add_rank" method="POST">
- <fieldset>
- <legend>{$description}</legend>
- <label for="labelRank">Libellé</label>
- {if="isset($id_modrank)"}<input type="hidden" name="id" value="{$id_modrank}">{/if}
- <input {if="isset($label_rank)"}value="{$label_rank}"{/if} type="text" id="labelRank" name="labelRank" placeholder="Libellé du rang…"/>
- <label for="descriptionRank">Description</label>
- <textarea name="descriptionRank" id="descriptionRank" placeholder="Description courte du rang…" >{if="isset($description_rank)"}{$description_rank}{/if}</textarea>
- <div class="clear"></div>
- <br/><button type="submit" class="btn">{$button}</button>
- </fieldset>
- <br/>
- </form>
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>Libellé</th>
- <th>Description</th>
- <th></th>
- </tr>
- </thead>
-
- {loop="ranks"}
- <tr>
- <td>{$value->getLabel()}</td>
- <td>{$value->getDescription()}</td>
- <td><a class="btn btn-warning" href="setting.php?section=right&id={$value->getId()}"><i class="icon-white fa fa-check-circle-o"></i></a>
- <a class="btn btn-danger" href="setting.php?section=access&id_rank={$value->getId()}"><i class="fa fa-pencil icon-white"></i></a>
- <a class="btn btn-danger" href="action.php?action=access_delete_rank&id={$value->getId()}"><i class="fa fa-times icon-white"></i></a></td>
- </tr>
- {/loop}
- </table>
- </div>
- {/if}
- <!-- SECTION ACCES -->
- {if="@$_['section']=='right'"}
- <div class="span9 accessBloc">
- {function="Plugin::callHook("access_pre_display", array(&$accesss))"}
- <h1>Droits : {$rank->getLabel()}</h1>
- <p>Gestion des droits du rang <code>{$rank->getLabel()}</code></p>
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>Section</th>
- <th>Ajout</th>
- <th>Consultation</th>
- <th>Modification</th>
- <th>Suppression</th>
-
-
- <th></th>
- </tr>
- </thead>
-
- {loop="$sections"}
- <tr>
- <td>{$value->getLabel()}</td>
- <td><input type="checkbox" onclick="setRankAccess({$rank->getId()},{$value->getId()},'c',this)" {if="@$rights[$value->getId()]['c']"}checked="checked"{/if} /></td>
- <td><input type="checkbox" onclick="setRankAccess({$rank->getId()},{$value->getId()},'r',this)" {if="@$rights[$value->getId()]['r']"}checked="checked"{/if} /></td>
- <td><input type="checkbox" onclick="setRankAccess({$rank->getId()},{$value->getId()},'u',this)" {if="@$rights[$value->getId()]['u']"}checked="checked"{/if} /></td>
- <td><input type="checkbox" onclick="setRankAccess({$rank->getId()},{$value->getId()},'d',this)" {if="@$rights[$value->getId()]['d']"}checked="checked"{/if} /></td>
- <td>
- <a class="btn btn-danger" title="supprimer les droits du rang pour cette section" href="action.php?action=access_delete_right&id={$value->getId()}&rank={$rank->getId()}"><i class="fa fa-times icon-white"></i></a>
- </td>
- </tr>
- {/loop}
- </table>
- </div>
- {/if}
- <!-- SECTION PLUGIN -->
- {if="@$_['section']=='plugin'"}
- <div class="span9 pluginBloc">
- <h1>Plugins</h1>
- <p>Voici la liste des plugins installés :</p>
- <ul class="nav nav-tabs">
- <li {if="@$_['block']=='actif' || !isset($_['block'])"}class="active"{/if}><a href="setting.php?section=plugin&block=actif"><i class="fa fa-angle-right"></i> Actif</a></li>
- <li {if="@$_['block']=='inactif'"}class="active"{/if}><a href="setting.php?section=plugin&block=inactif"><i class="fa fa-angle-right"></i> Inactif</a></li>
- <li {if="@$_['block']=='market'"}class="active"{/if}><a href="setting.php?section=plugin&block=market"><i class="fa fa-angle-right"></i> Market</a></li>
- </ul>
-
- {if="@$_['block']=='market'"}
- <br/><p>Recherchez et ajoutez les plugins proposés par la communauté<br/>en utilisant le formulaire ci dessous ! (<a href="http://market.idleman.fr/index.php?software=yana-server&page=submit">Proposer un nouveau plugin</a>)</p>
- <form class="form-inline">
- <input type="text" id="keywordPlugin"> <button class="btn" id="btnSearchPlugin" onclick="searchPlugin($('#keywordPlugin').val());return false;">Rechercher</button>
- </form>
- <ul id="resultsPlugin"></ul>
- <br/><br/>
-
- {else}
- <ul class="pluginList">
- {if="count($plugins)==0"}
- Aucun plugin n'est installé pour le moment.
- {else}
- {loop="plugins"}
- {if="$value->getType()!='component' && $value->getState() == (@$_['block']=='inactif' ?0:1)"}
- <li>
- <ul>
- <li><h4>Nom: </h4>{$value->getName()}</li>
- <li><h4>Auteur: </h4><a href="mailto:{$value->getMail()}">{$value->getAuthor()}</a></li>
- <li><h4>Licence: </h4>{$value->getLicence()}</li>
- <li><h4>Version: </h4><code>{$value->getVersion()}</code></li>
- <li><h4>Site web: </h4><a href="{$value->getLink()}">{$value->getLink()}</a></li>
- <li>{$value->getDescription()}</li>
- <li><a href="action.php?action=changePluginState&plugin={$value->getUid()}&state={$value->getState()}&block={$_['block']}" class="button">{$value->getState()=="0"?"Activer":"Désactiver"}</a></li>
- </ul>
- </li>
- {/if}
- {/loop}
- {/if}
- </ul>
- {/if}
- </div>
- {/if}
- <!-- SECTION USER -->
- {if="@$_['section']=='user'"}
- <div class="span9 userBloc">
- <h1>Utilisateurs</h1>
- <p>Gestion des utilisateurs du programme</p>
- <form action="action.php?action=user_add_user" method="POST">
- <fieldset>
- <legend>{$description}</legend>
- <div class="left">
- {if="isset($id_modusers)"}<input type="hidden" name="id" value="{$id_modusers}">{/if}
- <label for="loginUser">Identifiant</label>
- <input {if="isset($login)"}value="{$login}"{/if} type="text" id="loginUser" name="loginUser" placeholder="Identifiant utilisateur…"/>
- <label for="passwordUser">Mot de passe</label>
- <input type="password" name="passwordUser" id="passwordUser" />
- </div>
-
- <div class="left marginLeftMedium">
- <label for="nameUser">Nom</label>
- <input {if="isset($lastname)"}value="{$lastname}"{/if} type="text" id="nameUser" name="nameUser" placeholder="Nom"/>
- <label for="firstNameUser">Prenom</label>
- <input {if="isset($firstname)"}value="{$firstname}"{/if} type="text" id="firstNameUser" name="firstNameUser" placeholder="Prenom"/>
- </div>
- <div class="left marginLeftMedium">
- <label for="mailUser">E-mail</label>
- <input {if="isset($email)"}value="{$email}"{/if} type="text" id="mailUser" name="mailUser" placeholder="Email"/>
- <label for="rankUser">Rang</label>
- <select type="text" id="rankUser" name="rankUser">
- {loop="ranks"}
- <option {if="($userrank==$value->getId())"}selected{/if} value="{$value->getId()}">{$value->getLabel()}</option>
- {/loop}
- </select>
- </div>
- <div class="clear"></div>
- <br/><button type="submit" class="btn">{$button}</button>
- </fieldset>
- <br/>
- </form>
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>Login</th>
- <th>Utilisateur</th>
- <th>Email</th>
- <th>Rang</th>
- <td></td>
- </tr>
- </thead>
-
- {loop="$users"}
- <tr>
- <td>{$value->getLogin()}</td>
- <td style="width:100px">{function="Functions::truncate($value->getFullName(),20)"}</td>
- <td><a href="mailto:{$value->getMail()}">{$value->getMail()}</a></td>
- <td>{$ranksLabel[$value->getRank()]}</td>
- <td>
- {if="$value->getId()!='' && $myUser->can('user','d')"}
- <a href="action.php?action=delete_user&id={$value->getId()}" class="btn btn-danger"><i class="fa fa-times icon-white"></i></a>
- <a class="btn btn-danger" href="setting.php?section=user&id_user={$value->getId()}"><i class="fa fa-pencil icon-white"></i></a></td>
- {/if}
- </td>
- </tr>
- {/loop}
- </table>
- </div>
- {/if}
- <!-- SECTION DEBUG -->
- {if="@$_['section']=='debug'"}
- <div class="span9 accessBloc">
-
- <h1>Débug vocal</h1>
- <p>Test de débugages vocaux, si le client est bien connecté, yana à du monologuer</p>
-
- {/if}
- {function="Plugin::callHook("setting_bloc", array())"}
- </div>
- </div>
- {include="footer"}
-
|