Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/annonceleft/list.phtml |
<div class="table-box">
<?php if ($this->populateFormAnnonceLeft['NOM']) { ?>
<form action="<?php echo $this->baseUrl; ?>/backoffice/annonceleft/edit" method="post" name="editAnnonceForm" >
<?php } else { ?>
<form action="<?php echo $this->baseUrl; ?>/backoffice/annonceleft/add" method="post" name="addAnnonceForm" >
<?php } ?>
<table class="table">
<thead>
<tr>
<th colspan="2" class="col-md-4" ><?php echo $this->titlePage; ?></th>
</tr>
</thead>
<tbody>
<?php echo $this->render("alert_tr.phtml"); ?>
<tr >
<td class="col-md-4"><i class="glyphicon glyphicon-asterisk"></i> Titre</td>
<td class="col-md-8"><input type="text" name="nom" size="40" class="form-control" placeholder="Titre de la publicit�" id="nom" value="<?php echo $this->populateFormAnnonceLeft['NOM']; ?>" /></td>
</tr>
<tr >
<td class="col-md-4"><i class="glyphicon glyphicon-asterisk"></i> Statut</td>
<td class="col-md-8">
<input type="radio" value="0" name="isshow" id="isshow1" class="bluecheckradios" <?php if ($this->populateFormAnnonceLeft['isSHOW'] == 0) { echo 'checked="checked"';} ?>><label for="isshow1"> Actif</label>
<input type="radio" value="1" name="isshow" id="isshow2" class="bluecheckradios" <?php if ($this->populateFormAnnonceLeft['isSHOW'] == 1) { echo 'checked="checked"';} ?>><label for="isshow2"> Inactif</label>
</td>
</tr>
<tr >
<td class="col-md-4">Localisation</td>
<td class="col-md-8">
<?php $tabController = explode(':',$this->populateFormAnnonceLeft['ID_CATS']); ?>
<select class="form-control" size="15" name="categories[]" id="categories" multiple="multiple">
<option value="0" <?php if (in_array('0', $tabController)) {echo 'selected="selected"';} ?> >Toutes les cat�gories</option>
<?php
$show = array();
foreach($this->listallcategories 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 (in_array($row['ID'.$level], $tabController)) {echo 'selected="selected"';} ?>>
<?php
for ($i=0 ; $i<$level; $i++) {
echo ' ';
}
echo $row['NOM'.$level]; ?>
</option>
<?php
$show['NOM'.$level] = $row['NOM'.$level];
}
}
} ?>
</select>
</td>
</tr>
<tr >
<td class="col-md-4"><i class="glyphicon glyphicon-asterisk"></i> Contenu</td>
<td class="col-md-8">
<textarea name="content" cols="130" rows="20" id="annonceContent" name="annonceContent">
<?php if (isset($this->populateFormAnnonceLeft['CONTENT']) && !empty($this->populateFormAnnonceLeft['CONTENT'])) {
echo $this->populateFormAnnonceLeft['CONTENT'];
} ?>
</textarea>
</td>
</tr>
<tr>
<td colspan="2" class="text-center">
<?php if ($this->populateFormAnnonceLeft['NOM']) { ?>
<input type="hidden" name="id" value="<?php echo $this->populateFormAnnonceLeft['ID'];?>">
<button class="btn btn-success" type="submit" name="edit"><i class="glyphicon glyphicon-edit"></i> Modifier</button>
<?php } else { ?>
<button class="btn btn-success" type="submit" name="add"><i class="glyphicon glyphicon-plus"></i> Ajouter</button>
<?php } ?>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<div class="clearfix"></div>
<script type="text/javascript">
$(function(){
initEditor('#annonceContent');
});
</script>
<div class="table-box">
<table class="display table" id="annonceLeftTable" width="100%">
<thead>
<tr>
<th>Titre</th>
<th>Statut</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach($this->listannonceleft as $row) { ?>
<tr>
<td><?php echo $row['NOM'];?></td>
<td><?php if ($this->escape($row['isSHOW'])==0) {echo 'Actif';} else {echo 'Inactif';} ?></td>
<td>
<div class="btn-group">
<a class="btn btn-success" href="<?php echo $this->baseUrl; ?>/backoffice/annonceleft/edit/id/<?php echo $row['ID']; ?>"><span class="glyphicon glyphicon-edit"></span> Modifier</a>
<button class="btn btn-danger btn-modal" data-toggle="ajaxModalDelete" data-linkok="<?php echo $this->baseUrl; ?>/backoffice/annonceleft/del/id/<?php echo $row['ID']; ?>" ><span class="glyphicon glyphicon-trash"></span> Supprimer</button>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<script>
$(document).ready(function() {
initDataTable('annonceLeftTable', [[ 0, "asc" ]], [{ "orderable": false, "targets": -1, "width": "270px" }]);
});
</script>
</div>