"Fossies" - the Fresh Open Source Software Archive

Member "viewvc-1.2.1/templates/default/include/diff_display.ezt" (26 Mar 2020, 9181 Bytes) of package /linux/misc/viewvc-1.2.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 [is diffs.diff_block_format "anchor"]
    2   <p id="[diffs.anchor]"/>
    3 [else]
    4   [define msg_no_changes]<strong>- No changes -</strong>[end]
    5   [define msg_binary]<strong>- Binary content differs -</strong>[end]
    6   [define msg_error]<strong>- ViewVC depends on rcsdiff and GNU diff to create
    7     this page. ViewVC cannot find GNU diff. Even if you have GNU diff
    8     installed, the rcsdiff program must be configured and compiled with
    9     the GNU diff location. -</strong>[end]
   10 
   11   [define left_view_href][if-any diffs.left.prefer_markup][diffs.left.view_href][else][if-any diffs.left.download_href][diffs.left.download_href][end][end][end]
   12   [define right_view_href][if-any diffs.right.prefer_markup][diffs.right.view_href][else][if-any diffs.right.download_href][diffs.right.download_href][end][end][end]
   13 
   14   [define left_item][diffs.left.path] ([if-any diffs.propname]property <em>[diffs.propname]</em>[else]file contents[end])[end]
   15   [define right_item][diffs.right.path] ([if-any diffs.propname]property <em>[diffs.propname]</em>[else]file contents[end])[end]
   16 
   17   [is left_item right_item]
   18     [define common_header][left_item][end]
   19     [define left_header]Revision [if-any left_view_href]<a href="[left_view_href]">[end][diffs.left.rev][if-any left_view_href]</a>[end][if-any diffs.left.author] by <em>[diffs.left.author]</em>[end], [diffs.left.date] [if-any diffs.left.tag]<br/>Tag: [diffs.left.tag][end][end]
   20     [define right_header]Revision [if-any right_view_href]<a href="[right_view_href]">[end][diffs.right.rev][if-any right_view_href]</a>[end][if-any diffs.right.author] by <em>[diffs.right.author]</em>[end], [diffs.right.date] [if-any diffs.right.tag]<br/>Tag: [diffs.right.tag][end][end]
   21   [else]
   22     [define common_header][end]
   23     [define left_header][left_item], Revision [if-any left_view_href]<a href="[left_view_href]">[end][diffs.left.rev][if-any left_view_href]</a>[end][if-any diffs.left.author] by <em>[diffs.left.author]</em>[end], [diffs.left.date] [if-any diffs.left.tag]<br/>Tag: [diffs.left.tag][end][end]
   24     [define right_header][right_item], Revision [if-any right_view_href]<a href="[right_view_href]">[end][diffs.right.rev][if-any right_view_href]</a>[end][if-any diffs.right.author] by <em>[diffs.right.author]</em>[end], [diffs.right.date] [if-any diffs.right.tag]<br/>Tag: [diffs.right.tag][end][end]
   25   [end]
   26 
   27   <h2 style="text-indent: -2em; padding-left: 2em;">Comparing[if-any common_header] [common_header][else][end]:<br/>
   28     [left_header] vs.<br/>
   29     [right_header]</h2>
   30 [end]
   31 
   32 [is diffs.diff_block_format "raw"]
   33   <table cellspacing="0" cellpadding="0" style="margin-top: 1em; margin-left: 2em;">
   34     [is diffs.changes.type "no-changes"]
   35       <tr class="vc_diff_empty">
   36         <td colspan="2" style="text-align:center;">[msg_no_changes]</td>
   37       </tr>
   38     [else]
   39     [is diffs.changes.type "binary-diff"]
   40       <tr class="vc_diff_empty">
   41         <td colspan="2" style="text-align:center;">[msg_binary]</td>
   42       </tr>
   43     [else]
   44       <tr><td colspan="2"><pre class="vc_raw_diff">[diffs.changes.raw]</pre></td></tr>
   45     [end][end]
   46   </table>
   47 [end]
   48 
   49 [is diffs.diff_block_format "sidebyside-1"]
   50   [define change_right][end]
   51   [define last_change_type][end]
   52 
   53   <table cellspacing="0" cellpadding="0" style="margin-top: 1em; margin-left: 2em;">
   54   [for diffs.changes]
   55    [is diffs.changes.type "change"][else][if-any change_right][change_right][define change_right][end][end][end]
   56    [is diffs.changes.type "header"]
   57     <tr>
   58       <th class="vc_header" style="width:6%;"><strong>#</strong></th>
   59       <th colspan="2" class="vc_header">
   60         <strong>Line [diffs.changes.line_info_left]</strong> |
   61         <strong>Line [diffs.changes.line_info_right]</strong> 
   62         [if-any diffs.changes.line_info_extra]| <strong>[diffs.changes.line_info_extra]</strong>[end]
   63       </th>
   64     </tr>
   65    [else]
   66    [is diffs.changes.type "add"]
   67     <tr>
   68       <td id="l[diffs.changes.line_number]">[if-any diffs.right.annotate_href]<a href="[diffs.right.annotate_href]#l[diffs.changes.line_number]">[diffs.changes.line_number]</a>[else][diffs.changes.line_number][end]</td>
   69       <td class="vc_diff_plusminus"><strong style="color: green;">+</strong></td>
   70       <td class="vc_diff_add">[diffs.changes.right]</td>
   71     </tr>
   72    [else]
   73    [is diffs.changes.type "remove"]
   74     <tr>
   75       <td style="text-decoration: line-through">[diffs.changes.line_number]</td>
   76       <td class="vc_diff_plusminus"><strong style="color: red;">&ndash;</strong></td>
   77       <td class="vc_diff_remove">[diffs.changes.left]</td>
   78     </tr>
   79    [else]
   80    [is diffs.changes.type "change"]
   81     [if-any diffs.changes.have_left]
   82     <tr>
   83       <td style="text-decoration: line-through">[diffs.changes.line_number]</td>
   84       <td class="vc_diff_plusminus"><strong style="color: yellow;">&lt;</strong></td>
   85       <td class="vc_diff_changes1">[diffs.changes.left]</td>
   86     </tr>
   87     [end]
   88     [define change_right][change_right]
   89     [if-any diffs.changes.have_right]
   90     <tr>
   91       <td id="l[diffs.changes.line_number]">[if-any diffs.right.annotate_href]<a href="[diffs.right.annotate_href]#l[diffs.changes.line_number]">[diffs.changes.line_number]</a>[else][diffs.changes.line_number][end]</td>
   92       <td class="vc_diff_plusminus"><strong style="color: yellow;">&gt;</strong></td>
   93       <td class="vc_diff_changes2">[diffs.changes.right]</td>
   94     </tr>
   95     [end]
   96    [end]
   97    [else]
   98    [is diffs.changes.type "no-changes"]
   99     <tr><td colspan="3" style="vc_diff_nochange">[msg_no_changes]</td></tr>
  100    [else]
  101    [is diffs.changes.type "binary-diff"]
  102     <tr><td colspan="3" class="vc_diff_binary">[msg_binary]</td></tr>
  103    [else]
  104    [is diffs.changes.type "error"]
  105     <tr><td colspan="3" class="vc_diff_error">[msg_error]</td></tr>
  106    [else][# a line of context]
  107     <tr>
  108       <td id="l[diffs.changes.line_number]">[if-any diffs.right.annotate_href]<a href="[diffs.right.annotate_href]#l[diffs.changes.line_number]">[diffs.changes.line_number]</a>[else][diffs.changes.line_number][end]</td>
  109       <td class="vc_diff_plusminus">&nbsp;</td>
  110       <td style="font-family: monospace; white-space: pre;">[diffs.changes.right]</td>
  111     </tr>
  112    [end][end][end][end][end][end][end]
  113    [define last_change_type][diffs.changes.type][end]
  114   [end]
  115   [if-any change_right][change_right][end]
  116   </table>
  117 [end]
  118 
  119 [is diffs.diff_block_format "sidebyside-2"]
  120   <table class="vc_idiff" cellspacing="0" cellpadding="0" style="margin-top: 1em; margin-left: 2em;">
  121     <colgroup><col style="width: 3%;"/><col class="content" style="width: 47%;"/></colgroup>
  122     <colgroup><col style="width: 3%;"/><col class="content" style="width: 47%;"/></colgroup>
  123     <tbody>
  124       [for diffs.changes]
  125         [is diffs.changes.type "no-changes"]
  126           <tr class="vc_diff_empty">
  127             <td colspan="4" style="text-align:center;">[msg_no_changes]</td>
  128           </tr>
  129         [else]
  130           [is diffs.changes.type "binary-diff"]
  131             <tr class="vc_diff_empty">
  132               <td colspan="4" style="text-align:center;">[msg_binary]</td>
  133             </tr>
  134           [else]
  135             [if-any diffs.changes.gap]
  136               <tr>
  137                 <th>&hellip;</th><th></th>
  138                 <th>&hellip;</th><th></th>
  139               </tr>
  140             [end]
  141             <tr>
  142               [for diffs.changes.columns]
  143                 <th>[diffs.changes.columns.line_number]</th><td[if-any diffs.changes.columns.line_number][else] class="vc_idiff_empty"[end]>[for diffs.changes.columns.segments][if-any diffs.changes.columns.segments.type]<span class="vc_idiff_[diffs.changes.columns.segments.type]">[diffs.changes.columns.segments.text]</span>[else][diffs.changes.columns.segments.text][end][end]</td>
  144               [end]
  145             </tr>
  146           [end]
  147         [end]
  148       [end]
  149     </tbody>
  150   </table>
  151 [end]
  152 
  153 [is diffs.diff_block_format "unified"]
  154   <table class="vc_idiff" cellspacing="0" cellpadding="0" style="margin-top: 1em; margin-left: 2em;">
  155     <colgroup>
  156       <col style="width: 3%;"/>
  157       <col style="width: 3%;"/>
  158       <col class="content" style="width: 94%;"/>
  159     </colgroup>
  160     <tbody>
  161       [for diffs.changes]
  162         [is diffs.changes.type "no-changes"]
  163           <tr class="vc_diff_empty">
  164             <td colspan="3" style="text-align:center;">[msg_no_changes]</td>
  165           </tr>
  166         [else]
  167           [is diffs.changes.type "binary-diff"]
  168             <tr class="vc_diff_empty">
  169               <td colspan="3" style="text-align:center;">[msg_binary]</td>
  170             </tr>
  171           [else]
  172             [if-any diffs.changes.gap]
  173               <tr>
  174                 <th>&hellip;</th>
  175                 <th>&hellip;</th>
  176                 <th></th>
  177               </tr>
  178             [end]
  179             <tr>
  180               <th>[diffs.changes.left_number]</th>
  181               <th>[diffs.changes.right_number]</th>
  182               <td[if-any diffs.changes.type] class="vc_idiff_[diffs.changes.type]"[end]>[for diffs.changes.segments][if-any diffs.changes.segments.type]<span class="vc_idiff_[diffs.changes.segments.type]">[diffs.changes.segments.text]</span>[else][diffs.changes.segments.text][end][end]</td>
  183             </tr>
  184           [end]
  185         [end]
  186       [end]
  187     </tbody>
  188   </table>
  189 [end]