forked from jeedom/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
loic
committed
Apr 13, 2015
1 parent
7dfa7da
commit 301f956
Showing
2 changed files
with
552 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,115 @@ | ||
<?php | ||
if (!isConnect('admin')) { | ||
throw new Exception('{{401 - Accès non autorisé}}'); | ||
} | ||
sendVarToJS('eqType', 'template'); | ||
$eqLogics = eqLogic::byType('template'); | ||
?> | ||
|
||
<div class="row row-overflow"> | ||
<div class="col-lg-2 col-md-3 col-sm-4"> | ||
<div class="bs-sidebar"> | ||
<ul id="ul_eqLogic" class="nav nav-list bs-sidenav"> | ||
<a class="btn btn-default eqLogicAction" style="width : 100%;margin-top : 5px;margin-bottom: 5px;" data-action="add"><i class="fa fa-plus-circle"></i> {{Ajouter un template}}</a> | ||
<li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li> | ||
<?php | ||
foreach ($eqLogics as $eqLogic) { | ||
echo '<li class="cursor li_eqLogic" data-eqLogic_id="' . $eqLogic->getId() . '"><a>' . $eqLogic->getHumanName() . '</a></li>'; | ||
} | ||
?> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="col-lg-10 col-md-9 col-sm-8 eqLogicThumbnailDisplay" style="border-left: solid 1px #EEE; padding-left: 25px;"> | ||
<legend>{{Mes templates}} | ||
</legend> | ||
<?php | ||
if (count($eqLogics) == 0) { | ||
echo "<br/><br/><br/><center><span style='color:#767676;font-size:1.2em;font-weight: bold;'>{{Vous n'avez pas encore de template, cliquez sur Ajouter un template pour commencer}}</span></center>"; | ||
} else { | ||
?> | ||
<div class="eqLogicThumbnailContainer"> | ||
<?php | ||
foreach ($eqLogics as $eqLogic) { | ||
echo '<div class="eqLogicDisplayCard cursor" data-eqLogic_id="' . $eqLogic->getId() . '" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" >'; | ||
echo "<center>"; | ||
echo '<img src="plugins/weather/doc/images/template_icon.png" height="105" width="95" />'; | ||
echo "</center>"; | ||
echo '<span style="font-size : 1.1em;position:relative; top : 15px;word-break: break-all;white-space: pre-wrap;word-wrap: break-word;"><center>' . $eqLogic->getHumanName(true, true) . '</center></span>'; | ||
echo '</div>'; | ||
} | ||
?> | ||
</div> | ||
<?php } ?> | ||
</div> | ||
|
||
<div class="col-lg-10 col-md-9 col-sm-8 eqLogic" style="border-left: solid 1px #EEE; padding-left: 25px;display: none;"> | ||
<form class="form-horizontal"> | ||
<fieldset> | ||
<legend><i class="fa fa-arrow-circle-left eqLogicAction cursor" data-action="returnToThumbnailDisplay"></i> {{Général}} <i class='fa fa-cogs eqLogicAction pull-right cursor expertModeVisible' data-action='configure'></i></legend> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label">{{Nom de l'équipement template}}</label> | ||
<div class="col-sm-3"> | ||
<input type="text" class="eqLogicAttr form-control" data-l1key="id" style="display : none;" /> | ||
<input type="text" class="eqLogicAttr form-control" data-l1key="name" placeholder="{{Nom de l'équipement template}}"/> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label" >{{Objet parent}}</label> | ||
<div class="col-sm-3"> | ||
<select id="sel_object" class="eqLogicAttr form-control" data-l1key="object_id"> | ||
<option value="">{{Aucun}}</option> | ||
<?php | ||
foreach (object::all() as $object) { | ||
echo '<option value="' . $object->getId() . '">' . $object->getName() . '</option>'; | ||
} | ||
?> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label" >{{Activer}}</label> | ||
<div class="col-sm-1"> | ||
<input type="checkbox" class="eqLogicAttr" data-l1key="isEnable" size="16" checked/> | ||
</div> | ||
<label class="col-sm-3 control-label" >{{Visible}}</label> | ||
<div class="col-sm-1"> | ||
<input type="checkbox" class="eqLogicAttr" data-l1key="isVisible" checked/> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label">{{template param 1}}</label> | ||
<div class="col-sm-3"> | ||
<input type="text" class="eqLogicAttr configuration form-control" data-l1key="configuration" data-l2key="city" placeholder="param1"/> | ||
</div> | ||
</div> | ||
</fieldset> | ||
</form> | ||
|
||
<legend>{{Template}}</legend> | ||
<table id="table_cmd" class="table table-bordered table-condensed"> | ||
<thead> | ||
<tr> | ||
<th>{{Nom}}</th><th>{{Type}}</th><th>{{Action}}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
</tbody> | ||
</table> | ||
|
||
<form class="form-horizontal"> | ||
<fieldset> | ||
<div class="form-actions"> | ||
<a class="btn btn-danger eqLogicAction" data-action="remove"><i class="fa fa-minus-circle"></i> {{Supprimer}}</a> | ||
<a class="btn btn-success eqLogicAction" data-action="save"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a> | ||
</div> | ||
</fieldset> | ||
</form> | ||
|
||
</div> | ||
</div> | ||
|
||
<?php include_file('desktop', 'template', 'js', 'template'); ?> | ||
<?php include_file('core', 'plugin.template', 'js'); ?> | ||
<?php | ||
if (!isConnect('admin')) { | ||
throw new Exception('{{401 - Accès non autorisé}}'); | ||
} | ||
sendVarToJS('eqType', 'template'); | ||
$eqLogics = eqLogic::byType('template'); | ||
?> | ||
|
||
<div class="row row-overflow"> | ||
<div class="col-lg-2 col-md-3 col-sm-4"> | ||
<div class="bs-sidebar"> | ||
<ul id="ul_eqLogic" class="nav nav-list bs-sidenav"> | ||
<a class="btn btn-default eqLogicAction" style="width : 100%;margin-top : 5px;margin-bottom: 5px;" data-action="add"><i class="fa fa-plus-circle"></i> {{Ajouter un template}}</a> | ||
<li class="filter" style="margin-bottom: 5px;"><input class="filter form-control input-sm" placeholder="{{Rechercher}}" style="width: 100%"/></li> | ||
<?php | ||
foreach ($eqLogics as $eqLogic) { | ||
echo '<li class="cursor li_eqLogic" data-eqLogic_id="' . $eqLogic->getId() . '"><a>' . $eqLogic->getHumanName() . '</a></li>'; | ||
} | ||
?> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="col-lg-10 col-md-9 col-sm-8 eqLogicThumbnailDisplay" style="border-left: solid 1px #EEE; padding-left: 25px;"> | ||
<legend>{{Mes templates}} | ||
</legend> | ||
|
||
<div class="eqLogicThumbnailContainer"> | ||
<div class="cursor eqLogicAction" data-action="add" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" > | ||
<center> | ||
<i class="fa fa-plus-circle" style="font-size : 7em;color:#94ca02;"></i> | ||
</center> | ||
<span style="font-size : 1.1em;position:relative; top : 23px;word-break: break-all;white-space: pre-wrap;word-wrap: break-word;color:#94ca02"><center>Ajouter</center></span> | ||
</div> | ||
<?php | ||
foreach ($eqLogics as $eqLogic) { | ||
echo '<div class="eqLogicDisplayCard cursor" data-eqLogic_id="' . $eqLogic->getId() . '" style="background-color : #ffffff; height : 200px;margin-bottom : 10px;padding : 5px;border-radius: 2px;width : 160px;margin-left : 10px;" >'; | ||
echo "<center>"; | ||
echo '<img src="plugins/weather/doc/images/template_icon.png" height="105" width="95" />'; | ||
echo "</center>"; | ||
echo '<span style="font-size : 1.1em;position:relative; top : 15px;word-break: break-all;white-space: pre-wrap;word-wrap: break-word;"><center>' . $eqLogic->getHumanName(true, true) . '</center></span>'; | ||
echo '</div>'; | ||
} | ||
?> | ||
</div> | ||
</div> | ||
|
||
<div class="col-lg-10 col-md-9 col-sm-8 eqLogic" style="border-left: solid 1px #EEE; padding-left: 25px;display: none;"> | ||
<form class="form-horizontal"> | ||
<fieldset> | ||
<legend><i class="fa fa-arrow-circle-left eqLogicAction cursor" data-action="returnToThumbnailDisplay"></i> {{Général}} <i class='fa fa-cogs eqLogicAction pull-right cursor expertModeVisible' data-action='configure'></i></legend> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label">{{Nom de l'équipement template}}</label> | ||
<div class="col-sm-3"> | ||
<input type="text" class="eqLogicAttr form-control" data-l1key="id" style="display : none;" /> | ||
<input type="text" class="eqLogicAttr form-control" data-l1key="name" placeholder="{{Nom de l'équipement template}}"/> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label" >{{Objet parent}}</label> | ||
<div class="col-sm-3"> | ||
<select id="sel_object" class="eqLogicAttr form-control" data-l1key="object_id"> | ||
<option value="">{{Aucun}}</option> | ||
<?php | ||
foreach (object::all() as $object) { | ||
echo '<option value="' . $object->getId() . '">' . $object->getName() . '</option>'; | ||
} | ||
?> | ||
</select> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label" >{{Activer}}</label> | ||
<div class="col-sm-1"> | ||
<input type="checkbox" class="eqLogicAttr" data-l1key="isEnable" size="16" checked/> | ||
</div> | ||
<label class="col-sm-3 control-label" >{{Visible}}</label> | ||
<div class="col-sm-1"> | ||
<input type="checkbox" class="eqLogicAttr" data-l1key="isVisible" checked/> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label class="col-sm-3 control-label">{{template param 1}}</label> | ||
<div class="col-sm-3"> | ||
<input type="text" class="eqLogicAttr configuration form-control" data-l1key="configuration" data-l2key="city" placeholder="param1"/> | ||
</div> | ||
</div> | ||
</fieldset> | ||
</form> | ||
|
||
<legend>{{Template}}</legend> | ||
<table id="table_cmd" class="table table-bordered table-condensed"> | ||
<thead> | ||
<tr> | ||
<th>{{Nom}}</th><th>{{Type}}</th><th>{{Action}}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
</tbody> | ||
</table> | ||
|
||
<form class="form-horizontal"> | ||
<fieldset> | ||
<div class="form-actions"> | ||
<a class="btn btn-danger eqLogicAction" data-action="remove"><i class="fa fa-minus-circle"></i> {{Supprimer}}</a> | ||
<a class="btn btn-success eqLogicAction" data-action="save"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a> | ||
</div> | ||
</fieldset> | ||
</form> | ||
|
||
</div> | ||
</div> | ||
|
||
<?php include_file('desktop', 'template', 'js', 'template');?> | ||
<?php include_file('core', 'plugin.template', 'js');?> |
Oops, something went wrong.