mirror of
https://github.com/Oreolek/kangana.git
synced 2024-07-05 08:04:27 +03:00
30 lines
1.1 KiB
PHP
30 lines
1.1 KiB
PHP
|
<?php defined('SYSPATH') OR die('No direct script access.');
|
||
|
|
||
|
/**
|
||
|
* Subscription index view controller.
|
||
|
* @package Views
|
||
|
* @author Oreolek
|
||
|
**/
|
||
|
class View_Subscription_Index extends View_Index {
|
||
|
protected $is_admin = TRUE; // admin only view
|
||
|
public $show_date = FALSE;
|
||
|
/**
|
||
|
* An internal function to prepare item data.
|
||
|
**/
|
||
|
protected function show_item($item)
|
||
|
{
|
||
|
if (!$item instanceof ORM)
|
||
|
{
|
||
|
return FALSE;
|
||
|
}
|
||
|
|
||
|
$output = array(
|
||
|
'description' => $item->description,
|
||
|
'view_link' => HTML::anchor(Route::url('default', array('controller' => Request::current()->controller(), 'action' => 'view','id' => $item->id)),$item->title, array('class' => 'link_view')),
|
||
|
'edit_link' => HTML::anchor(Route::url('default', array('controller' => Request::current()->controller(), 'action' => 'edit','id' => $item->id)), __('Edit'), array('class' => 'link_edit')),
|
||
|
'delete_link' => HTML::anchor(Route::url('default', array('controller' => Request::current()->controller(), 'action' => 'delete','id' => $item->id)), __('Delete'), array('class' => 'link_delete')),
|
||
|
);
|
||
|
return $output;
|
||
|
}
|
||
|
}
|