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.php41
1 files changed, 9 insertions, 32 deletions
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index 9d8e1fd6..63916582 100644
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -88,39 +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', 'tag'
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 'view':
107 $tpl_file = 'view.twig';
108 break;
109
110 case 'login':
111 $tpl_file = 'login.twig';
112 break;
113
114 case 'error':
115 $tpl_file = 'error.twig';
116 break;
117
118 default:
119 $tpl_file = $default_tpl;
120 break;
121 } 98 }
122 99
123 return $tpl_file; 100 return 'home.twig';
124 } 101 }
125 102
126 public static function getFile($url) 103 public static function getFile($url)