From 6cab59c3409f4edc9b309b76295cb4061bff3fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 6 Dec 2013 14:03:14 +0100 Subject: [add] edit tags page --- inc/poche/Poche.class.php | 7 +++++++ inc/poche/Tools.class.php | 3 +++ themes/default/edit-tags.twig | 18 ++++++++++++++++++ themes/default/view.twig | 2 +- 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 themes/default/edit-tags.twig diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 802ec542..5d368842 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -430,6 +430,13 @@ class Poche ); Tools::logm('config view'); break; + case 'edit-tags': + # tags + $tags = $this->store->retrieveTagsByEntry($id); + $tpl_vars = array( + 'tags' => $tags, + ); + break; case 'tags': $tags = $this->store->retrieveAllTags(); $tpl_vars = array( diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php index 5bb65fe9..9d911699 100644 --- a/inc/poche/Tools.class.php +++ b/inc/poche/Tools.class.php @@ -106,6 +106,9 @@ class Tools case 'tags': $tpl_file = 'tags.twig'; break; + case 'edit-tags': + $tpl_file = 'edit-tags.twig'; + break; case 'view': $tpl_file = 'view.twig'; break; diff --git a/themes/default/edit-tags.twig b/themes/default/edit-tags.twig new file mode 100644 index 00000000..0bd1aba7 --- /dev/null +++ b/themes/default/edit-tags.twig @@ -0,0 +1,18 @@ +{% extends "layout.twig" %} +{% block title %}edit tags{% endblock %} +{% block menu %} +{% include '_menu.twig' %} +{% endblock %} +{% block content %} +{% if tags is empty %} +no tags +{% endif %} + +
+ + {% trans "you can type several tags, separated by comma" %}
+ +
+{% endblock %} \ No newline at end of file diff --git a/themes/default/view.twig b/themes/default/view.twig index 5a7c9165..9f9e23c8 100644 --- a/themes/default/view.twig +++ b/themes/default/view.twig @@ -21,7 +21,7 @@

{{ entry.title|raw }}

{{ content | raw }} -- cgit v1.2.3