Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/category2/edit.phtml |
<div class="table-box">
<div class="col-md-8 text-left">
<a class="<?php if ($this->populateForm['isACTIVE'] == false) { echo 'btn btn-danger';} else { echo 'btn btn-info'; } ?>" target="_blank" href="<?php echo $this->baseUrl; ?>/<?php echo Utils_Tool::getFormattedUrlCategory2($this->populateForm['NAVNOM_URLPARENTS'], $this->populateForm['NAVNOM'], $this->populateForm['ID']); ?>">
<i class="glyphicon glyphicon-eye-open"></i> <?php echo $this->populateForm['NOM']; ?>
</a>
</div>
<div class="col-md-4 text-right">
<form action="<?php echo $this->baseUrl; ?>/backoffice/category2/editactive#tabs-category" method="post" >
<input type="radio" class="bluecheckradios" name="active" id="active1" value="1" <?php if ($this->populateForm['isACTIVE'] == true) { echo 'checked="checked"';} ?>><label for="active1"> Actif</label>
<input type="radio" class="bluecheckradios" name="active" id="active2" value="0" <?php if ($this->populateForm['isACTIVE'] == false) { echo 'checked="checked"';} ?>><label for="active2"> Inactif</label>
<input type="hidden" name="id" value="<?php echo $this->populateForm['ID']; ?>">
<button class="btn btn-success" type="submit" name="edit">
<i class="glyphicon glyphicon-edit"></i> Modifier
</button>
</form>
</div>
<div class="col-md-12 no-space-side">
<div class="tabs-section ">
<ul class="nav nav-tabs" id="myTab">
<li class="active">
<a href="#tabs-category" data-toggle="tab">Cat�gorie</a>
</li>
<li>
<a href="#tabs-referencement" data-toggle="tab">R�f�rencement</a>
</li>
<li>
<a href="#tabs-image" data-toggle="tab">Images</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tabs-category">
<section class="boxpadding">
<form action="<?php echo $this->baseUrl; ?>/backoffice/category2/editcategory#tabs-category" method="post" enctype="multipart/form-data" >
<table class="table">
<?php echo $this->render("alert_tr.phtml"); ?>
<tr >
<td class="col-md-4">
<i class="glyphicon glyphicon-asterisk"></i> <label for="nom">Nom</label>
</td>
<td class="col-md-8">
<input type="text" name="nom" id="nom" value="<?php echo $this->populateForm['NOM']; ?>" class="form-control"/>
</td>
</tr>
<tr >
<td >
<label for="desc">Description</label>
</td>
<td>
<input type="text" name="desc" id="desc" class="form-control" value="<?php echo $this->populateForm['DESCRIPTION'];?>">
</td>
</tr>
<tr >
<td >
<?php if ($this->populateForm['IDPARENT'] != 0) { ?>
<label for="idparent">Cat�gorie parente</label>
<?php } ?>
</td>
<td>
<?php if ($this->populateForm['IDPARENT'] != 0) { ?>
<select name="idparent" id="idparent" class="form-control" >
<?php
$show = array();
foreach($this->listallcategories2 as $row) {
for ($level=0 ; $level<11; $level++) {
if ((!isset($show['NOM'.$level]) || $show['NOM'.$level] != $row['NOM'.$level]) && $row['NOM'.$level] != null) {
?>
<option value="
<?php echo $this->escape($row['ID'.$level]); ?>" <?php if ($row['ID'.$level] == $this->populateForm['IDPARENT']) { echo 'selected="selected"';}?> >
<?php
for ($i=0 ; $i<$level; $i++) {
echo ' ';
}
echo $row['NOM'.$level]; ?>
</option>
<?php
$show['NOM'.$level] = $row['NOM'.$level];
}
}
} ?>
</select>
<?php } else { ?>
<input type="hidden" name="idparent" value="0">
<?php } ?>
</td>
</tr>
<tr >
<td >
<label for="picCat" >Image de la cat�gorie</label>
<br/>
<div class="col-md-12 text-center no-space-top">
<ul class="gallerybox ">
<li>
<figure>
<img src="<?php echo $this->baseUrl.'/'.$this->populateForm['URL'];?>" />
</figure>
</li>
</ul>
</div>
</td>
<td>
<input type="file" name="picCat" id="picCat" size="50"/>
<br>
<i>Extensions : jpg, gif, png</i>
</td>
</tr>
<tr >
<td>
<label for="picChoice" >Image de "Comment Choisir"</label>
<br/>
<?php if (isset($this->populateForm['CHOICEURL']) && !empty($this->populateForm['CHOICEURL'])) { ?>
<div class="col-md-12 text-center no-space-top">
<ul class="gallerybox ">
<li>
<figure>
<img src="<?php echo $this->baseUrl.'/'.$this->populateForm['CHOICEURL'];?>" />
</figure>
</li>
</ul>
</div>
<?php } ?>
</td>
<td>
<input type="file" name="picChoice" id="picChoice" size="50"/>
<br>
<i>Extensions : jpg, gif, png</i>
</td>
</tr>
<tr>
<td nowrap="nowrap">
<label for="docChoice">Document de "Comment Choisir"</label>
</td>
<td>
<select name="docChoice" id="docChoice" class="form-control">
<option value="" selected="selected">Aucun</option>
<?php
$files = glob("doc/*.pdf");
for ($i=0; $i <sizeof($files); $i++) {
?>
<option value="
<?php echo $files[$i]; ?>" <?php if ($files[$i] == $this->populateForm['CHOICEDOC']) { echo 'selected="selected"';} ?> ><?php echo $files[$i]; ?>
</option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="hidden" name="id" value="<?php echo $this->populateForm['ID']; ?>">
<button class="btn btn-success" type="submit" name="edit">
<i class="glyphicon glyphicon-edit"></i> Modifier
</button>
</td>
</tr>
</table>
</form>
</section>
</div>
<div class="tab-pane" id="tabs-referencement">
<section class="boxpadding">
<form action="
<?php echo $this->baseUrl; ?>/backoffice/category2/customnavnomedit#tabs-referencement" method="post">
<table class="table">
<?php echo $this->render("alert_tr.phtml"); ?>
<tr >
<td colspan="2" >
<h5>M�ta donn�es</h5>
</td>
</tr>
<tr >
<td class="col-md-4">
<label for="navnom">Nom de navigation</label>
</td>
<td class="col-md-8">
<input type="text" name="navnom" id="navnom" value="<?php echo $this->populateForm['NAVNOM']; ?>" class="form-control"/>
</td>
</tr>
<tr >
<td >
<label for="navtitrenom">Titre de navigation</label>
</td>
<td >
<input class="form-control" type="text" name="navtitrenom" id="navtitrenom" value="<?php echo $this->populateForm['NAVTITRENOM'];?>">
</td>
</tr>
<tr>
<td>
<label for="navdescription">Description</label>
</td>
<td>
<input class="form-control" type="text" name="navdescription" id="navdescription" value="<?php echo $this->populateForm['NAVDESCRIPTION'];?>">
</td>
</tr>
<tr>
<td>
<label for="keywords">Mots cl�s</label>
</td>
<td>
<input class="form-control" type="text" name="keywords" id="keywords" value="<?php echo $this->populateForm['KEYWORDS'];?>">
</td>
</tr>
<tr >
<td colspan="2" >
<h5>Url</h5>
</td>
</tr>
<tr>
<td>
<label for="urlaccess">Acc�s hi�rarchique</label>
</td>
<td>
<input class="form-control" <?php if ($this->populateForm['IDPARENT'] != 0) { echo "readonly='readonly'"; } ?> type="text" name="urlaccess" id="urlaccess" placeholder="Pr�fix composant l'url, Ex : rubrique/sous-rubrique" value="<?php echo $this->populateForm['NAVNOM_URLPARENTS'];?>">
</td>
</tr>
<tr >
<td colspan="2" class="text-center">
<input type="hidden" name="nom" value="<?php echo $this->populateForm['NOM'];?>">
<input type="hidden" size="60" name="id" value="<?php echo $this->populateForm['ID'];?>">
<input type="hidden" size="60" name="idparent" value="<?php echo $this->populateForm['IDPARENT'];?>">
<button class="btn btn-success" type="submit" name="edit">
<i class="glyphicon glyphicon-edit"></i> Modifier
</button>
</td>
</tr>
</table>
</form>
</section>
</div>
<div class="tab-pane" id="tabs-image">
<section class="boxpadding">
<table class="table">
<?php echo $this->render("alert_tr.phtml"); ?>
<tr>
<td width="250px">
<label for="idparent">Images</label>
</td>
<td >
<?php
$files = glob("items/category2/".$this->populateForm['ID']."/*.*");
for ($i=0; $i <sizeof($files); $i++) {
?>
<div class="col-md-3 text-center no-space-top">
<form action="
<?php echo $this->baseUrl; ?>/backoffice/category2/setpicture#tabs-image" method="post">
<div class="col-md-12 text-center">
<ul class="gallerybox ">
<li>
<figure>
<img src="<?php echo $this->baseUrl.'/'.$files[$i]; ?>" />
</figure>
</li>
</ul>
</div>
<div class="col-md-6 text-right">
<button class="btn btn-primary" type="submit" name="edit">
<i class="glyphicon glyphicon-resize-small"></i> Lier
</button>
<input type="hidden" name="picture" value="<?php echo $files[$i]; ?>" >
<input type="hidden" name="idCat" value="<?php echo $this->populateForm['ID']; ?>" >
</div>
</form>
<div class="col-md-6 text-left">
<form action="
<?php echo $this->baseUrl; ?>/backoffice/category2/erasepicture#tabs-image" method="post" id="delPictureImage<?php echo $i;?>">
<button class="btn btn-danger btn-modal" type="button" data-toggle="ajaxModalSubmitDelete" data-form="delPictureImage"
<?php echo $i;?>" ><i class="glyphicon glyphicon-trash"></i> Supprimer
</button>
<input type="hidden" name="picture" value="<?php echo $files[$i]; ?>" >
<input type="hidden" name="idCat" value="<?php echo $this->populateForm['ID']; ?>" >
</form>
</div>
</div>
<?php } ?>
</td>
</tr>
<tr >
<td >
<label for="idparent" >Images de "Comment choisir"</label>
</td>
<td >
<?php
$files = glob("items/category_choice/".$this->populateForm['ID']."/*.*");
for ($i=0; $i <sizeof($files); $i++) {
?>
<div class="col-md-3 text-center no-space-top">
<form action="
<?php echo $this->baseUrl; ?>/backoffice/category2/setpicturechoice#tabs-image" method="post">
<div class="col-md-12 text-center">
<ul class="gallerybox ">
<li>
<figure>
<img src="<?php echo $this->baseUrl.'/'.$files[$i]; ?>" />
</figure>
</li>
</ul>
</div>
<div class="col-md-6 text-left">
<button class="btn btn-primary" type="submit" name="edit">
<i class="glyphicon glyphicon-resize-small"></i> Lier
</button>
<input type="hidden" name="picture" value="<?php echo $files[$i]; ?>" >
<input type="hidden" name="idCat" value="<?php echo $this->populateForm['ID']; ?>" >
</div>
</form>
<div class="col-md-6 text-right">
<form action="<?php echo $this->baseUrl; ?>/backoffice/category2/erasepicturechoice#tabs-image" method="post" id="delPictureImageChoice<?php echo $i;?>">
<button class="btn btn-danger btn-modal" type="button" data-toggle="ajaxModalSubmitDelete" data-form="delPictureImageChoice"
<?php echo $i;?>" ><i class="glyphicon glyphicon-trash"></i> Supprimer
</button>
<input type="hidden" name="picture" value="<?php echo $files[$i]; ?>" >
<input type="hidden" name="idCat" value="<?php echo $this->populateForm['ID']; ?>" >
</form>
</div>
</div>
<?php }
$files = glob("items/category_choice/*.*");
for ($i=0; $i <sizeof($files); $i++) {
?>
<div class="col-md-3 text-center no-space-top">
<form action="<?php echo $this->baseUrl; ?>/backoffice/category2/setpicturechoice#tabs-image" method="post">
<div class="col-md-12 text-center">
<ul class="gallerybox ">
<li>
<figure>
<img src="<?php echo $this->baseUrl.'/'.$files[$i]; ?>" />
</figure>
</li>
</ul>
</div>
<div class="col-md-12">
<button class="btn btn-primary" type="submit" name="edit">
<i class="glyphicon glyphicon-resize-small"></i> Lier
</button>
<input type="hidden" name="picture" value="<?php echo $files[$i]; ?>" >
<input type="hidden" name="idCat" value="<?php echo $this->populateForm['ID']; ?>" >
</div>
</form>
</div>
<?php } ?>
</td>
</tr>
</table>
</section>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
initTabs(window.location.hash);
});
</script>