mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-18 07:08:28 +00:00
[add] edit tags page
This commit is contained in:
parent
2e2ebe5ec7
commit
6cab59c340
4 changed files with 29 additions and 1 deletions
|
@ -430,6 +430,13 @@ class Poche
|
||||||
);
|
);
|
||||||
Tools::logm('config view');
|
Tools::logm('config view');
|
||||||
break;
|
break;
|
||||||
|
case 'edit-tags':
|
||||||
|
# tags
|
||||||
|
$tags = $this->store->retrieveTagsByEntry($id);
|
||||||
|
$tpl_vars = array(
|
||||||
|
'tags' => $tags,
|
||||||
|
);
|
||||||
|
break;
|
||||||
case 'tags':
|
case 'tags':
|
||||||
$tags = $this->store->retrieveAllTags();
|
$tags = $this->store->retrieveAllTags();
|
||||||
$tpl_vars = array(
|
$tpl_vars = array(
|
||||||
|
|
|
@ -106,6 +106,9 @@ class Tools
|
||||||
case 'tags':
|
case 'tags':
|
||||||
$tpl_file = 'tags.twig';
|
$tpl_file = 'tags.twig';
|
||||||
break;
|
break;
|
||||||
|
case 'edit-tags':
|
||||||
|
$tpl_file = 'edit-tags.twig';
|
||||||
|
break;
|
||||||
case 'view':
|
case 'view':
|
||||||
$tpl_file = 'view.twig';
|
$tpl_file = 'view.twig';
|
||||||
break;
|
break;
|
||||||
|
|
18
themes/default/edit-tags.twig
Normal file
18
themes/default/edit-tags.twig
Normal file
|
@ -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 %}
|
||||||
|
<ul>
|
||||||
|
{% for tag in tags %}<li>{{ tag.value }} <a href="#">✘</a></li>{% endfor %}
|
||||||
|
</ul>
|
||||||
|
<form method="post" action="#">
|
||||||
|
<label for="value">New tags: </label><input type="text" id="value" name="value" required="required" />
|
||||||
|
{% trans "you can type several tags, separated by comma" %}<br />
|
||||||
|
<input type="submit" value="add tags" />
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
|
@ -21,7 +21,7 @@
|
||||||
<h1>{{ entry.title|raw }}</h1>
|
<h1>{{ entry.title|raw }}</h1>
|
||||||
</header>
|
</header>
|
||||||
<aside class="tags">
|
<aside class="tags">
|
||||||
tags: {% for tag in tags %}<a href="#">{{ tag.value }}</a> {% endfor %}<a href="#" title="{% trans "edit tags" %}">✎</a>
|
tags: {% for tag in tags %}<a href="#">{{ tag.value }}</a> {% endfor %}<a href="./?&view=edit-tags&id={{ entry.id|e }}" title="{% trans "edit tags" %}">✎</a>
|
||||||
</aside>
|
</aside>
|
||||||
<article>
|
<article>
|
||||||
{{ content | raw }}
|
{{ content | raw }}
|
||||||
|
|
Loading…
Reference in a new issue