diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 540aa55e5..20897c61d 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -240,8 +240,21 @@ class Poche
}
break;
case 'toggle_archive' :
- $this->store->archiveById($id, $this->user->getId());
- Tools::logm('archive link #' . $id);
+ if (isset($_GET['tag_id'])) {
+ //when we want to archive a whole tag
+ $tag_id = $_GET['tag_id'];
+ $allentry_ids = $this->store->retrieveEntriesByTag($tag_id, $this->user->getId());
+ $entry_ids = array();
+ foreach ($allentry_ids as $eachentry) {
+ $entry_ids[] = $eachentry[0];
+ }
+ } else { //archive a single article
+ $entry_ids = array($id);
+ }
+ foreach($entry_ids as $id) {
+ $this->store->archiveById($id, $this->user->getId());
+ Tools::logm('archive link #' . $id);
+ }
if ( Tools::isAjaxRequest() ) {
echo 1;
exit;
diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig
index 9cd663958..93515080d 100755
--- a/themes/baggy/home.twig
+++ b/themes/baggy/home.twig
@@ -62,6 +62,8 @@
{% if searchterm is defined %}{% trans "Delete results matching" %} {{ searchterm }}{% endif %}
+ {% if tag %}{% trans "Mark all articles from this tag as read" %}
{% endif %}
+
{% if tag %}
{% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %}
{% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %}
diff --git a/themes/default/home.twig b/themes/default/home.twig
index 88e6a6ea6..b90005598 100755
--- a/themes/default/home.twig
+++ b/themes/default/home.twig
@@ -62,6 +62,8 @@
{% if searchterm is defined %}{% trans "Delete results matching" %} {{ searchterm }}{% endif %}
+ {% if tag %}{% trans "Mark all articles from this tag as read" %}
{% endif %}
+
{% if tag %}
{% if constant('EPUB') == 1 %}{% trans "Download as ePub3" %}{% endif %}
{% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %}
@@ -75,6 +77,6 @@
{% if constant('MOBI') == 1 %}{% trans "Download as Mobi" %}{% endif %}
{% if constant('PDF') == 1 %}{% trans "Download as PDF" %}{% endif %}
{% endif %}
-
+
{% endif %}
{% endblock %}