| Server IP : 180.180.241.3 / Your IP : 216.73.216.35 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /AppServ/www/app/View/Activities/ |
Upload File : |
<div class="admin-list-filters">
<?php
echo $this->Form->create('Activity', array(
'type' => 'get',
'class' => 'form-horizontal'
)); ?>
<div class="form-group">
<?php
echo $this->Form->label('filter_keyword',
__('ค้นหาจากคีย์เวิร์ด'),
array(
'class' => 'col-md-2 col-md-offset-1 text-right filter-label'
));
echo $this->Form->input('filter_keyword', array(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-8',
'type' => 'text',
'placeholder' => __('ค้นหาจากชื่อ ที่อยู่ ฯลฯ'),
'value' => $keyword
));
?>
</div>
<div class="row">
<div class="col-md-10 col-md-offset-3">
<h4><?php echo __('ค้นหาตามเงื่อนไข'); ?></h4>
</div>
</div>
<div class="form-group">
<?php
echo $this->Form->label('topic_id',
__('ประเภทสิทธิ'),
array(
'class' => 'col-md-2 col-md-offset-1 text-right filter-label'
));
echo $this->Form->input('topic_id', array(
'label' => false,
'class' => 'form-control select-topic-id',
'div' => 'col-md-4',
'type' => 'select',
'options' => $topics,
'empty' => __('ทุกประเภทสิทธิหลัก'),
'value' => $topic_id,
'rel' => 'topics'
));
echo $this->Form->input('subtopic_id', array(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-4',
'type' => 'select',
'value' => $subtopic_id,
'empty' => __('ทุกประเภทสิทธิย่อย'),
'rel' => 'topics'
));
?>
</div><!-- .form-group -->
<div class="form-group">
<?php
echo $this->Form->label('target_id',
__('กลุ่มเป้าหมาย'),
array(
'class' => 'col-md-2 col-md-offset-1 text-right filter-label'
));
echo $this->Form->input('target_id', array(
'type' => 'select',
'options' => $targets,
'label' => false,
'class' => 'form-control',
'div' => 'col-md-4',
'value' => $target_id,
'empty' => __('ไม่เจาะจง')
));
?>
</div>
<div class="row">
<div class="col-md-10 col-md-offset-3">
<h4><?php echo __('พื้นที่จัดกิจกรรม'); ?></h4>
</div>
</div>
<div class="form-group">
<?php
echo $this->Form->input('region_id', array(
'label' => false,
'class' => 'form-control select-region-id',
'div' => 'col-md-2 col-md-offset-3',
'type' => 'select',
'options' => $regions,
'value' => $region_id,
'empty' => __('ทุกภูมิภาค'),
'rel' => 'regions'
));
echo $this->Form->input('province_id', array(
'label' => false,
'class' => 'form-control select-province-id-custom',
'div' => 'col-md-3',
'type' => 'select',
'options' => $provinces,
'value' => $province_id,
'empty' => __('ทุกจังหวัด'),
'rel' => 'regions'
));
echo $this->Form->input('district_id', array(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'type' => 'select',
'options' => $districts,
'value' => $district_id,
'empty' => __('ทุกอำเภอ'),
'id' => 'select-district-id'
));
?>
</div><!-- .form-group -->
<div class="row">
<div class="col-md-10 col-md-offset-3">
<h4><?php echo __( 'ในช่วงเวลา' ); ?></h4>
</div>
</div>
<div class="form-group">
<?php
// with using `created`, cake messes things up :/
echo $this->Form->input('started', array(
'label' => false,
'before' => '<span class="input-group-addon glyphicon glyphicon-calendar"></span>',
'type' => 'text',
'class' => 'form-control datepicker',
'div' => 'col-md-4 input-group col-md-offset-3',
'dateFormat' => 'YMD',
'value' => $started
));
echo $this->Form->label('ended',
__( 'ถึง' ),
array(
'class' => 'col-md-1 text-right filter-label'
));
echo $this->Form->input('ended', array(
'label' => false,
'before' => '<span class="input-group-addon glyphicon glyphicon-calendar"></span>',
'type' => 'text',
'class' => 'form-control datepicker',
'div' => 'col-md-3 input-group',
'dateFormat' => 'YMD',
'value' => $ended
));
?>
</div><!-- .form-group -->
<div class="form-group">
<?php
echo $this->Form->submit('ค้นหา',
array(
'class' => 'btn btn-success',
'div' => 'col-md-offset-9 col-md-2',
'escape' => false,
'class' => 'btn btn-success btn-block'
));
?>
</div>
<?php echo $this->Form->end(); ?>
</div>
<div class="page-header clearfix">
<h2 class="pull-left admin-title-with-btn"><?php echo __('ทั้งหมด ') . $this->paginator->counter( '{:count}' ) . __(' กิจกรรม'); ?></h2>
<div class="pull-left status-filter">
<?php echo $this->Form->create(false, array('type' => 'get', 'id' => 'status-form')); ?>
<?php echo $this->Form->select('status',
array( 1 => __('เปิดใช้งาน'), 0 => __('ปิดการใช้งาน') ),
array(
'value' => $this->params->query['status'] ,
'empty' => false,
'class' => 'form-control',
'id' => 'status-select'
)
); ?>
<?php echo $this->Form->end(); ?>
</div>
<?php echo $this->Html->link('เพิ่ม', array(
'action' => 'add',
'admin' => true
),
array(
'class' => 'btn btn-success pull-left'
)) ?>
<?php echo $this->element('export-buttons'); ?>
</div>
<div class="table-responsive">
<table class="table table-striped admin-list-data">
<thead>
<tr>
<th class="text-center"><?php echo __('ลำดับ') ?></th>
<th><?php echo $this->Paginator->sort('name', __('ชื่อกิจกรรม')); ?></th>
<th><?php echo __('วันที่จัดกิจกรรม'); ?></th>
<th><?php echo __('ประธานกิจกรรม'); ?></th>
<th><?php echo __('สำนักที่จัดกิจกรรม'); ?></th>
<th class="text-center">
<small><?php echo __('จำนวนองค์กรที่เข้าร่วม'); ?></small>
</th>
<th class="text-center">
<small><?php echo __('จำนวนบุคคลที่เข้าร่วม'); ?></small>
</th>
<th class="text-center">
<small><?php echo __('งบประมาณที่ใช้ (บาท)'); ?></small>
</th>
<th class="text-center">
<small><?php echo __('ความพึงพอใจ (%)'); ?></small>
</th>
<th class="text-center"><?php echo __('แก้ไข'); ?></th>
<th class="actions text-center"><?php echo __('สถานะ'); ?></th>
</tr>
</thead>
<tbody>
<?php $nActivities = count( $activities ); ?>
<?php for( $i = 0; $i < $nActivities; $i++ ): ?>
<?php $activity = $activities[$i]; ?>
<tr>
<td class="text-center"><?php echo $this->paginator->counter( '{:start}' ) + $i; ?></td>
<td>
<?php echo $this->Html->link(h($activity['Activity']['name']),
array(
'action' => 'view',
$activity['Activity']['id'],
'admin' => false
)); ?>
</td>
<td><?php echo h($activity['Activity']['started']); ?> </td>
<td><?php echo isset($activity['Chief'][0]) ? h($activity['Chief'][0]['name']) : '<span class="text-muted">'.__('ไม่มีประธานกิจกรรม') . '</span>'; ?> </td>
<td><?php echo h($activity['Activity']['address']); ?> </td>
<td class="text-center">
<?php echo count($activities[$i]['Organization']) ?>
</td>
<td class="text-center">
<?php echo count($activities[$i]['Person']) ?>
</td>
<td class="text-center">
<?php echo $this->Number->currency($activity['Activity']['budget'], '', array(
'places' => 0
)); ?>
</td>
<td class="text-center"><?php echo h($activity['Activity']['satisfaction']); ?></td>
<td class="actions text-center">
<?php echo $this->Html->link('<span class="glyphicon glyphicon-pencil"></a>', array('action' => 'edit', $activity['Activity']['id']), array('escape' => false)); ?>
</td>
<td class="text-center">
<?php if ( $this->params->query['status'] == 1 ) : ?>
<?php echo $this->Form->postLink('<span class="glyphicon glyphicon-minus-sign"></span>',
array('action' => 'delete', $activity['Activity']['id']),
array('escape' => false),
__('ยืนยันการปิดการใช้งาน')); ?>
<?php else : ?>
<?php echo $this->Form->postLink('<span class="glyphicon glyphicon-refresh"></span>',
array('action' => 'active', $activity['Activity']['id']),
array('escape' => false),
__('ยืนยันการเปิดการใช้งาน')); ?>
<?php endif; ?>
</td>
</tr>
<?php endfor; ?>
</tbody>
</table>
</div>
<?php echo $this->element('pagination'); ?>
<script>
$(function() {
$('#status-select').on('change', function() {
$('form#status-form').submit();
});
});
</script>