Commit b3cec2e3 by Phạm Văn Đoan

tổ chức lại view của module categories

parent 259f8092
......@@ -64,7 +64,7 @@ class Admin extends CI_Controller
$this->session->set_flashdata('flash_message', get_phrase('data_deleted'));
redirect(site_url('admin/categories'), 'refresh');
}
$page_data['page_name'] = 'categories';
$page_data['page_name'] = 'category/categories';
$page_data['page_title'] = get_phrase('categories');
$page_data['categories'] = $this->crud_model->get_categories($param2);
$this->load->view('backend/index', $page_data);
......@@ -76,12 +76,12 @@ class Admin extends CI_Controller
redirect(site_url('login'), 'refresh');
}
if ($param1 == "add_category") {
$page_data['page_name'] = 'category_add';
$page_data['page_name'] = 'category/category_add';
$page_data['categories'] = $this->crud_model->get_categories()->result_array();
$page_data['page_title'] = get_phrase('add_category');
}
if ($param1 == "edit_category") {
$page_data['page_name'] = 'category_edit';
$page_data['page_name'] = 'category/category_edit';
$page_data['page_title'] = get_phrase('edit_category');
$page_data['categories'] = $this->crud_model->get_categories()->result_array();
$page_data['category_id'] = $param2;
......@@ -107,10 +107,10 @@ class Admin extends CI_Controller
}
if ($param1 == 'add_sub_category') {
$page_data['page_name'] = 'sub_category_add';
$page_data['page_name'] = 'category/sub_category_add';
$page_data['page_title'] = get_phrase('add_sub_category');
} elseif ($param1 == 'edit_sub_category') {
$page_data['page_name'] = 'sub_category_edit';
$page_data['page_name'] = 'category/sub_category_edit';
$page_data['page_title'] = get_phrase('edit_sub_category');
$page_data['sub_category_id'] = $param2;
}
......
Phạm Văn Đoan
<?php
if ($selected_category_id == 0) {
foreach ($categories->result_array() as $category) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment