aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Tools.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Tools.class.php')
-rw-r--r--inc/poche/Tools.class.php45
1 files changed, 9 insertions, 36 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 9d911699..b0ef55f5 100644
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -88,43 +88,16 @@ class Tools
88 88
89 public static function getTplFile($view) 89 public static function getTplFile($view)
90 { 90 {
91 $default_tpl = 'home.twig'; 91 $views = array(
92 92 'install', 'import', 'export', 'config', 'tags',
93 switch ($view) { 93 'edit-tags', 'view', 'login', 'error'
94 case 'install': 94 );
95 $tpl_file = 'install.twig'; 95
96 break; 96 if (in_array($view, $views)) {
97 case 'import'; 97 return $view . '.twig';
98 $tpl_file = 'import.twig';
99 break;
100 case 'export':
101 $tpl_file = 'export.twig';
102 break;
103 case 'config':
104 $tpl_file = 'config.twig';
105 break;
106 case 'tags':
107 $tpl_file = 'tags.twig';
108 break;
109 case 'edit-tags':
110 $tpl_file = 'edit-tags.twig';
111 break;
112 case 'view':
113 $tpl_file = 'view.twig';
114 break;
115 case 'login':
116 $tpl_file = 'login.twig';
117 break;
118 case 'error':
119 $tpl_file = 'error.twig';
120 break;
121
122 default:
123 $tpl_file = $default_tpl;
124 break;
125 } 98 }
126 99
127 return $tpl_file; 100 return 'home.twig';
128 } 101 }
129 102
130 public static function getFile($url) 103 public static function getFile($url)