* docs/template-authoring-guide.html

* templates/classic/include/diff_display.ezt
* lib/viewvc.py
  Rename 'display_as' to 'diff_block_format', as discussed on ML.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2650 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/issue-495-dev
stilor 2011-10-27 18:20:06 +00:00
parent dc1763b37b
commit 6e81b5eb1e
3 changed files with 16 additions and 16 deletions

View File

@ -710,7 +710,7 @@ td {
and property differences.</td>
</tr>
<tr class="varlevel2">
<td class="varname">diffs.display_as</td>
<td class="varname">diffs.diff_block_format</td>
<td>String</td>
<td>Indicates the type of this block. One of the <tt>anchor</tt> (no display,
create an anchor), <tt>raw</tt> (non-colored diff, display as produced),
@ -721,16 +721,16 @@ td {
<tr class="varlevel2">
<td class="varname">diffs.anchor</td>
<td>String</td>
<td>If <var>diffs.display_as</var> is <tt>anchor</tt>, this variable specifies
<td>If <var>diffs.diff_block_format</var> is <tt>anchor</tt>, this variable specifies
the anchor name.</td>
</tr>
<tr class="varlevel2">
<td class="varname">diffs.changes</td>
<td>List/Container</td>
<td>Set of objects which contain information about a change in a single
object (file or property). Not present if <var>diffs.display_as</var> is
object (file or property). Not present if <var>diffs.diff_block_format</var> is
<tt>anchor</tt>, otherwise has different format depending on
<var>diffs.display_as</var> (applicable as indicated in brackets below).</td>
<var>diffs.diff_block_format</var> (applicable as indicated in brackets below).</td>
</tr>
<tr class="varlevel3">
<td class="varname">diffs.changes.raw</td>

View File

@ -3346,20 +3346,20 @@ class DiffDescription:
self.hide_legend = 0
if self.human_readable:
self.line_differ = self._line_idiff_sidebyside
self.display_as = 'sidebyside-2'
self.diff_block_format = 'sidebyside-2'
else:
self.line_differ = self._line_idiff_unified
self.display_as = 'unified'
self.diff_block_format = 'unified'
else:
if self.human_readable:
self.display_as = 'sidebyside-1'
self.diff_block_format = 'sidebyside-1'
self.fp_differ = self._fp_vclib_hr
else:
self.display_as = 'raw'
self.diff_block_format = 'raw'
self.fp_differ = self._fp_vclib_raw
def anchor(self, anchor_name):
self.changes.append(_item(display_as='anchor', anchor=anchor_name))
self.changes.append(_item(diff_block_format='anchor', anchor=anchor_name))
def get_content_diff(self, left, right):
options = {}
@ -3394,7 +3394,7 @@ class DiffDescription:
if is_undisplayable(val_left) or is_undisplayable(val_right):
self.changes.append(_item(left=left,
right=right,
display_as=self.display_as,
diff_block_format=self.diff_block_format,
changes=[ _item(type=_RCSDIFF_IS_BINARY) ],
propname=name))
continue
@ -3411,7 +3411,7 @@ class DiffDescription:
self.changes.append(_item(left=left,
right=right,
changes=changes,
display_as=self.display_as,
diff_block_format=self.diff_block_format,
propname=propname))
def _line_idiff_sidebyside(self, lines_left, lines_right, options):

View File

@ -1,4 +1,4 @@
[is diffs.display_as "anchor"]
[is diffs.diff_block_format "anchor"]
<p id="[diffs.anchor]"/>
[else]
[define msg_no_changes]<br/><strong>- No changes -</strong><br/>&nbsp;[end]
@ -23,7 +23,7 @@
[if-any diffs.right.tag]<br/>Tag: [diffs.right.tag][end][end]
[end]
[is diffs.display_as "raw"]
[is diffs.diff_block_format "raw"]
<table cellspacing="0" cellpadding="0" style="margin-top: 1em;">
<tr class="vc_diff_header">
<th style="width:5%">&nbsp;</th><th style="width:95%; text-align:left;">[left_header]</th>
@ -50,7 +50,7 @@
</table>
[end]
[is diffs.display_as "sidebyside-1"]
[is diffs.diff_block_format "sidebyside-1"]
<table cellspacing="0" cellpadding="0" style="margin-top: 1em;">
<tr class="vc_diff_header">
<th style="width:6%;"></th>
@ -145,7 +145,7 @@
</table>
[end]
[is diffs.display_as "sidebyside-2"]
[is diffs.diff_block_format "sidebyside-2"]
<table class="vc_idiff" style="margin-top: 1em;">
<colgroup><col style="width: 3%;"/><col class="content" style="width: 47%;"/></colgroup>
<colgroup><col style="width: 3%;"/><col class="content" style="width: 47%;"/></colgroup>
@ -185,7 +185,7 @@
</table>
[end]
[is diffs.display_as "unified"]
[is diffs.diff_block_format "unified"]
<table class="vc_idiff" style="margin-top: 1em;">
<colgroup>
<col style="width: 3%;"/>