Skip to content

Commit

Permalink
Add each field label for the diff view, fix visual diff link and add …
Browse files Browse the repository at this point in the history
…break
  • Loading branch information
frapell committed Feb 20, 2017
1 parent eba5400 commit 061b702
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Breaking changes:

New features:

- *add item here*
- Add each field label for the diff view, fix visual diff link and add break
[frapell]

Bug fixes:

Expand Down
7 changes: 5 additions & 2 deletions plone/app/iterate/browser/diff.pt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
tal:repeat="d diffs/getDiffs">
<div class="field"
tal:condition="not:d/same"
tal:define="unified exists:d/unified_diff;
tal:define="field_label d/label;
unified exists:d/unified_diff;
html exists:d/html_diff;
inline exists:d/inline_diff;
ndiff exists:d/ndiff;
inline python: inline and not request.get('no_inline', 0);
html python: html and not request.get('show_unified', 0)">
<label tal:content="field_label" />

<tal:html condition="inline">
<br />
Expand All @@ -58,14 +60,15 @@
<br />
<tal:visual-only tal:condition="exists:d/inline_diff">
<a href="#"
tal:attributes="href string:">Show visual differences</a>
tal:attributes="href string:${diff_url}">Show visual differences</a>
<br />
</tal:visual-only>
<a href="#"
tal:attributes="href string:${diff_url}?no_inline:int=1&amp;show_unified:int=1">Unified diff format</a>
<pre tal:content="structure d/html_diff">[html diff]</pre>
</tal:html>
<tal:unified condition="python:unified and not html">
<br />
<a href="#"
tal:condition="exists:d/inline_diff"
tal:attributes="href string:${diff_url}">Show visual differences</a>
Expand Down

0 comments on commit 061b702

Please sign in to comment.