[PATCH] templates: Override page title based on set filters

Ali Alnubani alialnu at mellanox.com
Tue Jan 15 00:25:38 AEDT 2019


Set the document's title based on the applied filters,
giving priority to the series' title, and then to the
submitter's name if the series filter wasn't applied.

Suggested-by: Thomas Monjalon <thomas at monjalon.net>
Signed-off-by: Ali Alnubani <alialnu at mellanox.com>
---
 patchwork/templates/patchwork/partials/filters.html | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/patchwork/templates/patchwork/partials/filters.html b/patchwork/templates/patchwork/partials/filters.html
index 41ed2c2..9566cc0 100644
--- a/patchwork/templates/patchwork/partials/filters.html
+++ b/patchwork/templates/patchwork/partials/filters.html
@@ -115,6 +115,11 @@ $(document).ready(function() {
         }
     });
 });
+{% if "series" in filters.applied_filters %}
+document.title = "{{ filters.applied_filters.series.condition }}";
+{% elif "submitter" in filters.applied_filters %}
+document.title = "{{ filters.applied_filters.submitter.condition }}";
+{% endif %}
 </script>
 
 <div class="filters">
-- 
2.11.0



More information about the Patchwork mailing list