Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/annoncecontent/list.phtml |
<div class="table-box">
<?php if ($this->populateFormAnnonce['TITRE']) { ?>
<form action="<?php echo $this->baseUrl; ?>/backoffice/annoncecontent/edit" method="post" name="editAnnonceForm" >
<?php } else { ?>
<form action="<?php echo $this->baseUrl; ?>/backoffice/annoncecontent/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" class="form-control" placeholder="Titre de l'annonce" name="titre" size="40" id="titre" value="<?php echo $this->populateFormAnnonce['TITRE']; ?>"/></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->populateFormAnnonce['isSHOW'] == 0) { echo 'checked="checked"';} ?>><label for="isshow1"> Actif</label>
<input type="radio" value="1" name="isshow" id="isshow2" class="bluecheckradios" <?php if ($this->populateFormAnnonce['isSHOW'] == 1) { echo 'checked="checked"';} ?>><label for="isshow2"> Inactif</label>
</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->populateFormAnnonce['CONTENT']) && !empty($this->populateFormAnnonce['CONTENT'])) {
echo $this->populateFormAnnonce['CONTENT'];
} ?>
</textarea>
</td>
</tr>
<tr>
<td colspan="2" class="text-center">
<?php if ($this->populateFormAnnonce['TITRE']) { ?>
<input type="hidden" name="id" value="<?php echo $this->populateFormAnnonce['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="annonceContentTable" width="100%">
<thead>
<tr>
<th>Titre</th>
<th>Statut</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach($this->listannonce as $row) { ?>
<tr>
<td><?php echo $row['TITRE'];?></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/annoncecontent/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/annoncecontent/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('annonceContentTable', [[ 0, "asc" ]], [{ "orderable": false, "targets": -1, "width": "270px" }]);
});
</script>
</div>