allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [10/12] allura git commit: [#7925] more info if file was changed during copy/rename. Don't show diff links if no diff is being displayed
Date Wed, 05 Aug 2015 15:31:20 GMT
[#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/65683c24
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/65683c24
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/65683c24

Branch: refs/heads/db/7925
Commit: 65683c2440967538eb5a9a5b3c72b79895dec6a9
Parents: 373069e
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Aug 4 14:52:57 2015 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Aug 4 14:52:57 2015 +0000

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


http://git-wip-us.apache.org/repos/asf/allura/blob/65683c24/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>


Mime
View raw message