You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/08/10 19:33:17 UTC

[46/50] [abbrv] allura git commit: [#7925] more info if file was changed during copy/rename. Don't show diff links if no diff is being displayed

[#7925] more info if file was changed during copy/rename.  Don't show diff links if no diff is being displayed


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/96391122
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/96391122
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/96391122

Branch: refs/heads/hs/7925
Commit: 963911220644208590b3b767bc3753aececc51e0
Parents: 1919ec0
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Tue Aug 4 14:52:57 2015 +0000
Committer: Heith Seewald <hs...@slashdotmedia.com>
Committed: Mon Aug 10 09:38:37 2015 -0400

----------------------------------------------------------------------
 Allura/allura/templates/repo/commit.html | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/96391122/Allura/allura/templates/repo/commit.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index adf57b2..7678a32 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -116,7 +116,9 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
   <tbody>
     {% for type, file, _, _ in artifacts %}
     <tr>
-        <td>{{ type }}</td>
+        <td>{{ type }}
+            {% if type in ('copied', 'renamed') and file.ratio != 1 %}(with changes){% endif %}
+        </td>
         <td><a href="#diff-{{loop.index}}">
             {% if type == 'copied' %}
               {{ '%s -> %s' % (h.really_unicode(file.old), h.really_unicode(file.new)) }}
@@ -137,7 +139,7 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
             {% if type in ('added', 'changed') %}
                 {% set file_url = commit.url() + 'tree/' + h.urlquote(h.really_unicode(file)) %}
                 <a href="{{ file_url }}">{{h.really_unicode(file)}}</a>
-                {% if obj_type != 'tree' %}
+                {% if obj_type != 'tree' and is_text %}
                     {% set diff_url = file_url + '?barediff=' + (prev[0]._id if prev else '') %}
                     <a class="commit-diff-link" href="{{ diff_url.replace('?barediff=', '?diff=') }}">Diff</a>
                     <a class="commit-diff-link switch-diff-format-link" data-diformat="{{session.diformat}}" data-diffid="diff-{{loop.index}}" href="{{ diff_url }}">Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view</a>