mirror of
https://github.com/Oreolek/kangana.git
synced 2024-06-16 23:11:07 +03:00
Layout changes
There's a weird bug that layout stays the same
This commit is contained in:
parent
cc24e19cbe
commit
f918e54768
|
@ -5,7 +5,13 @@
|
|||
**/
|
||||
class Controller_Client extends Controller_Layout {
|
||||
protected $secure_actions = array(
|
||||
'index','create', 'edit', 'delete', 'view'
|
||||
'index',
|
||||
'group',
|
||||
'create',
|
||||
'edit',
|
||||
'delete',
|
||||
'view',
|
||||
'search',
|
||||
);
|
||||
protected $controls = array(
|
||||
'name' => 'input',
|
||||
|
@ -20,6 +26,15 @@ class Controller_Client extends Controller_Layout {
|
|||
->find_all();
|
||||
}
|
||||
|
||||
public function action_group()
|
||||
{
|
||||
$this->template = new View_Client_Index;
|
||||
$this->template->title = __('Clients');
|
||||
$this->template->items = ORM::factory('Client')
|
||||
->filter_by_page($this->request->param('page'))
|
||||
->find_by_group($this->request->param('group_id'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually add a client.
|
||||
**/
|
||||
|
@ -78,7 +93,7 @@ class Controller_Client extends Controller_Layout {
|
|||
->filter_by_page($this->request->param('page'))
|
||||
->find_all();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unsubscription link action.
|
||||
**/
|
||||
|
|
|
@ -65,7 +65,7 @@ class Controller_Layout extends Controller {
|
|||
{
|
||||
$controls = $this->controls;
|
||||
}
|
||||
|
||||
|
||||
if ($this->request->method() === Request::POST) {
|
||||
$model->values($this->request->post(), array_keys($controls));
|
||||
$model->customize();
|
||||
|
|
|
@ -117,7 +117,7 @@ class View_Index extends View_Layout {
|
|||
return $this->items;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Pagination: calculate current page
|
||||
**/
|
||||
|
@ -128,7 +128,7 @@ class View_Index extends View_Layout {
|
|||
return 1;
|
||||
return $current_page;
|
||||
}
|
||||
|
||||
|
||||
protected function view_link_colwidth()
|
||||
{
|
||||
$columns = 3;
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
{{#show_create}}
|
||||
{{{link_new}}}
|
||||
{{/show_create}}
|
||||
{{#content}}
|
||||
<div class="hyphenate">
|
||||
{{{content}}}
|
||||
{{{.}}}
|
||||
</div>
|
||||
{{/content}}
|
||||
<table class="table">
|
||||
<thead>
|
||||
{{#get_header}}
|
||||
<th>{{.}}</th>
|
||||
{{/get_header}}
|
||||
</thead>
|
||||
{{#get_items}}
|
||||
<tr>
|
||||
<td>{{{view_link}}}</td>
|
||||
<td class="hyphenate">{{{description}}}</td>
|
||||
<td>{{client_count}}</td>
|
||||
{{#edit_link}}
|
||||
<td>{{{edit_link}}}</td>
|
||||
<td>{{{delete_link}}}</td>
|
||||
{{/edit_link}}
|
||||
</tr>
|
||||
{{/get_items}}
|
||||
<tbody>
|
||||
{{#get_items}}
|
||||
<tr>
|
||||
<td>{{{view_link}}}</td>
|
||||
<td class="hyphenate">{{{description}}}</td>
|
||||
<td>{{client_count}}</td>
|
||||
{{#edit_link}}
|
||||
<td>{{{edit_link}}}</td>
|
||||
<td>{{{delete_link}}}</td>
|
||||
{{/edit_link}}
|
||||
</tr>
|
||||
{{/get_items}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{{get_paging}}}
|
||||
|
|
Loading…
Reference in a new issue