WP File Manager
Current Path:
/
home
/
itutorethiopia
/
public_html
/
resources
/
views
/
admincoupon
/
Name
Action
..
form.blade.php
Edit
index.blade.php
Edit
view.blade.php
Edit
Editing: index.blade.php
@extends('layouts.app') @section('content') @php usort($tableGrid, "SiteHelpers::_sort") @endphp <div class="page-content row"> <!-- Page header --> <div class="page-header"> <div class="page-title"> <h3> {{ $pageTitle }} <small>{{ $pageNote }}</small></h3> </div> <ul class="breadcrumb"> <li><a href="{{ URL::to('dashboard') }}"> {{ Lang::get('core.dashboard') }} </a></li> <li class="active">{{ $pageTitle }}</li> </ul> </div> <div class="page-content-wrapper m-t"> <div class="sbox animated fadeInRight"> <div class="sbox-title"> <h5> <i class="fa fa-table"></i> </h5> <!-- <div class="sbox-tools" > @if(Session::get('gid') ==1) <a href="{{ URL::to('bsetec/module/config/'.$pageModule) }}" class="btn btn-xs btn-white tips" title=" {{ Lang::get('core.btn_config') }}" ><i class="fa fa-cog"></i></a> @endif </div> --> </div> <div class="sbox-content"> <div class="toolbar-line "> @if($access['is_add'] ==1) <a href="{{ URL::to('admincoupon/update') }}" class="tips btn btn-sm btn-white" title="{{ Lang::get('core.btn_create') }}"> <i class="fa fa-plus-circle "></i> {{ Lang::get('core.btn_create') }}</a> @endif @if($access['is_remove'] ==1) <a href="javascript://ajax" onclick="bsetecDelete();" class="tips btn btn-sm btn-white" title="{{ Lang::get('core.btn_remove') }}"> <i class="fa fa-minus-circle "></i> {{ Lang::get('core.btn_remove') }}</a> @endif </div> {!! Form::open(array('url'=>'admincoupon/delete/', 'class'=>'form-horizontal' ,'id' =>'bsetecTable' )) !!} <div class="table-responsive" style="min-height:300px;"> <table class="table table-striped "> <thead> <tr> <th class="number"> {{ Lang::get('core.no') }} </th> <th> <input type="checkbox" class="checkall" /></th> @foreach ($tableGrid as $t) @if($t['view'] =='1') <th>{{ $t['label'] }}</th> @endif @endforeach <th width="70" >{{ Lang::get('core.usage_limit') }}</th> <th width="70" >{{ Lang::get('core.coupon_code') }}</th> <th width="70" >{{ Lang::get('core.btn_action') }}</th> </tr> </thead> <tbody> <tr id="bsetec-quick-search" > <td class="number"> # </td> <td> </td> @foreach ($tableGrid as $t) @if($t['view'] =='1') <td> @if($t['field'] == "coupon_status") {!! Form::select('coupon_status', array('' => '--select--','1' => 'Active','0'=>'Inactive') , '' , array('class' => 'form-control')); !!} @elseif($t['field'] == "coupon_start_date") <input type="text" value="" class="form-control input-sm date" name="coupon_start_date"> @elseif($t['field'] == "coupon_end_date") <input type="text" value="" class="form-control input-sm date" name="coupon_end_date"> @elseif($t['field'] == "coupon_type") {!! Form::select('coupon_type', array('' => '--select--','1' => 'Percentage','2'=>'Fixed Price') , '' , array('class' => 'form-control')); !!} @else {!! SiteHelpers::transForm($t['field'] , $tableForm) !!} @endif </td> @endif @endforeach <td></td> <td></td> <td > <input type="hidden" value="Search"> <button type="button" class=" do-quick-search btn btn-xs btn-info"> {{ Lang::get('core.GO') }} </button> <a href="{!! URL::to('admincoupon') !!}"><button type="button" class=" do-quick-search btn btn-xs btn-info"> Reset </button></td> </tr> @if(count($rowData)>0) @foreach ($rowData as $row) <tr> <td width="30"> {{ ++$i }} </td> <td width="50"><input type="checkbox" class="ids" name="id[]" value="{{ $row->id }}" /> </td> @foreach ($tableGrid as $field) @php ($fieldname=$field['field']) @if($field['view'] =='1') <td> @if($field['attribute']['image']['active'] =='1') {!! SiteHelpers::showUploadedFile($row->$fieldname,$field['attribute']['image']['path']) !!} @else @php ( $conn = (isset($field['conn']) ? $field['conn'] : array() ) ) @if($field['field']=='coupon_type') {!! ($row->$fieldname == 1) ? "Percentage" : "Fixed Price" !!} @elseif($field['field']=='coupon_status') {!! ($row->$fieldname == 1) ? "<span class='label label-success'>Active</span>" : "<span class='label label-danger'>Inactive</span>" !!} @else {!! SiteHelpers::gridDisplay($row->$fieldname,$field['field'],$conn) !!} @endif @endif </td> @endif @endforeach @php ( $coupon_code = bsetecHelpers::getadmincouponcode($row->id) ) <td>{!! $coupon_code->usage_limit !!}</td> <td>{!! $coupon_code->coupon_code !!}</td> <td> @if($access['is_detail'] ==1) <a href="{{ URL::to('admincoupon/show/'.$row->id.'?return='.$return)}}" class="tips btn btn-xs btn-white" title="{{ Lang::get('core.btn_view') }}"><i class="fa fa-search "></i></a> @endif <!-- @if($access['is_edit'] ==1) <a href="{{ URL::to('admincoupon/update/'.$row->id.'?return='.$return) }}" class="tips btn btn-xs btn-white" title="{{ Lang::get('core.btn_edit') }}"><i class="fa fa-edit "></i></a> @endif --> </td> </tr> @endforeach @else <tr> <td colspan="20" align="center"><h3>{!! Lang::get('pagination.no_data') !!}</h3></td> </tr> @endif </tbody> </table> <input type="hidden" name="md" value="" /> </div> {!! Form::close() !!} @include('footer') </div> </div> </div> </div> <script> @if(isset($_GET['search'] )) @if($_GET['search']!='') @php($type = explode("|",$_GET['search'] )) @if(count($type) >= 1) @foreach($type as $t) @php($keys = explode(":",$t)) $("select[name='{{$keys[0]}}'] option:selected").removeAttr("selected"); $('select[name="{{$keys[0]}}"] option[value={{$keys[1]}}]').attr('selected','selected'); $("input[name={{$keys[0]}}]").val('{{$keys[1]}}'); @endforeach @endif @endif @endif @php($return_text='') @if(isset($_GET['sort'] )) @if($_GET['sort']!='') @php($return_text.='|sort:'.$_GET['sort']) @endif @endif @if(isset($_GET['order'] )) @if($_GET['order']!='') @php($return_text.='|order:'.$_GET['order']) @endif @endif @if(isset($_GET['rows'] )) @if($_GET['rows']!='') @php($return_text.='|rows:'.$_GET['rows']) @endif @endif $(document).ready(function(){ $('.do-quick-search').click(function(){ $('#bsetecTable').attr('action','{{ URL::to("admincoupon/multisearch?return=".$return_text)}}'); $('#bsetecTable').submit(); }); }); </script> @stop