aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:57:35 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-03 08:57:35 +0200
commit2b840e0cfb63a453bea67a98541f3df9c273c5f5 (patch)
tree8c5aa51ba6481f29f9734373d6abd55917d1a671 /inc/poche
parent8cbb2a88024969f7efd90f8053f3b0805fa2f8fa (diff)
downloadwallabag-2b840e0cfb63a453bea67a98541f3df9c273c5f5.tar.gz
wallabag-2b840e0cfb63a453bea67a98541f3df9c273c5f5.tar.zst
wallabag-2b840e0cfb63a453bea67a98541f3df9c273c5f5.zip
twig implementation
Diffstat (limited to 'inc/poche')
-rw-r--r--inc/poche/pocheCore.php46
1 files changed, 27 insertions, 19 deletions
diff --git a/inc/poche/pocheCore.php b/inc/poche/pocheCore.php
index 3e32c4a8..9cbcc077 100644
--- a/inc/poche/pocheCore.php
+++ b/inc/poche/pocheCore.php
@@ -134,9 +134,35 @@ function fetch_url_content($url)
134 return FALSE; 134 return FALSE;
135} 135}
136 136
137function get_tpl_file($view)
138{
139 $tpl_file = 'home.twig';
140 switch ($view)
141 {
142 case 'install':
143 $tpl_file = 'install.twig';
144 break;
145 case 'import';
146 $tpl_file = 'import.twig';
147 break;
148 case 'export':
149 $tpl_file = 'export.twig';
150 break;
151 case 'config':
152 $tpl_file = 'config.twig';
153 break;
154 case 'view':
155 $tpl_file = 'view.twig';
156 break;
157 default:
158 break;
159 }
160 return $tpl_file;
161}
162
137function display_view($view, $id = 0) 163function display_view($view, $id = 0)
138{ 164{
139 global $tpl, $store; 165 global $store;
140 166
141 $tpl_vars = array(); 167 $tpl_vars = array();
142 168
@@ -155,12 +181,6 @@ function display_view($view, $id = 0)
155 pocheTools::logm('export view'); 181 pocheTools::logm('export view');
156 break; 182 break;
157 case 'config': 183 case 'config':
158 $tpl->assign('load_all_js', 0);
159 $tpl->draw('head');
160 $tpl->draw('home');
161 $tpl->draw('config');
162 $tpl->draw('js');
163 $tpl->draw('footer');
164 pocheTools::logm('config view'); 184 pocheTools::logm('config view');
165 break; 185 break;
166 case 'view': 186 case 'view':
@@ -191,18 +211,6 @@ function display_view($view, $id = 0)
191 $tpl_vars = array( 211 $tpl_vars = array(
192 'entries' => $entries, 212 'entries' => $entries,
193 ); 213 );
194
195 // if ($full_head == 'yes') {
196 // $tpl->assign('load_all_js', 1);
197 // $tpl->draw('head');
198 // $tpl->draw('home');
199 // }
200
201 // $tpl->draw('entries');
202 // if ($full_head == 'yes') {
203 // $tpl->draw('js');
204 // $tpl->draw('footer');
205 // }
206 break; 214 break;
207 } 215 }
208 216