modified...

This commit is contained in:
umaircb 2014-02-28 11:56:01 +00:00
parent b94a6dd3a6
commit 1976caa576

View file

@ -3,54 +3,86 @@
<h2>Add Placement</h2> <h2>Add Placement</h2>
<!-- Adding Placement Form --> <!-- Adding Placement Form -->
<form name="AddPlacement" id="AddPlacement" method="post" action=""> <form name="AddPlacement" id="AddPlacement" method="post" action="">
<div class="row">
<div class="form-group"> <div class="col-md-6">
<label for="placement_name">Placement Name</label> <label for="placement_name">Placement Name</label>
<input class="form-control" name="placement_name" id="placement_name" value="" /> <input class="form-control" name="placement_name" id="placement_name" value="" />
</div> </div>
<div class="form-group"> <div class="col-md-6">
<label for="placement_code">Placement Code</label> <label for="placement_code">Placement Code</label>
<input class="form-control" name="placement_code" value="" id="placement_code"/> <input class="form-control" name="placement_code" value="" id="placement_code"/>
</div> </div>
</div>
<div class="form-group"> <br>
<input class="btn btn-primary" type="submit" name="AddPlacement" value="Submit" id="button"/> <div class="row">
</div> <div class="col-md-6">
<p class="alert alert-warning">Note: if you delete any placement, all ads under it will be deleted</p>
</div>
<div class="col-md-6">
<input class="btn btn-primary pull-right" type="submit" name="AddPlacement" value="Submit" id="button"/>
</div>
</div>
</form> </form>
<p class="alert alert-warning">Note: if you delete any placement, all ads under it will be deleted</p> <div class="row">
<div class="col-md-5 pull-right">
<div class="dropdown pull-right">
<button id="hideshow" class="btn btn-default pull-right dropdown-toggle" data-toggle="dropdown">
Placement Manager <i class="caret"></i></button>
</div>
<br>
</div>
<div id="content" style="display: none">
<table class="table table-bordered table-striped">
<tr>
<td>ID</td>
<td>PlacementName</td>
<td>PlacementCode</td>
<td>TotalAds</td>
<td>Action</td>
</tr>
{section name=a_list loop=$ads_placements}
{if $ads_placements[a_list].placement_name !=''}
<tr>
<td>{$ads_placements[a_list].placement_id}</td>
<td>{$ads_placements[a_list].placement_name}</td>
<td>
<strong>
{literal}{AD place={/literal}{$ads_placements[a_list].placement}{literal}}{/literal}
</strong>
</td>
<td>{$ads_placements[a_list].total_ads}</td>
<td>
{if $ads_placements[a_list].disable == no}
<a href="?remove={$ads_placements[a_list].placement}">Remove</a>
{else}
Default Placement
{/if}
</td>
</tr>
{/if}
{/section}
</table>
<!-- Listing Placements End -->
{/if}
</div>
</div>
<table class="table table-bordered table-striped">
<tr>
<td>ID</td>
<td>PlacementName</td>
<td>PlacementCode</td>
<td>TotalAds</td>
<td>Action</td>
</tr>
{section name=a_list loop=$ads_placements}
{if $ads_placements[a_list].placement_name !=''} <script>
<tr> var button = document.getElementById('hideshow'); // Assumes element with id='button'
<td>{$ads_placements[a_list].placement_id}</td>
<td>{$ads_placements[a_list].placement_name}</td> button.onclick = function() {
<td> var div = document.getElementById('content');
<strong> if (div.style.display !== 'none') {
{literal}{AD place={/literal}{$ads_placements[a_list].placement}{literal}}{/literal} div.style.display = 'none';
</strong> }
</td> else {
<td>{$ads_placements[a_list].total_ads}</td> div.style.display = 'block';
<td> }
{if $ads_placements[a_list].disable == no} };
<a href="?remove={$ads_placements[a_list].placement}">Remove</a> </script>
{else}
Default Placement
{/if}
</td>
</tr>
{/if}
{/section}
</table>
<!-- Listing Placements End -->
{/if}