Skip to content

Commit

Permalink
Affichage de la doc dans la page de configuration de l equipement si …
Browse files Browse the repository at this point in the history
…celle ci existe dans le modele.
  • Loading branch information
KiwiHC16 committed Aug 28, 2020
1 parent 8d601c0 commit 7450f3c
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion desktop/php/Abeille.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,27 @@ function displayBeeCard($eqLogic, $files) {
<img name="icon_visu" src="" width="160" height="200"/>
</div>
</div>

<hr>
<div class="form-group">
<label class="col-sm-3 control-label">{{Documentation}}</label><br>
<div style="text-align: left">
<?php
if (isset($_GET['id']) && ($_GET['id'] > 0)) {
$eqLogic = eqLogic::byId($_GET['id']);
if ( $eqLogic->getConfiguration('modeleJson', 'notDefined') != 'notDefined' ) {
$fileList = glob('plugins/Abeille/core/config/devices/'.$eqLogic->getConfiguration('modeleJson', 'notDefined').'/doc/*');
foreach($fileList as $filename){
echo '<label class="col-sm-3 control-label">{{.}}</label><a href="'.$filename, '" target="_blank">'.basename($filename).'</a><br>';
}
}
}
else {
echo '<label class="col-sm-3 control-label">{{.}}</label>.<br>';
}
?>
</div>
</div>

</fieldset>
</form>
Expand All @@ -710,7 +731,7 @@ function displayBeeCard($eqLogic, $files) {
<hr>

<?php
/* Tcharp38: In which case this 'id' is supposed to be set ? */
/* Tcharp38: In which case this 'id' is supposed to be set ? <= quand on accede à la page de configuration d un equipement*/
if (isset($_GET['id']) && ($_GET['id'] > 0)) {
$eqLogic = eqLogic::byId($_GET['id']);
if ( ($eqLogic->getConfiguration('paramBatterie', 'notDefined') == "true") || ($eqLogic->getConfiguration('paramBatterie', 'notDefined') == "notDefined") ) {
Expand Down

0 comments on commit 7450f3c

Please sign in to comment.