From patchwork Mon Sep 23 21:50:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1166215 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 (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46cdM50yxMz9sCJ for ; Tue, 24 Sep 2019 07:51:45 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Vx0WajgE"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46cdM43wqkzDqPv for ; Tue, 24 Sep 2019 07:51:44 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=metepolat2000@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Vx0WajgE"; dkim-atps=neutral Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46cdLV5ZhfzDqGt for ; Tue, 24 Sep 2019 07:51:14 +1000 (AEST) Received: by mail-wr1-x444.google.com with SMTP id o18so15578894wrv.13 for ; Mon, 23 Sep 2019 14:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V7OUlYFXO0DlZTCi6JxoBIdNbf5cVCNici47Xi1RjQk=; b=Vx0WajgEKSyrSO0Mf68VsrV3Q2vFH6pdjEFILE79G/vilJAE5+wE1DOVaoDZiQW9UH ElAKbhJ8xKeso83dOfxDaUyuf1bAMy/nHznmhnFxP4f7ulavpaKbtgmuJ0NZEmY8zWq1 np6JGwpWYDBYVaFZqUUTxCM2zaHPj9eX5ckcd6UGExkt8zrCNtQ2fvnFO8T59pMzmKOx 46NojtQ3khxKyOq6mIHtPsTLm8olL1BZRilAXX7LE2og/UiRHNt/5g1xUukdxtmEdbj2 vzr5Si4TKH6A+mhXS1UEPxZGJ66whk/+fyldOlNizVg+YfeZbUoBvnFqShBJaSQvJTpk uHyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V7OUlYFXO0DlZTCi6JxoBIdNbf5cVCNici47Xi1RjQk=; b=QFmMDn3DWyeMusVHAV9SkMZkzB5Td+GbvB0r6VyGF2mmZGBhqVIt2OzvN4H/I6E7g1 fTj5R/MCsxoUcMZSkymKkTqZGlts94+Yct6OMXvEO/CS6TcslHbvCaNN2uNnsoN9A+QV r2DtMNqKbhfuDi1D3zjp13GP+bg59RzM8jFvxiMHVABDdiL5hwqKmMg+YtmcYSZL7LhB MFI1VyLZqcUWWbllc+cB+XaNPfBc5F1heQ1ClVRUfz52kf7Pvc5djifMtMutBL9fEQQw lcPfNMHrUB3Sk1c0ddiocdJL8zyegLR1M8o5raPIFZdBLwG2yLsWWivazlIbZS8WEHwG YmrQ== X-Gm-Message-State: APjAAAV4mnewmQ9FaUufZMTvNznpFAk+d3g9HowoiuGbFoYVlzfx2un0 LDkBrviqQI/QmLA0mm7OTermaKdiWAxJsQ== X-Google-Smtp-Source: APXvYqyQfGkJqMBBU23+8FPVav7flFBTmDzPh8HZBR4xzTWReGN4q0jwjbd+5pS1OzaJMZjS0T5/qg== X-Received: by 2002:a5d:49c2:: with SMTP id t2mr959621wrs.351.1569275470975; Mon, 23 Sep 2019 14:51:10 -0700 (PDT) Received: from Metes-MBP.fritz.box (aftr-62-216-202-68.dynamic.mnet-online.de. [62.216.202.68]) by smtp.gmail.com with ESMTPSA id d9sm16601782wrf.62.2019.09.23.14.51.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Sep 2019 14:51:10 -0700 (PDT) From: metepolat2000@gmail.com To: patchwork@lists.ozlabs.org Subject: [PATCH 1/3] ui: Retain table header position on size changes Date: Mon, 23 Sep 2019 23:50:10 +0200 Message-Id: <20190923215012.4670-2-metepolat2000@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190923215012.4670-1-metepolat2000@gmail.com> References: <20190923215012.4670-1-metepolat2000@gmail.com> MIME-Version: 1.0 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: ralf.ramsauer@oth-regensburg.de Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" From: Mete Polat Prevents table header labels from moving up and down when showing or hiding additional information for a patch. Signed-off-by: Mete Polat --- htdocs/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/css/style.css b/htdocs/css/style.css index 9f3ee66..fe4ce7c 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -189,7 +189,7 @@ table.patchmeta th { table.patchmeta tr th, table.patchmeta tr td { text-align: left; padding: 1px 10px; - vertical-align: middle; + vertical-align: top; } .patchrelations ul { From patchwork Mon Sep 23 21:50:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mete Polat X-Patchwork-Id: 1166216 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46cdMQ19Hcz9sCJ for ; Tue, 24 Sep 2019 07:52:02 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pHX3cZAo"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46cdMQ0K7fzDqMb for ; Tue, 24 Sep 2019 07:52:02 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::32b; helo=mail-wm1-x32b.google.com; envelope-from=metepolat2000@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pHX3cZAo"; dkim-atps=neutral Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46cdLW6btjzDqFS for ; Tue, 24 Sep 2019 07:51:15 +1000 (AEST) Received: by mail-wm1-x32b.google.com with SMTP id v17so10847049wml.4 for ; Mon, 23 Sep 2019 14:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AnmreiWx49gY1CuqmwjZivU5u/aejFhW8oS+iUl1jzg=; b=pHX3cZAoZciAtLRULpEIgMu6oOb5M2k3oYZyCDloqzAPdws9RK19bcF+KVI5Bszow3 /Z/9/ne9ltQHIwquI9kVfSDrO7DRgIjyBir6zIYmow9pVkHfBvNyyfp6C1fI2RYkjDbc dPFfsNVJrEPNtqkcJ5MMxEY6zMYQ2xVrYC/VCHOmKEwIdosaCkt9CqOeUpnkVLXN+Uop VMSjj7QW/fsJC2uOjAyDCZatdC4czLJGmnSoHWv2/842rURb1Ab+TMNbNFND9iLBASBF zRkLnjskfsQoyEB+Fh5f9Pl45Sys2ArvptNm3LbDfOlqjFIXf8EHkh4Q4mGqxJOxsiZg y+1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AnmreiWx49gY1CuqmwjZivU5u/aejFhW8oS+iUl1jzg=; b=Ukf2wSWwW2Rh2ocn2491jjImk5l2PPsquKtdQP3D+/JJr/npp+tz4ihmFgmJ9oMcia 8egntQSukvaSpwepPTVg7Om+ESe+39l1+0clcdCzREVZU7g9oFMJbQNp4SDDZXZtfe/V iC+7hpsLpfUxceKmUAbxEQnBn9/JtKl2ofMv1ndtgtXcYnXxuwHZseLSED7X8pMjs3KU noDEiF3L5ga7u4LlyeRxxwm5PG6R8z5ChG1Z21yDkvfPf0sUrFMefFvmLQwQTRg7wSs0 Ez50G9ftkKqZAJDdo7M4I7TeFyOqTEbDat40IWkBTnkdZsOP4L66uOp11rduYrsZnBpP M/8g== X-Gm-Message-State: APjAAAWsnWL/p2fHr6vSH2DPlFCJmGWv6GVPfwlyUbiJqR9hAk/K4hkk e1DeweUR8zlApzlo9S5nsGFb24o1lSv6pQ== X-Google-Smtp-Source: APXvYqzJzvw9J31YkgwS6z+OB2Ou8Loq4snbwH5+9RQLVD/1Zm5wnQqyWS0RMoF/q1kCaCqQOg+oXg== X-Received: by 2002:a7b:c247:: with SMTP id b7mr1199115wmj.121.1569275471978; Mon, 23 Sep 2019 14:51:11 -0700 (PDT) Received: from Metes-MBP.fritz.box (aftr-62-216-202-68.dynamic.mnet-online.de. [62.216.202.68]) by smtp.gmail.com with ESMTPSA id d9sm16601782wrf.62.2019.09.23.14.51.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Sep 2019 14:51:11 -0700 (PDT) From: metepolat2000@gmail.com To: patchwork@lists.ozlabs.org Subject: [PATCH 2/3] models, templates: Add relations between patches Date: Mon, 23 Sep 2019 23:50:11 +0200 Message-Id: <20190923215012.4670-3-metepolat2000@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190923215012.4670-1-metepolat2000@gmail.com> References: <20190923215012.4670-1-metepolat2000@gmail.com> MIME-Version: 1.0 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: ralf.ramsauer@oth-regensburg.de Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" From: Mete Polat Introduces the ability to add relations between patches. Relations are displayed in the details page of a patch. Therefore the previous 'related' row containing a list of other patches in the series has been combined with the directly above listed series name row. Related patches that are located in another projects are additionally noted. Patch relations can be used for example for browsing different revisions of a patch. Signed-off-by: Mete Polat --- htdocs/css/style.css | 2 +- patchwork/migrations/0037_patch_relations.py | 28 +++++++++++ patchwork/models.py | 13 +++++ patchwork/templates/patchwork/submission.html | 47 ++++++++++++++----- 4 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 patchwork/migrations/0037_patch_relations.py diff --git a/htdocs/css/style.css b/htdocs/css/style.css index fe4ce7c..ec16904 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -192,7 +192,7 @@ table.patchmeta tr th, table.patchmeta tr td { vertical-align: top; } -.patchrelations ul { +.patchgroup ul { list-style-type: none; padding: 0; margin: 0; diff --git a/patchwork/migrations/0037_patch_relations.py b/patchwork/migrations/0037_patch_relations.py new file mode 100644 index 0000000..a7a1074 --- /dev/null +++ b/patchwork/migrations/0037_patch_relations.py @@ -0,0 +1,28 @@ +# Generated by Django 2.2.3 on 2019-09-05 18:07 + +import datetime +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import patchwork.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('patchwork', '0036_project_commit_url_format'), + ] + + operations = [ + migrations.CreateModel( + name='PatchRelation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + ), + migrations.AddField( + model_name='patch', + name='related', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='patches', related_query_name='patch', to='patchwork.PatchRelation'), + ), + ] diff --git a/patchwork/models.py b/patchwork/models.py index 32d1b3c..e547eb6 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -436,6 +436,12 @@ class Patch(Submission): default=None, null=True, help_text='The number assigned to this patch in the series') + # related patches metadata + + related = models.ForeignKey( + 'PatchRelation', null=True, blank=True, on_delete=models.SET_NULL, + related_name='patches', related_query_name='patch') + objects = PatchManager() @staticmethod @@ -832,6 +838,13 @@ class BundlePatch(models.Model): ordering = ['order'] +class PatchRelation(models.Model): + + def __str__(self): + return ', '.join(patch.name for patch in self.patches.all()) or \ + '' + + @python_2_unicode_compatible class Check(models.Model): diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html index e79dd92..599fa2d 100644 --- a/patchwork/templates/patchwork/submission.html +++ b/patchwork/templates/patchwork/submission.html @@ -72,18 +72,12 @@ function toggle_div(link_id, headers_id) Series - - {{ submission.series }} - - - - - Related - - show -