diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-12-12 01:48:24 -0800 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-12-12 01:48:24 -0800 |
commit | 05d6dd487ceaf8c00510ebe5e0e762fcc11df691 (patch) | |
tree | ebe6a344aa054a37c1c2d2e54efc59a67930e873 /inc/poche/Tools.class.php | |
parent | d460914f65254d201911a8346792d680218c8dc3 (diff) | |
parent | 6bf4702608e4f32d66a9840ec93461f653315a76 (diff) | |
download | wallabag-05d6dd487ceaf8c00510ebe5e0e762fcc11df691.tar.gz wallabag-05d6dd487ceaf8c00510ebe5e0e762fcc11df691.tar.zst wallabag-05d6dd487ceaf8c00510ebe5e0e762fcc11df691.zip |
Merge pull request #356 from inthepoche/tags
Tags feature
Diffstat (limited to 'inc/poche/Tools.class.php')
-rw-r--r-- | inc/poche/Tools.class.php | 41 |
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) |