Sindbad~EG File Manager
@extends('bolayout')
@section('title','Campaigns')
@section('formtitle','Campaigns')
@section('content')
{{ Form::open(array('url' => '/campaigns?showFilter=1')) }}
<h3>CAMPAIGNS</h3>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne" >
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<span class="glyphicon glyphicon-filter"></span> Filter
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<div class="row form-group">
<div class="col-xs-4 col-sm-4 col-md-4">
<label class="bold">Title</label>
<input type="text" class="form-control" name="txtTitle" value="{{ $title or '' }}">
</div>
<div class="col-xs-4 col-sm-4 col-md-4">
<label class="bold">From Date</label>
<input type="text" class="form-control" name="txtFrom" value="{{ $from or ''}}" placeholder="DD/MM/YYYY">
</div>
<div class="col-xs-4 col-sm-4 col-md-4">
<label class="bold">To Date</label>
<input type="text" class="form-control" name="txtTo" value="{{ $to or ''}}" placeholder="DD/MM/YYYY">
</div>
</div>
<div class="row form-group">
<div class="col-xs-12 col-sm-12 col-md-12 text-right">
<button class="btn btn-md btn-default" type="submit">
<span class="glyphicon glyphicon-filter"></span>Filter
</button>
</div>
</div>
</div>
</div>
</div>
</div>
{{ Form::close() }}
<div class="panel panel-default">
<!-- Default panel contents -->
<div class="panel-heading">
<span class="glyphicon glyphicon-list"></span>
@if(isset($showFilter) && intval($showFilter) == 1 )
Search results
@endif
<div class="tools pull-right">
@if(isset($showFilter) && intval($showFilter) == 1 )
{{ HTML::decode ( HTML::link(URL::to('/').'/campaigns','<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Cancel',array('class' => 'btn btn-sm btn-default', 'title' => 'Cancel'))
) }}
@endif
{{ HTML::decode ( HTML::link(URL::to('/').'/campaign/create','<span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span> Add New Campaign',array('class' => 'btn btn-sm btn-primary', 'title' => 'New'))
) }}
</div><!-- End of pull-right -->
</div><!-- End of panel-heading -->
<!-- Table -->
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<thead>
<tr class="header">
<th></th>
<th>Campaign ID</th>
<th>Title</th>
<th>Created On</th>
<th>Yes</th>
<th>No</th>
</tr>
</thead>
<tbody>
<?php $i = 0 ; ?>
@if (isset($campaigns) && count($campaigns)>0)
@foreach ($campaigns as $key => $value)
<tr>
<td>
{{ HTML::decode ( HTML::link(URL::to('/').'/campaign/edit/'.urlencode( Helper::encrypt($value->campaign_id)),'Edit',array('title' => 'Edit'))) }}
</td>
<td>{{ $value->campaign_no }}</td>
<td>{{ $value->title }}</td>
<td>{{ Helper::fromDBToDDMMYYYYHMS($value->created_at)}}</td>
<td>
<?php
$urlyes = URL::to("/")."/feedback/"."*|LIST:UID|*"."/"."*|EMAIL_UID|*"."/".urlencode( Helper::encrypt($value->campaign_no))."/".urlencode( Helper::encrypt(1));
$fullURLYes = '<a href = "'.$urlyes.'">Yes</a>';
$urlno = URL::to("/")."/feedback/"."*|LIST:UID|*"."/"."*|EMAIL_UID|*"."/".urlencode( Helper::encrypt($value->campaign_no))."/".urlencode( Helper::encrypt(0));
$fullURLNo = '<a href = "'.$urlno.'">No</a>';
?>
{{ Form::text('txtURL1',HTML::decode($fullURLYes),array('class' => 'form-control input-md'))}}
<a href="#" class="copy-lickey">copy</a></td>
<td>
{{ Form::text('txtURL2',$fullURLNo,array('class' => 'form-control input-md'))}}
<a href="#" class="copy-lickey">copy</a></td>
</td>
</tr>
@endforeach
@endif
</tbody>
</table> <!-- end of table -->
</div>
</div><!-- end of panel panel-default -->
@if (isset($campaigns) && count($campaigns)>0)
<div class="row">
<div class="col-md-12 text-right">
{{ $campaigns->appends(array('showFilter' => $showFilter,'title' => $title,'from' => $from,'to' => $to))->links() }}
</div>
@endif
@stop
@section("script")
<script type="text/javascript">
function copyToClipboard(text)
{
window.prompt("Copy to clipboard: Press Ctrl+C, then Enter", text);
}
$(document).ready(function() {
$('body').on('click', 'a.copy-lickey', function()
{
copyToClipboard($(this).prev().val());
});
});
</script>
@stop
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists