Changeset 719


Ignore:
Timestamp:
Jan 30, 2015 9:27:18 AM (10 years ago)
Author:
quyenla
Message:

collaborator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php

    r690 r719  
    1 <?php 
     1<?php
    22$admin_info = $this->session->userdata('adminInfo');
    33$role_id = $admin_info['role_id'];
     
    4545            <div style="padding-bottom:4px" class="table-header">
    4646                Thống kê tài khoản
    47                                 <?php if($role_id == 1): ?>
    48                 <button href="#addUser" data-toggle="modal" class="btn btn-success pull-right">
    49                     <i class="icon-plus"></i>
    50                     Thêm cộng tác viên
    51                 </button>
    52                                 <?php endif; ?>
     47                <?php if ($role_id == 1): ?>
     48                    <button href="#addUser" data-toggle="modal" class="btn btn-success pull-right">
     49                        <i class="icon-plus"></i>
     50                        Thêm cộng tác viên
     51                    </button>
     52                <?php endif; ?>
    5353
    5454            </div>
     
    6262                                        <select onchange="filter();" name="items" size="1" aria-controls="sample-table-2">                                     
    6363                                            <?php foreach ($itemsoptions as $option) { ?>
    64                                             <option <?php if($option == $perpage) echo "selected"; ?> value="<?php echo $option;?>"><?php echo $option;?></option>
     64                                                <option <?php if ($option == $perpage) echo "selected"; ?> value="<?php echo $option; ?>"><?php echo $option; ?></option>
    6565                                            <?php } ?>
    6666                                        </select> bản ghi</label>
     
    7272                                <div class="dataTables_filter" id="sample-table-2_filter">
    7373                                    <label>Tìm kiếm:
    74                                         <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label>
     74                                        <input type="text" name="keyword" id="keyword" value='<?php echo $keyword; ?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label>
    7575                                </div>
    76                                                                 <div id="daterangepicker" class="selectbox pull-right">
    77                                                                         <i class="icon-calendar"></i>
    78                                                                         <input id="daterange" type="text" name="daterange" class="daterangepicker" style="background: #ffffff; width: 176px; height: 28px; position: inherit;">
    79                                                                                
    80                                                                         </span>
    81                                                                 </div>
     76                                <div id="daterangepicker" class="selectbox pull-right">
     77                                    <i class="icon-calendar"></i>
     78                                    <input id="daterange" type="text" name="daterange" class="daterangepicker" style="background: #ffffff; width: 176px; height: 28px; position: inherit;">
     79
     80                                    </span>
     81                                </div>
    8282                            </div>
    8383                        </div>
    84                         <input type="hidden" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order;?>" />
    85                         <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/>
     84                        <input type="hidden" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order; ?>" />
     85                        <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field; ?>"/>
    8686                    </form>
    8787                    <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
    8888                        <thead>
    8989                            <tr role="row">
    90                                
    91                              
    92                                 <th class="<?php if ($sorting_field == 'full_name') {echo $sorting_order;} else {echo "sorting";}?>" id="full_name" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 183px;" aria-label="Họ tên: activate to sort column ascending">Họ tên</th>
    93                                 <th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">Số điện thoại</th>
     90
     91
     92                                <th class="<?php
     93                                if ($sorting_field == 'cellphone') {
     94                                    echo $sorting_order;
     95                                } else {
     96                                    echo "sorting";
     97                                }
     98                                ?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">Số điện thoại</th>
    9499                                <th>Quận/Huyện</th>
    95                                                                 <th>Tỉnh/TP</th>
    96                                 <th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="Ngày đăng kÜ: activate to sort column ascending">
     100                                <th>Tỉnh/TP</th>
     101                                <th class="<?php
     102                                if ($sorting_field == 'created_time') {
     103                                    echo $sorting_order;
     104                                } else {
     105                                    echo "sorting";
     106                                }
     107                                ?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="Ngày đăng kÜ: activate to sort column ascending">
    97108                                    <i class="icon-time bigger-110 hidden-480"></i>
    98109                                    Ngày đăng kÜ
    99110                                </th>
    100                                 <th class="<?php if ($sorting_field=='activated') {echo $sorting_order;} else {echo "sorting";}?>" id="activated" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 158px;" aria-label="Trạng thái: activate to sort column ascending">Trạng thái</th>
    101                                 <?php if($role_id == 1): ?><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label="">Chức năng</th><?php endif; ?></tr>
     111                                <th class="<?php
     112                                if ($sorting_field == 'activated') {
     113                                    echo $sorting_order;
     114                                } else {
     115                                    echo "sorting";
     116                                }
     117                                ?>" id="activated" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 158px;" aria-label="Trạng thái: activate to sort column ascending">Trạng thái</th>
     118                            <?php if ($role_id == 1): ?><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label="">Chức năng</th><?php endif; ?></tr>
    102119                        </thead>
    103120
    104121
    105122                        <tbody role="alert" aria-live="polite" aria-relevant="all">
    106                            
    107                             <?php
    108                             foreach ($collaborators as $collaborator) {
    109                                 ?>
    110                             <tr class="odd">
    111                                
    112 
    113                                
    114                                 <td class=" "><a href="<?php echo base_url();?>admin/thong_ke_cong_tac_vien/<?php echo $collaborator['id'];?>"><?php echo $collaborator['full_name']?></a></td>
    115                                 <td class=" "><?php echo $collaborator['cellphone'];?></td>
    116                                                                 <td class=" "><?php echo $collaborator['district'];?></td>
    117                                                                 <td class=" "><?php echo $collaborator['province'];?></td>
    118                                 <td class=" "><?php echo $collaborator['created_time'];?></td>
    119 
    120                                 <td class="hidden-480 ">
    121                                     <?php if ( $collaborator['activated']==1)
    122                                     {?>
    123                                     <span class="label label-sm label-success">Đã kích hoạt</span>
    124                                     <?php
    125                                     } else
    126                                     {
    127                                     ?>
    128                                     <span class="label label-sm label-default">Chưa kích hoạt</span>
    129                                     <?php
    130                                     }
    131                                     ?>
    132                                 </td>
    133                                                                 <?php if($role_id == 1): ?>
    134                                 <td class=" ">
    135                                     <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
    136                                         <a href="#" class="blue">
    137                                             <i data-toggle="ajaxModal" href='<?php echo base_url();?>admin/cong_tac_vien/xem/<?php echo $collaborator['id'];?>'  class="icon-zoom-in bigger-130"></i>
    138                                         </a>
    139 
    140                                         <a href="#" class="green">
    141                                             <i data-toggle="ajaxModal" href='<?php echo base_url();?>admin/cong_tac_vien/sua/<?php echo $collaborator['id'];?>' data-toggle="modal" href='#editUser' class="icon-pencil bigger-130"></i>
    142                                         </a>
    143 
    144                                         <a href="#" class="red">
    145                                             <i data-toggle="ajaxModal" href='<?php echo base_url();?>admin/cong_tac_vien/xoa/<?php echo $collaborator['id'];?>' data-toggle="modal" href='#deleteUser' class="icon-trash bigger-130"></i>
    146                                         </a>
    147                                     </div>
    148 
    149                                     <div class="visible-xs visible-sm hidden-md hidden-lg">
    150                                         <div class="inline position-relative">
    151                                             <button data-toggle="dropdown" class="btn btn-minier btn-yellow dropdown-toggle">
    152                                                 <i class="icon-caret-down icon-only bigger-120"></i>
    153                                             </button>
    154 
    155                                             <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
    156                                                 <li>
    157                                                     <a title="" data-rel="tooltip" class="tooltip-info" href="#" data-original-title="View">
    158                                                         <span class="blue">
    159                                                             <i class="icon-zoom-in bigger-120"></i>
    160                                                         </span>
    161                                                     </a>
    162                                                 </li>
    163 
    164                                                 <li>
    165                                                     <a title="" data-rel="tooltip" class="tooltip-success" href="#" data-original-title="Edit">
    166                                                         <span class="green">
    167                                                             <i class="icon-edit bigger-120"></i>
    168                                                         </span>
    169                                                     </a>
    170                                                 </li>
    171 
    172                                                 <li>
    173                                                     <a title="" data-rel="tooltip" class="tooltip-error" href="#" data-original-title="Delete">
    174                                                         <span class="red">
    175                                                             <i class="icon-trash bigger-120"></i>
    176                                                         </span>
    177                                                     </a>
    178                                                 </li>
    179                                             </ul>
    180                                         </div>
    181                                     </div>
    182                                 </td>
    183                                                                 <?php endif; ?>
    184                             </tr>
    185                             <?php } ?>
     123
     124<?php
     125foreach ($collaborators as $collaborator) {
     126    ?>
     127                                <tr class="odd">
     128
     129
     130
     131                                    <td class=" "><a href="<?php echo base_url(); ?>admin/thong_ke_cong_tac_vien/<?php echo $collaborator['id']; ?>"><?php echo $collaborator['cellphone']; ?></a></td>
     132                                    <td class=" "><?php echo $collaborator['district']; ?></td>
     133                                    <td class=" "><?php echo $collaborator['province']; ?></td>
     134                                    <td class=" "><?php echo $collaborator['created_time']; ?></td>
     135
     136                                    <td class="hidden-480 ">
     137                                        <?php if ($collaborator['activated'] == 1) {
     138                                            ?>
     139                                            <span class="label label-sm label-success">Đã kích hoạt</span>
     140                                            <?php
     141                                        } else {
     142                                            ?>
     143                                            <span class="label label-sm label-default">Chưa kích hoạt</span>
     144        <?php
     145    }
     146    ?>
     147                                    </td>
     148    <?php if ($role_id == 1): ?>
     149                                        <td class=" ">
     150                                            <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
     151                                                <a href="#" class="blue">
     152                                                    <i data-toggle="ajaxModal" href='<?php echo base_url(); ?>admin/cong_tac_vien/xem/<?php echo $collaborator['id']; ?>'  class="icon-zoom-in bigger-130"></i>
     153                                                </a>
     154
     155                                                <a href="#" class="green">
     156                                                    <i data-toggle="ajaxModal" href='<?php echo base_url(); ?>admin/cong_tac_vien/sua/<?php echo $collaborator['id']; ?>' data-toggle="modal" href='#editUser' class="icon-pencil bigger-130"></i>
     157                                                </a>
     158
     159                                                <a href="#" class="red">
     160                                                    <i data-toggle="ajaxModal" href='<?php echo base_url(); ?>admin/cong_tac_vien/xoa/<?php echo $collaborator['id']; ?>' data-toggle="modal" href='#deleteUser' class="icon-trash bigger-130"></i>
     161                                                </a>
     162                                            </div>
     163
     164                                            <div class="visible-xs visible-sm hidden-md hidden-lg">
     165                                                <div class="inline position-relative">
     166                                                    <button data-toggle="dropdown" class="btn btn-minier btn-yellow dropdown-toggle">
     167                                                        <i class="icon-caret-down icon-only bigger-120"></i>
     168                                                    </button>
     169
     170                                                    <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
     171                                                        <li>
     172                                                            <a title="" data-rel="tooltip" class="tooltip-info" href="#" data-original-title="View">
     173                                                                <span class="blue">
     174                                                                    <i class="icon-zoom-in bigger-120"></i>
     175                                                                </span>
     176                                                            </a>
     177                                                        </li>
     178
     179                                                        <li>
     180                                                            <a title="" data-rel="tooltip" class="tooltip-success" href="#" data-original-title="Edit">
     181                                                                <span class="green">
     182                                                                    <i class="icon-edit bigger-120"></i>
     183                                                                </span>
     184                                                            </a>
     185                                                        </li>
     186
     187                                                        <li>
     188                                                            <a title="" data-rel="tooltip" class="tooltip-error" href="#" data-original-title="Delete">
     189                                                                <span class="red">
     190                                                                    <i class="icon-trash bigger-120"></i>
     191                                                                </span>
     192                                                            </a>
     193                                                        </li>
     194                                                    </ul>
     195                                                </div>
     196                                            </div>
     197                                        </td>
     198    <?php endif; ?>
     199                                </tr>
     200<?php } ?>
    186201
    187202
     
    192207
    193208                        </tbody></table><div class="row"><div class="col-sm-6">
    194                                 <div class="dataTables_info" id="sample-table-2_info">Hiển thị <?php echo ($start+1)?> đến <?php echo ($start+$perpage)?> cá»§a <?php echo $total?> bản ghi</div>
    195                                    
    196                             </div>
     209                            <div class="dataTables_info" id="sample-table-2_info">Hiển thị <?php echo ($start + 1) ?> đến <?php echo ($start + $perpage) ?> cá»§a <?php echo $total ?> bản ghi</div>
     210
     211                        </div>
    197212                        <div class="col-sm-6">
    198213                            <div class="dataTables_paginate paging_bootstrap">
    199214                                <ul class="pagination">
    200                                     <?php echo $paging; ?>
     215<?php echo $paging; ?>
    201216                                </ul>
    202217                            </div>
     
    207222            </div>
    208223
    209            
     224
    210225        </div>
    211226
Note: See TracChangeset for help on using the changeset viewer.