0

アクティブなユーザーを表示するために Ignited Datatables を使用しています。私が今欲しいのは、ユーザーを無効にできるアクション列を持つことです。これは私のコードです。

見る:

<script type="text/javascript">
$(document).ready(function() {
    $('#users_table').dataTable({
        "sScrollX": "100%",
        "sScrollXInner": "100%",
        "sPaginationType": "full_numbers",
        "bProcessing": true,
        "bServerSide": true,
        "bJQueryUI": true,
        "bDeferRender": true,
        "sAjaxSource": "<?php echo base_url(); ?>/users/get_active_users",
        "sServerMethod": "POST",
        "aoColumnDefs": [{
            'bSortable': false,
            'aTargets': [7]
        }
        ]
    });
});
</script>
<thead>
  <tr>
     <th class="width70 text-center">Username</th>
     <th class="text-center">Full Name</th>
     <th class="text-center">Office</th>
     <th class="text-center">Position</th>
     <th class="text-center">Email</th>
     <th class="width60 text-center">Privilege</th>
     <th class="width160 text-center">Date Registered</th>
     <th class="width60 text-center">Actions</th>
  </tr>
</thead>
<tbody>
  <tr>
     <td colspan="7" class="dataTables_empty">Loading data from server</td>
  </tr>
</tbody>
4

1 に答える 1

1

with using ignited datatables you need to add action column in your datatables like

$this->datatables->add_column('action', '<a href="user/disable/$1">Disable User</a>', id);
于 2012-10-22T06:47:21.403 に答える