S
S
Sergey Makarov2014-01-26 12:53:08
Kohana
Sergey Makarov, 2014-01-26 12:53:08

Kohana has a /application/classes/Controller/Content/Articles.php file. How to add a search field to the "Create" button?

File /application/classes/Controller/Content/Articles.php. I need to add a search field to the "Create" button, how to do it? Tried everything, nothing works. If anything else is needed to answer the question, I will provide it. Output in admin. CMS was not made by me and it’s difficult to figure out where it is.

public function action_index() {

    $page_info = Session::instance()->get('articles');
    $page = (!empty($page_info) && isset($page_info['page'])) ? $page_info['page'] : 1;
    $per_page = (!empty($page_info) && isset($page_info['per_page'])) ? $page_info['per_page'] : 10;

 
    $table = AJAXTable::factory('/content/articles', '/content/ajax/articles')
      ->columns(array(
        'thumb' => array(
          'type' => 'image',
          'title' => 'Изображение',
          'options' => array(
            'width' => 140,
            'height' => 75
          )
        ),
        'title' => 'Заголовок',
        'section' => 'Раздел',
      ))
      ->operations(array(
        'images' => array(
          'title' => 'Изображения',
          'url' => '/content/articleimages/view/<id>'
        ),
        'links' => array(
          'title' => 'Ссылки',
          'url' => '/content/articlelinks/view/<id>'
        ),

        'on_main' => '',
        'create' => 'Создать',
        'edit' => 'Редактировать',
        'drop' => 'Удалить',
                
        'enable' => '',
        'sorting' => ''
      ))
      ->pagination($page, $per_page)
      ->render();

    $this->template->title = 'Статьи';
    $this->template->content = $table;
  }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question