Current File : /home/karenpetzb/application/modules/backoffice/views/scripts/blogsubject/search.phtml |
<div class="table-box">
<form method="POST" action="/backoffice/blogsubject/search">
<table class="table">
<thead>
<tr>
<th 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">Publi�</td>
<td class="col-md-8">
<input type="radio" value="<?php echo true; ?>" name="is_publish" id="is_publish1" class="bluecheckradios" <?php if ($this->populateData['is_publish']) { echo 'checked="checked"';} ?>><label for="is_publish1"> Oui</label>
<input type="radio" value="<?php echo false; ?>" name="is_publish" id="is_publish2" class="bluecheckradios" <?php if (!$this->populateData['is_publish']) { echo 'checked="checked"';} ?>><label for="is_publish2"> Non</label>
</td>
</tr>
<tr >
<td class="col-md-4">Ferm�</td>
<td class="col-md-8">
<input type="radio" value="<?php echo true; ?>" name="is_close" id="is_close1" class="bluecheckradios" <?php if ($this->populateData['is_close']) { echo 'checked="checked"';} ?>><label for="is_close1"> Oui</label>
<input type="radio" value="<?php echo false; ?>" name="is_close" id="is_close2" class="bluecheckradios" <?php if (!$this->populateData['is_close']) { echo 'checked="checked"';} ?>><label for="is_close2"> Non</label>
</td>
</tr>
<tr>
<td class="col-md-4">Cat�gorie</td>
<td class="col-md-8">
<select name="id_category" id="id_category" class="form-control">
<?php
$show = array();
foreach($this->listallblogcategories as $row) {
for ($level=0 ; $level<11; $level++) {
if ((!isset($show['title'.$level]) || $show['title'.$level] != $row['title'.$level]) && $row['title'.$level] != null) {
?>
<option value="<?php echo $this->escape($row['id'.$level]); ?>" <?php if ($row['id'.$level] == $this->populateData['id_category']) { echo 'selected="selected"';}?>>
<?php
for ($i=0 ; $i<$level; $i++) {
echo ' ';
}
echo $row['title'.$level]; ?>
</option>
<?php
$show['title'.$level] = $row['title'.$level];
}
}
} ?>
</select>
</td>
</tr>
<tr >
<td class="col-md-4">Titre</td>
<td class="col-md-8"><input type="text" class="form-control" placeholder="Titre � rechercher" name="title" size="40" id="title" value="<?php echo $this->populateData['title']; ?>"/></td>
</tr>
<tr>
<td colspan="2" class="text-center">
<button type="submit" name="search" class="btn btn-primary">
<span class="glyphicon glyphicon-search"></span> Rechercher
</button>
</td>
</tr>
</tbody>
</table>
</form>
</div>
<?php
$listSearchs = $this->listallsubjects;
if (isset($listSearchs)) {
?>
<div class="clearfix"></div>
<div class="table-box">
<table class="display table" id="searchTable" width="100%">
<thead>
<tr>
<th>Titre</th>
<th>Visibilit�</th>
<th>Etat</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach($listSearchs as $row) { ?>
<tr>
<td>
<?php echo $row['title'];?>
</td>
<td>
<?php if ($row['is_publish']) { echo 'Publi�';} else{echo 'Non publi�';};?>
</td>
<td>
<?php if ($row['is_close']) { echo 'Ferm�';} else{echo 'Ouvert';};?>
</td>
<td>
<div class="btn-group">
<a target="_blank" class="btn btn-success" href="<?php echo $this->baseUrl; ?>/backoffice/blogsubject/edit/id/<?php echo $this->escape($row['id']);?>" ><span class="glyphicon glyphicon-edit"></span> Modifier</a>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<script>
$(document).ready(function() {
initDataTable('searchTable', [[ 0, "asc" ]], [
{ "orderable": true, "targets": 0 },
{ "orderable": true, "targets": 1, "width": "150px" },
{ "orderable": true, "targets": 2, "width": "150px" },
{ "orderable": false, "targets": -1, "width": "200px" },
]);
});
</script>
</div>
<?php } ?>