示例#1
0
文件: api.php 项目: uzura8/flockbird
 protected function update_sort_order()
 {
     if (!($ids = \Util_Array::cast_values(explode(',', \Input::post('ids')), 'int', true))) {
         throw new \HttpInvalidInputException('Invalid input data.');
     }
     return \Site_Model::update_sort_order($ids, \News\Model_NewsCategory::forge());
 }
示例#2
0
 /**
  * The show_options action.
  * 
  * @access  public
  * @return  void
  */
 public function action_index()
 {
     $news_category = \News\Model_NewsCategory::forge();
     $val = \Validation::forge()->add_model($news_category);
     $news_categories = \News\Model_NewsCategory::get_all(array('sort_order' => 'asc'));
     $this->set_title_and_breadcrumbs(term('news.category.view', 'site.management'), array('admin/news' => term('news.view', 'site.management')));
     $this->template->subtitle = \View::forge('news/category/_parts/list_subtitle');
     $this->template->post_footer = \View::forge('_parts/sortable_footer');
     $this->template->content = \View::forge('news/category/list', array('news_categories' => $news_categories, 'val' => $val));
 }