SMMP/view/machines.php

141 lines
3.5 KiB
PHP
Raw Normal View History

<?php define('__ROOT__', dirname(dirname(__FILE__)) );
require_once __ROOT__.'/manager/autoloader.php';
2016-07-12 10:06:46 +00:00
use \manager\View;
use \manager\ModuleRequest;
use \manager\ManagerError;
use \manager\Repo;
?>
<!-- [1] Gestion du sous-menu de gauche -->
<nav class='sub-menu-side'>
<span data-sublink='view'>
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/view.svg' ); ?></span>
<span>Tout afficher</span>
</span>
2016-02-03 08:00:06 +00:00
<span data-sublink='create'>
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/create.svg' ); ?></span>
<span>Creation</span>
</span>
2016-02-03 08:00:06 +00:00
<span data-sublink='remove'>
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/remove.svg' ); ?></span>
<span>Suppression</span>
</span>
2016-02-03 08:00:06 +00:00
<span data-sublink='edit'>
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/edit.svg' ); ?></span>
<span>Modification</span>
</span>
2016-02-03 08:00:06 +00:00
<span data-sublink='filter'>
<span class='svg'><?php echo file_get_contents( __ROOT__.'/src/static/sub-menu-side/filter.svg' ); ?></span>
<span>Filtrer</span>
</span>
</nav>
<?php
2016-07-04 13:45:29 +00:00
$post = [];
foreach($_POST as $k=>$v)
array_push($post, $k);
$sublink = $post[0];
/* [1] Affichage des machines
=========================================================*/
2016-07-09 12:13:08 +00:00
debug();
echo "<section data-sublink='view' class='list'>";
2016-07-12 10:06:46 +00:00
$machineView = new View('machine.view', []);
$machineView->view();
echo '</section>';
/* [2] Creation de machine
=========================================================*/
echo "<section data-sublink='create'>";
echo "<form class='valid'>";
echo "<input id='create_name' type='text' placeholder='Name'><br>";
echo "<button id='create_submit'>Créer</button>";
echo "</form>";
echo '</section>';
/* [3] Suppression de machine
=========================================================*/
echo "<section data-sublink='remove'>";
echo "<form class='invalid'>";
echo "<input id='remove_search_keyword' type='text' class='search' placeholder='Recherche...'><br>";
echo "<input id='remove_search_id' type='hidden' value=''>";
// Indice du resultat
echo "<span class='remove_search_view'>machine <span class='remove_search_num'>0</span> sur <span class='remove_search_sum'>0</span></span><br><br>";
echo "<button id='remove_search_submit' class='search'>Trouver</button><br>";
2016-07-02 15:10:41 +00:00
echo "<br><br><hr class='OR' data-label='PUIS' /><br><br>";
echo "<input id='remove_name' type='text' placeholder='Name'><br>";
echo "<button id='remove_submit'>Supprimer</button>";
echo "</form>";
echo '</section>';
/* [4] Modification de machine
=========================================================*/
echo "<section data-sublink='edit'>";
echo "<form class='neutral'>";
echo "<input id='edit_search_keyword' type='text' class='search' placeholder='Recherche...'><br>";
echo "<input id='edit_search_id' type='hidden' value=''>";
// Indice du resultat
echo "<span class='edit_search_view'>machine <span class='edit_search_num'>0</span> sur <span class='edit_search_sum'>0</span></span><br><br>";
echo "<button id='edit_search_submit' class='search'>Trouver</button><br>";
2016-07-02 15:10:41 +00:00
echo "<br><br><hr class='OR' data-label='PUIS' /><br><br>";
2016-07-02 15:10:41 +00:00
echo "<input id='edit_name' type='text' placeholder='Name'><br>";
echo "<button id='edit_submit' disabled>Modifier</button>";
echo "</form>";
echo '</section>';