diff --git a/application/config/autoload.php b/application/config/autoload.php index e055994..e2039c2 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -58,7 +58,7 @@ $autoload['packages'] = array(); | | $autoload['libraries'] = array('user_agent' => 'ua'); */ -$autoload['libraries'] = array('template'); +$autoload['libraries'] = array(); /* | ------------------------------------------------------------------- diff --git a/application/controllers/admin/Dashboard.php b/application/controllers/admin/Dashboard.php index a2ad0b9..49647a2 100644 --- a/application/controllers/admin/Dashboard.php +++ b/application/controllers/admin/Dashboard.php @@ -20,7 +20,11 @@ class Dashboard extends CI_Controller { */ public function index() { - $adm_template = 'sb_admin'; - $this->template->load('admin/' . $adm_template); + $tpl = config_item('admin_template'); + $tpl_path = 'admin/' . $tpl . '/'; + $data = array( + 'tpl_path' => $tpl_path + ); + $this->load->view($tpl_path . 'index',$data); } } diff --git a/application/controllers/admin/Product.php b/application/controllers/admin/Product.php new file mode 100644 index 0000000..7d66011 --- /dev/null +++ b/application/controllers/admin/Product.php @@ -0,0 +1,15 @@ + $tpl_path + ); + $this->load->view($tpl_path . 'product',$data); + } +} diff --git a/application/libraries/Template.php b/application/libraries/Template.php deleted file mode 100644 index 86d552e..0000000 --- a/application/libraries/Template.php +++ /dev/null @@ -1,60 +0,0 @@ -ci =& get_instance(); - } - - /*function load($tpl_view, $body_view = null, $data = null) - { - if ( ! is_null( $body_view ) ) - { - if ( file_exists( APPPATH.'views/'.$tpl_view.'/'.$body_view ) ) - { - $body_view_path = $tpl_view.'/'.$body_view; - } - else if ( file_exists( APPPATH.'views/'.$tpl_view.'/'.$body_view.'.php' ) ) - { - $body_view_path = $tpl_view.'/'.$body_view.'.php'; - } - else if ( file_exists( APPPATH.'views/'.$body_view ) ) - { - $body_view_path = $body_view; - } - else if ( file_exists( APPPATH.'views/'.$body_view.'.php' ) ) - { - $body_view_path = $body_view.'.php'; - } - else - { - show_error('Unable to load the requested file: ' . $tpl_name.'/'.$view_name.'.php'); - } - - $body = $this->ci->load->view($body_view_path, $data, TRUE); - - if ( is_null($data) ) - { - $data = array('body' => $body); - } - else if ( is_array($data) ) - { - $data['body'] = $body; - } - else if ( is_object($data) ) - { - $data->body = $body; - } - } - - $this->ci->load->view('templates/'.$tpl_view, $data); - }*/ - - function load($tpl_path, $part = 'index', $data = null) - { - $this->ci->load->view($tpl_path . '/' . $part, $data); - } - } \ No newline at end of file diff --git a/application/views/admin/sb_admin/_partial/footer.php b/application/views/admin/sb_admin/_partial/footer.php new file mode 100644 index 0000000..fa561fd --- /dev/null +++ b/application/views/admin/sb_admin/_partial/footer.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/application/views/admin/sb_admin/_partial/head.php b/application/views/admin/sb_admin/_partial/head.php new file mode 100644 index 0000000..528bf4a --- /dev/null +++ b/application/views/admin/sb_admin/_partial/head.php @@ -0,0 +1,14 @@ + + + + + + +
Add some quality, svg illustrations to your project courtesy of unDraw, a constantly updated collection of beautiful svg images that you can use completely free and without attribution!
- Browse Illustrations on unDraw → -SB Admin 2 makes extensive use of Bootstrap 4 utility classes in order to reduce CSS bloat and poor page performance. Custom CSS classes are used to create custom components and custom utility classes.
-Before working with this theme, you should become familiar with the Bootstrap framework, especially the utility classes.
-ID | +Produk | +Aksi | +
---|---|---|
ID | +Produk | +Edit | Hapus | +