From patchwork Mon Jan 14 13:25:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Alnubani X-Patchwork-Id: 1024553 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43dZMw4fGvz9sD4 for ; Tue, 15 Jan 2019 00:39:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="v0nLae+d"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43dZMw3dqMzDqVZ for ; Tue, 15 Jan 2019 00:39:56 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=40.107.2.41; helo=eur02-ve1-obe.outbound.protection.outlook.com; envelope-from=alialnu@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="v0nLae+d"; dkim-atps=neutral Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20041.outbound.protection.outlook.com [40.107.2.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43dZ3Y19gmzDqPl for ; Tue, 15 Jan 2019 00:25:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BeYzRLi9fnPBxmox/XSHkUfqe1pEndIZf0f23lIDnmI=; b=v0nLae+dsqzFWaglAqvX/3Js9X6MbR7Nd5s1Y/ns9/VqPENfh8OWkQwjxLXrvrSbGM0TPtp4fxvrw5nwFSaNUY7KAoy+yTcAM4BxksYzZ5EhzE9ySCvrfSO19vjhI/fQtKiget0M/6SEDd3jzoKOospWUGUSlsAQPyHrnRE2F2Y= Received: from VI1PR05MB4269.eurprd05.prod.outlook.com (52.133.12.22) by VI1PR05MB4575.eurprd05.prod.outlook.com (20.176.3.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.18; Mon, 14 Jan 2019 13:25:39 +0000 Received: from VI1PR05MB4269.eurprd05.prod.outlook.com ([fe80::39c0:bdf5:cba0:8f14]) by VI1PR05MB4269.eurprd05.prod.outlook.com ([fe80::39c0:bdf5:cba0:8f14%5]) with mapi id 15.20.1516.019; Mon, 14 Jan 2019 13:25:39 +0000 From: Ali Alnubani To: "patchwork@lists.ozlabs.org" Subject: [PATCH] templates: Override page title based on set filters Thread-Topic: [PATCH] templates: Override page title based on set filters Thread-Index: AQHUrAyjjb1r0zTv50WDO+6uN1qIug== Date: Mon, 14 Jan 2019 13:25:38 +0000 Message-ID: <20190114132510.20593-1-alialnu@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.11.0 x-clientproxiedby: LO2P265CA0059.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:60::23) To VI1PR05MB4269.eurprd05.prod.outlook.com (2603:10a6:803:40::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=alialnu@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2001:4b98:dc0:51:216:3eff:feac:53b] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR05MB4575; 6:GmtlQ68TA2VLWcUOf46HRT9KgK458kc73tDM/tTCjT4BAQIkZmpEdE87sHm2vk6t1Z5TSW8YjndAzZfS9twOVj0EN7Gr31XgouocjgEEAvguJqtKHff3KcCK4YfhJkpaKoQn9IsC8rZK5EgUpYWXzRegyqhFyReXCyiv0uf3SfSxHzgsH4geVo9rtGpYLbzhIUTVmrkH6i0f1N7N2I76y0F+mv5Q925IZiUEq+3uWlofLSIGT8NYw4Z7w/CrEBqjyDm3OqbiYus4IFHrUctJj+7aW5SDsKM0ueLXoiGWSn6Kf0ZbJ73KmzG0bMlBLCd0pa2eZ+C4Z68ytvxgdPgYUDZl+0vR07BBQ5DzCHrnDy7gTUEEyz8XeUoCKFaXWSyXkV+t+Ul1svpjD6/VqlB0a/ER/qkfRf6EXE1DT8zBP0lQQ2DiqR4fwfPwLjHD1r2hnd+r0DrXzlcoTioNViIb4A==; 5:PYoFe0K/b1jJDz6ya95g2Lrz9aapfdydiq5A2aJwj+RcCUcJso61mBZSQtcCIMb+LAP1vGL3C+EfSL/3nWvYfUH0uCqsGCtlAjmG7+RKvmfcxH59GE5XwnNIT1rUYuTyV/YkPoCQI7lyNo3/UmdtlvwamasWLgh5O8Mg1iLL7zpu3Hon3ByK8RcMEwH/g+lrW48ZkAMy84NpXgw12koKvQ==; 7:NB8vgeZiE4x9FLQzQfU/wraO38T66Rr4lLgIesqP6djx9yYfoNVQ7p45Z/UAgVXeFBiZz00GIHWB4xX+i2sSp0amZgnMMtYXdtzCajlOnf5qN3QhBZUzOt+CcBhmpM4odOKIFIZDgTVnYFONYSi7vQ== x-ms-office365-filtering-correlation-id: eb3c7453-6dec-4488-eec2-08d67a23c60e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600109)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:VI1PR05MB4575; x-ms-traffictypediagnostic: VI1PR05MB4575: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0917DFAC67 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(396003)(39860400002)(366004)(136003)(346002)(189003)(199004)(36756003)(305945005)(53936002)(52116002)(6116002)(1076003)(46003)(25786009)(2351001)(86362001)(6512007)(68736007)(8936002)(97736004)(4326008)(99286004)(5640700003)(102836004)(71200400001)(71190400001)(7736002)(14454004)(486006)(478600001)(50226002)(386003)(6506007)(476003)(2616005)(8676002)(105586002)(6436002)(316002)(6916009)(6486002)(106356001)(256004)(5660300001)(1730700003)(2906002)(186003)(4744005)(81156014)(81166006)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB4575; H:VI1PR05MB4269.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: sWKpRB5MrvjAAcFBF3rmnUUTtiatcT2w9B50yr/ou33TnKe6MK5bLgAELskYT8tHPxLwi3y3u2nXH+53yih23XRwilW6N0/Gvsl77KEisu2GT8hpPpRtb1BSH4BJN5lG+6BmMddAyUAOg9oua8B83AXjE45sfRUgrK8VlCJ7WEWtsQVBwRyPrBM/xraf5qSJDkyOqmwkN5fpmYgUZq5rV3Qui21TUBQo8eLLaVXJiQXFMn1O0OBsRe0MH7MkLwSBQ24YXX3lw01DSe9XCkjjpl2txXZytm/KLyjgsunVfHHEisbH/5G+mZVaS03XzLRJwp+t5trz/GiY4BPU7TOQ5QunT3csIeSNnorYx/3GRtt0iQV8lhMQFDniyAzI3Q9bNXgpIdtEb2RyrfbNa7cbAL7yywRzD+VJ1ac5ZnVXIhA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb3c7453-6dec-4488-eec2-08d67a23c60e X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2019 13:25:38.3404 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB4575 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Monjalon Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" 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 Signed-off-by: Ali Alnubani --- 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 %}