happydemon/data-table
最新稳定版本:0.4.0
Composer 安装命令:
composer require happydemon/data-table
包简介
Kohana wrapper for generating standardised jQuery DataTables
README 文档
README
Kohana 3.3 wrapper for generating standardised jQuery DataTables that's prepared to be integrated with twitter bootstrap layouts.
This module generates:
- your table's HTML
- a javascript file that initialises your table
- handles the dataTable request to load/filter/sort your table.
The table's HTML and javascript get cached after being generated (its lifetime can be set in the config file).
Install
Git
git clone git://github.com/morgan/kohana-paginate.git modules/paginate git clone git://github.com/morgan/kohana-datatables.git modules/datatables git clone git://github.com/happyDemon/dataTable.git modules/dataTable
Composer
Add paginate and datatables to your composer.json repositories
"repositories": [ { "type": "package", "package": { "name": "morgan/kohana-paginate", "version": "0.3.0", "type" : "kohana-module", "source": { "url": "https://github.com/morgan/kohana-paginate", "type": "git" } } }, { "type": "package", "package": { "name": "morgan/kohana-datatables", "version": "0.2.0", "type" : "kohana-module", "source": { "url": "https://github.com/morgan/kohana-datatables", "type": "git" } } } ]
Add "happydemon/datatable" to your dependencies
{ "require": { "php":">=5.4", "composer/installers": "*", "happydemon/datatable": "0.3" } }
Example
A controller was added to show how you could implement this module's functionality, all that's left to do is setup the table's columns.
protected function _setup_table($table) { $this->_model = ORM::factory('User'); $table->name('users'); $table->add_column('username', array('head' => 'Username')); $table->add_column('email', array('head' => 'E-mail')); $table->add_column('logins', array('head' => '# logins', 'class' => 'span1')); return $table; }
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-02-09