| 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/Organizations/ |
Upload File : |
<div class="admin-list-filters">
<?php
echo $this->Form->create('Organization',
array(
'type' => 'get',
'class' => 'form-horizontal'
));
?>
<div class="form-group">
<?php
echo $this->Form->label('filter_keyword',
__('ค้นหาจากคีย์เวิร์ด'),
array(
'class' => 'col-md-3 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-2">
<h4><?php echo __('ค้นหาตามเงื่อนไข'); ?></h4>
</div>
</div>
<div class="form-group">
<div class="col-md-9 col-md-offset-2 js-org-type-filter">
<?php echo $this->Form->input('is_member',
array(
'options' => array(
__('ทั้งหมด'),
__('โครงการพิเศษ')
),
'div' => false,
'type' => 'radio',
'legend' => false,
'value' => $is_member,
'before' => '<div class="pull-left radio-filter">',
'separator' => '</div><div class="pull-left radio-filter">',
'after' => '</div>'
)); ?>
<?php echo $this->Form->input('member_id',
array(
'type' => 'select',
'options' => $members,
'value' => $member_id,
'label' => false,
'empty' => __('ทุกโครงการ'),
'class' => 'form-control',
'div' => 'col-md-4',
'disabled' => !$is_member,
'id' => 'member-id'
)) ?>
</div>
</div>
<div class="form-group">
<?php
echo $this->Form->label('filter_type',
__('ประเภทองค์กร'),
array(
'class' => 'text-right filter-label col-md-2'
));
?>
<?php
echo $this->Form->input('filter_type', array(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'type' => 'select',
'options' => $types,
'empty' => __('ทุกประเภท'),
'value' => $type_id
)); ?>
<?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(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'type' => 'select',
'options' => $targets,
'value' => $target_id,
'empty' => __('ไม่เจาะจง')
));
?>
</div><!-- .form-group -->
<div class="form-group">
<?php
echo $this->Form->label('topic_id',
__('ประเภทสิทธิ'),
array(
'class' => 'col-md-2 text-right filter-label'
));
echo $this->Form->input('topic_id', array(
'label' => false,
'class' => 'form-control select-topic-id',
'div' => 'col-md-3',
'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-3',
'type' => 'select',
'empty' => __('ทุกประเภทสิทธิย่อย'),
'rel' => 'topics'
));
?>
</div><!-- .form-group -->
<div class="form-group">
<?php
echo $this->Form->label('address',
__('ที่ตั้ง'),
array(
'class' => 'col-md-2 text-right filter-label'
));
echo $this->Form->input('region_id', array(
'label' => false,
'class' => 'form-control select-region-id',
'div' => 'col-md-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-2">
<h4><?php echo __( 'ในช่วงเวลา (วันที่เริ่มเป็นสมาชิกเครือข่าย)' ); ?></h4>
</div>
</div>
<div class="form-group">
<?php
// with using `created`, cake messes things up :/
echo $this->Form->input('joined', 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 col-md-offset-2',
'dateFormat' => 'YMD',
'value' => $joined
));
echo $this->Form->label('joined_to',
__( 'ถึง' ),
array(
'class' => 'col-md-1 alignright filter-label'
));
echo $this->Form->input('joined_to', 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' => $joined_to
));
?>
</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->Html->link( __( 'Batch Import' ), array(
'action' => 'batch_add',
'admin' => true
),
array(
'class' => 'btn btn-success pull-left'
)) ?>
<?php echo $this->element('export-buttons'); ?>
</div>
<div class="admin-wrapper">
<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><?php echo __('ประเภทองค์กร') ?></th>
<th><?php echo __('วันที่เป็นสมาชิก') ?></th>
<th class="text-center"><?php echo __('แก้ไข'); ?></th>
<th class="actions text-center"><?php echo __('สถานะ'); ?></th>
</tr>
</thead>
<tbody>
<?php $nOrganizations = count( $organizations ); ?>
<?php for( $i = 0; $i < $nOrganizations; $i++ ): ?>
<?php $organization = $organizations[$i]; ?>
<tr>
<td class="text-center"><?php echo $this->paginator->counter( '{:start}' ) + $i; ?></td>
<td><?php echo $this->Html->link(h($organization['Organization']['name']),
array(
'action' => 'view',
$organization['Organization']['id'],
'admin' => false
)); ?> </td>
<td><?php echo h($organization['Organization']['address1']); ?> </td>
<td><?php echo h($organization['Organization']['telephone1']); ?> </td>
<td><?php echo h($organization['Organization']['email']); ?> </td>
<td><?php echo h($organization['Type'][0]['name']); ?> </td>
<td><?php echo $this->Time->format('d/m/Y', $organization['Organization']['joined']); ?></td>
<td class="actions text-center">
<?php echo $this->Html->link('<span class="glyphicon glyphicon-pencil"></a>', array('action' => 'edit', $organization['Organization']['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', $organization['Organization']['id']),
array('escape' => false),
__('ยืนยันการปิดการใช้งาน')); ?>
<?php else : ?>
<?php echo $this->Form->postLink('<span class="glyphicon glyphicon-refresh"></span>',
array('action' => 'active', $organization['Organization']['id']),
array('escape' => false),
__('ยืนยันการเปิดการใช้งาน')); ?>
<?php endif; ?>
</td>
</tr>
<?php endfor; ?>
</tbody>
</table>
</div>
</div>
<?php echo $this->element('pagination'); ?>
<script>
$(document).ready(function() {
// toggle mou_from and mou_to fields when change is_mou radio
$('.is-mou-filter').find('input:radio').on('change', function() {
var checked = parseInt($(this).val(), 10) === 1;
$('.datepicker').prop('disabled', !checked);
});
$('#status-select').on('change', function() {
$('form#status-form').submit();
});
});
</script>