mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-23 17:42:15 -05:00
[add] edit tags page
This commit is contained in:
parent
2e2ebe5ec7
commit
6cab59c340
@ -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(
|
||||
|
@ -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;
|
||||
|
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>
|
||||
</header>
|
||||
<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>
|
||||
<article>
|
||||
{{ content | raw }}
|
||||
|
Loading…
Reference in New Issue
Block a user