| 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/People/ |
Upload File : |
<?php
echo $this->element('filter-start', array( 'display_helper_text' => true ));
echo $this->Form->create('Person', array(
'class' => 'form-horizontal',
'type' => 'get'
));
?>
<div class="form-group">
<?php
echo $this->Form->label('filter_keyword', __('ค้นหาจากคีย์เวิร์ด'), array( 'class' => 'col-md-2 text-right filter-label' ));
echo $this->Form->input('filter_keyword', array(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-2',
'type' => 'text',
'placeholder' => __('ค้นหาจากชื่อ ที่อยู่ ฯลฯ'),
'value' => $keyword
));
echo $this->Form->label('search_by_position', __('จาก'), array('class' => 'col-md-1 text-center filter-label'));
?>
<div class="col-md-4 js-org-type-filter">
<?php
echo $this->Form->input('search_by_position', array(
'options' => array(
__('ทั้งหมด'),
__('สถานะที่เกี่ยวข้องกับ กสม.')
),
'div' => false,
'type' => 'radio',
'legend' => false,
'value' => $search_by_position,
'before' => '<div class="pull-left radio-filter">',
'separator' => '</div><div class="pull-left radio-filter">',
'after' => '</div>'
));?>
</div>
<?php
echo $this->Form->input('position_id', array(
'type' => 'select',
'options' => $positions,
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'value' => $position_id,
'empty' => __('ทุกสถานะ')
));
?>
</div>
<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->label('subtopic_id', __('ประเภทสิทธิย่อย'), array( 'class' => 'col-md-2 text-right filter-label' ));
echo $this->Form->input('subtopic_id', array(
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'type' => 'select',
'empty' => __('ทุกประเภทสิทธิย่อย'),
'rel' => 'topics',
'value' => $subtopic_id
));
?>
</div>
<div class="form-group">
<?php
// echo $this->Form->label('organization_id',
// __('สังกัดองค์กร'),
// array(
// 'class' => 'col-md-2 text-center filter-label'
// ));
// echo $this->Form->input('organization_id', array(
// 'type' => 'select',
// 'options' => $organizations,
// 'label' => false,
// 'class' => 'form-control',
// 'div' => 'col-md-3',
// 'value' => $organization_id,
// 'empty' => __('ไม่สังกัดเครือข่ายองค์กรใด')
// ));
echo $this->Form->label('organization_id', __('สังกัดองค์กร'), array('class' => 'text-right col-md-2 filter-label'));
echo $this->Form->input('organization_id', array(
'label' => false,
'class' => 'form-control select-topic-id',
'div' => 'col-md-3',
'type' => 'select',
'options' => $organizations,
'value' => $organization_id,
'empty' => __('ไม่สังกัดเครือข่ายองค์กรใด'),
'rel' => 'organizations'
));
echo $this->Form->label('target_id',
__('กลุ่มเป้าหมาย'),
array(
'class' => 'col-md-2 text-right filter-label'
));
echo $this->Form->input('target_id', array(
'type' => 'select',
'options' => $targets,
'label' => false,
'class' => 'form-control',
'div' => 'col-md-3',
'value' => $target_id,
'empty' => __('ไม่เจาะจง')
));
?>
</div>
<div class="form-group">
<?php
echo $this->Form->label('address_type', __('ค้นหาโดย'), array('class' => 'col-md-2 text-right filter-label'));
echo $this->Form->input('address_type', array(
'options' => array(
'address' => __('ที่อยู่'),
'work' => __('พื้นที่การทำงาน')
),
'div' => array('class' => 'col-md-2'),
'class' => 'form-control',
'label' => false,
'value' => $address_type,
));
echo $this->Form->label('region_id', __('ใน'), array('class' => 'text-center col-md-1 filter-label'));
echo $this->Form->input('region_id', array(
'label' => false,
'class' => 'form-control select-region-id',
'div' => 'col-md-2',
'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-2',
'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-2',
'type' => 'select',
'options' => $districts,
'value' => $district_id,
'empty' => __('ทุกอำเภอ'),
'id' => 'select-district-id'
));
?>
</div>
<div class="form-group">
<?php
echo $this->Form->label('joined', __( 'ในช่วงเวลา (วันที่เริ่มเป็นสมาชิกเครือข่าย)' ), array( 'class' => 'col-md-3 text-right filter-label' ));
// 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',
'dateFormat' => 'YMD',
'value' => $joined
));
echo $this->Form->label('joined_to', __( 'ถึง' ), array( 'class' => 'col-md-1 text-center 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 class="col-md-2 text-right">
<?php echo $this->Form->submit(__('ค้นหา'), array(
'class' => 'btn btn-success btn-block'
)); ?>
</div>
</div>
<?php echo $this->Form->end(); ?>
<?php echo $this->element('filter-end'); ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="frontend-content">
<div class="page-header">
<div class="pull-right"><?php echo $this->element('export-buttons'); ?></div>
<h2 class="frontend-content-title text-center">
<?php echo __('ข้อมูลเครือข่ายบุคคล'); ?>
</h2>
<div class="clearfix"></div>
</div><!-- .page-header -->
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th><?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 style="width: 140px;"><?php echo __('สิทธิที่เกี่ยวข้องและจังหวัดที่ปฏิบัติงาน'); ?></th>
<!-- <th><?php echo $this->Paginator->sort('is_activated', __('สถานะ')); ?></th> -->
</tr>
</thead>
<tbody>
<?php for ( $i = 0; $i < count($people); $i++ ) : ?>
<tr>
<td><?php echo $this->paginator->counter('{:start}') + $i; ?></td>
<td>
<?php if ( $people[$i]['Person']['is_activated'] == 1 ) : ?>
<?php echo $this->Html->link( $people[$i]['Person']['name'],
array( 'action' => 'view', $people[$i]['Person']['id']),
array( 'title' => $people[$i]['Person']['name'])); ?>
<?php else : ?>
<?php echo $people[$i]['Person']['name'] ;?>
<?php endif; ?>
</td>
<td>
<?php if( !empty( $people[$i]['PeoplePosition'] ) ): ?>
<?php foreach( $people[$i]['PeoplePosition'] as $peoplePosition ): ?>
<strong><?php echo $positions[ $peoplePosition['position_id'] ] ?></strong><br />
<?php endforeach; ?>
<?php else: ?>
-
<?php endif; ?>
</td>
<td><?php echo $people[$i]['Organization']['name']; ?></td>
<td><?php echo $people[$i]['Person']['address1']; ?></td>
<td><?php echo $people[$i]['Person']['telephone1']; ?></td>
<td><?php echo $people[$i]['Person']['email']; ?></td>
<td class="text-center"><?php echo count($people[$i]['Activity']); ?></td>
<!-- <td><?php echo ($people[$i]['Person']['is_activated'] == 1) ? __('ปกติ') : __('ปิดใช้งาน'); ?></td> -->
</tr>
<?php endfor; ?>
</tbody>
</table>
<h2 class="pull-right admin-title-with-btn">
<?php echo __('ทั้งหมด ') . $this->paginator->counter( '{:count}' ) . __(' บุคคล'); ?>
</h2>
</div>
<?php echo $this->element('pagination'); ?>
</div><!-- .frontend-content -->
</div><!-- .col-md-12 -->
</div><!-- .row -->
</div><!-- .container -->