Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BEFD1D54D for ; Tue, 18 Dec 2012 04:29:35 +0000 (UTC) Received: (qmail 16206 invoked by uid 500); 18 Dec 2012 04:29:34 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 16003 invoked by uid 500); 18 Dec 2012 04:29:31 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 15831 invoked by uid 99); 18 Dec 2012 04:29:29 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Dec 2012 04:29:29 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D134881E27F; Tue, 18 Dec 2012 04:29:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tvansteenburgh@apache.org To: allura-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/41] git commit: [#5389] Minor tweak to diff switch UI Message-Id: <20121218042928.D134881E27F@tyr.zones.apache.org> Date: Tue, 18 Dec 2012 04:29:28 +0000 (UTC) [#5389] Minor tweak to diff switch UI Signed-off-by: Cory Johns Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/0a7b1853 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0a7b1853 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0a7b1853 Branch: refs/heads/tv/4957 Commit: 0a7b1853741f48b198e952d8505284a049e100de Parents: b770d92 Author: Cory Johns Authored: Mon Dec 17 22:54:58 2012 +0000 Committer: Cory Johns Committed: Mon Dec 17 23:00:40 2012 +0000 ---------------------------------------------------------------------- Allura/allura/templates/repo/commit.html | 4 +++- Allura/allura/templates/repo/diff.html | 2 +- .../forgegit/tests/functional/test_controllers.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0a7b1853/Allura/allura/templates/repo/commit.html ---------------------------------------------------------------------- diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html index a6054af..c4ca330 100644 --- a/Allura/allura/templates/repo/commit.html +++ b/Allura/allura/templates/repo/commit.html @@ -68,11 +68,13 @@ Commit {{commit.shorthand_id()}} {{commit_labels( href = href + '&diformat=regular'; $('#' + diffid).load(href, function() { self.attr('data-diformat', 'regular'); + self.text('Switch to side-by-side view'); }); } else { href = href + '&diformat=sidebyside'; $('#' + diffid).load(href, function() { self.attr('data-diformat', 'sidebyside'); + self.text('Switch to unified view'); }); } return false; @@ -107,7 +109,7 @@ Commit {{commit.shorthand_id()}} {{commit_labels( {% if type in ('added', 'changed') %} {{h.really_unicode(file)}} Diff - Switch regular/side-by-side view + Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view {% elif type == 'removed' %} {{h.really_unicode(file)}} {% elif type == 'copied' %} http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0a7b1853/Allura/allura/templates/repo/diff.html ---------------------------------------------------------------------- diff --git a/Allura/allura/templates/repo/diff.html b/Allura/allura/templates/repo/diff.html index 6faede2..4c5ba93 100644 --- a/Allura/allura/templates/repo/diff.html +++ b/Allura/allura/templates/repo/diff.html @@ -34,7 +34,7 @@ {% if session.diformat == 'sidebyside' %} {% set switch_url = request.url.replace('&diformat=sidebyside', '') + '&diformat=regular' %} - {% set switch_text = 'regular' %} + {% set switch_text = 'unified' %} {% else %} {% set switch_url = request.url.replace('&diformat=regular', '') + '&diformat=sidebyside' %} {% set switch_text = 'side-by-side' %} http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0a7b1853/ForgeGit/forgegit/tests/functional/test_controllers.py ---------------------------------------------------------------------- diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py index 7a83039..d89ee0f 100644 --- a/ForgeGit/forgegit/tests/functional/test_controllers.py +++ b/ForgeGit/forgegit/tests/functional/test_controllers.py @@ -169,7 +169,7 @@ class TestRootController(_TestCase): assert fn + '&diformat=sidebyside">Switch to side-by-side view' in r r = self.app.get(ci + fn + '&diformat=sidebyside') - assert fn + '&diformat=regular">Switch to regular view' in r + assert fn + '&diformat=regular">Switch to unified view' in r assert '' in r def test_refresh(self):