From patchwork Mon Aug 24 18:23:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 510234 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9318314032C for ; Tue, 25 Aug 2015 04:27:38 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 72B4D1A0EF6 for ; Tue, 25 Aug 2015 04:27:38 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lists.ozlabs.org (Postfix) with ESMTP id 3D9E21A1D71 for ; Tue, 25 Aug 2015 04:24:11 +1000 (AEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 24 Aug 2015 11:24:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,739,1432623600"; d="scan'208";a="789969257" Received: from smarupud-mobl2.amr.corp.intel.com (HELO strange.amr.corp.intel.com) ([10.254.186.249]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2015 11:24:10 -0700 From: Damien Lespiau To: patchwork@lists.ozlabs.org Subject: [PATCH 21/51] filters: Redesign the filters form with the help of bootstrap Date: Mon, 24 Aug 2015 19:23:10 +0100 Message-Id: <1440440620-25937-22-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1440440620-25937-1-git-send-email-damien.lespiau@intel.com> References: <1440440620-25937-1-git-send-email-damien.lespiau@intel.com> X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Signed-off-by: Damien Lespiau Acked-by: Stephen Finucane --- htdocs/css/style.css | 18 +++++++++------ patchwork/filters.py | 16 +++++++------ patchwork/templates/patchwork/filters.html | 36 +++++++++++++++++------------- 3 files changed, 40 insertions(+), 30 deletions(-) diff --git a/htdocs/css/style.css b/htdocs/css/style.css index fcf5ac8..e09821e 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -134,17 +134,21 @@ table.patchlist td img { vertical-align: bottom; } -table.patchlist td.patchlistfilters { - background: #c0c0ff; - border-top: thin solid gray; - border-bottom: thin solid black; - font-size: smaller; +.filters { + border: 1px solid #cccccc; + border-radius: 4px; + padding: 10px 20px; + margin-bottom: 20px; } -td.patchlistfilters a { - color: black; +a.filter-action { + color: black; +} +a.filter-action:hover { + text-decoration: none; } + table.patchlist td.patchlistreorder { background: #c0c0ff; border-top: thin solid gray; diff --git a/patchwork/filters.py b/patchwork/filters.py index 205be29..3f8bd3e 100644 --- a/patchwork/filters.py +++ b/patchwork/filters.py @@ -133,7 +133,8 @@ class SubmitterFilter(Filter): name = self.person.name return mark_safe((' ' % escape(name)) + + 'class="form-control"' + + 'value="%s">' % escape(name)) + '') @@ -188,7 +189,7 @@ class StateFilter(Filter): return None def _form(self): - str = '' % self.param selected = '' if not self.applied: @@ -248,7 +249,7 @@ class SearchFilter(Filter): value = '' if self.search: value = escape(self.search) - return mark_safe('' %\ + return mark_safe('' %\ (self.param, value)) def form_function(self): @@ -301,9 +302,10 @@ class ArchiveFilter(Filter): selected = '' if self.archive_state == b: selected = 'checked="true"' - s += ('%(label)s' + \ - '    ') % \ + s += ('') % \ {'label': label, 'param': self.param, 'selected': selected, @@ -357,7 +359,7 @@ class DelegateFilter(Filter): delegates = User.objects.filter(profile__maintainer_projects = self.filters.project) - str = '' selected = '' if not self.applied: diff --git a/patchwork/templates/patchwork/filters.html b/patchwork/templates/patchwork/filters.html index ddd20dd..842e643 100644 --- a/patchwork/templates/patchwork/filters.html +++ b/patchwork/templates/patchwork/filters.html @@ -149,30 +149,34 @@ function submitter_field_change(field) {% for filter in filters.applied_filters %} {{ filter.name }} = {{ filter.condition }} {% if not filter.forced %} -    +    {% endif %} {% if not forloop.last %}   |   {% endif %} {% endfor %} {% else %} - none   {% endif %}