1{if not empty($diff_style) and (($old and $new && $old.version !== $new.version) or not empty($diffdata))} 2 {if (not isset($translation_mode) or $translation_mode ne 'y') and empty($hide_version_info)} 3 <h2>{tr}Comparing version {$old.version} with version {$new.version}{/tr}</h2> 4 {/if} 5 <div class="table-responsive"> 6 <table class="table diff"> 7 {if isset($translation_mode) and $translation_mode eq 'n'} 8 <tr> 9 <th colspan="2"><b>{tr}Version:{/tr} <a href="tiki-pagehistory.php?page={$page|escape:"url"}&preview={$old.version}" title="{tr}View{/tr}">{$old.version}</a>{if $old.version == $info.version} ({tr}Current{/tr}){/if}</b></th> 10 <th colspan="2"><b>{tr}Version:{/tr} <a href="tiki-pagehistory.php?page={$page|escape:"url"}&preview={$new.version}" title="{tr}View{/tr}">{$new.version}</a>{if $new.version == $info.version} ({tr}Current{/tr}){/if}</b></th> 11 </tr> 12 <tr> 13 <td colspan="2">{$old.user|userlink} - {$old.lastModif|tiki_short_datetime}</td> 14 <td colspan="2">{$new.user|userlink} - {$new.lastModif|tiki_short_datetime}</td> 15 </tr> 16 {if $old.comment || $new.comment} 17 <tr> 18 <td colspan="2" class="editdate">{if $old.comment}{$old.comment}{else} {/if}</td> 19 <td colspan="2" class="editdate">{if $new.comment}{$new.comment}{else} {/if}</td> 20 </tr> 21 {/if} 22 {if $old.description != $new.description} 23 <tr> 24 <td colspan="2" class="diffdeleted">{if $old.description}{$old.description}{else} {/if}</td> 25 <td colspan="2" class="diffadded">{if $new.description}{$new.description}{else} {/if}</td> 26 </tr> 27 {/if} 28 {/if} 29 30 {if $diff_style eq "sideview"} 31 <tr> 32 <td colspan="2"><div class="wikitext">{$old.data}</div></td> 33 <td colspan="2"><div class="wikitext">{$new.data}</div></td> 34 </tr> 35 {/if} 36 <tr> 37 {if $smarty.request.oldver_idx + 1 eq $smarty.request.newver_idx or $smarty.request.oldver_idx eq $smarty.request.newver_idx} 38 <td colspan="4"> 39 {if isset($show_all_versions) and $show_all_versions eq "n"} 40 {pagination_links cant=$ver_cant offset=$smarty.request.bothver_idx offset_arg="bothver_idx" itemname="{tr}Session{/tr}" show_numbers="n"}{/pagination_links} 41 {else} 42 {pagination_links cant=$ver_cant offset=$smarty.request.bothver_idx offset_arg="bothver_idx" itemname="{tr}Version{/tr}" show_numbers="n"}{/pagination_links} 43 {/if} 44 </td> 45 {else} 46 <td colspan="2"> 47 {if isset($show_all_versions) and $show_all_versions eq "n"} 48 {pagination_links cant=$ver_cant offset=$smarty.request.oldver_idx offset_arg="oldver_idx" itemname="{tr}Old Session{/tr}" show_numbers="n"}{/pagination_links} 49 {else} 50 {pagination_links cant=$ver_cant offset=$smarty.request.oldver_idx offset_arg="oldver_idx" itemname="{tr}Old Version{/tr}" show_numbers="n"}{/pagination_links} 51 {/if} 52 </td> 53 <td colspan="2"> 54 {if isset($show_all_versions) and $show_all_versions eq "n"} 55 {pagination_links cant=$ver_cant offset=$smarty.request.newver_idx offset_arg="newver_idx" itemname="{tr}New Session{/tr}" show_numbers="n"}{/pagination_links} 56 {else} 57 {pagination_links cant=$ver_cant offset=$smarty.request.newver_idx offset_arg="newver_idx" itemname="{tr}New Version{/tr}" show_numbers="n"}{/pagination_links} 58 {/if} 59 </td> 60 {/if} 61 </tr> 62 {if $diff_style eq 'unidiff'} 63 <tr> 64 <td colspan="4"> 65 {if $diffdata} 66 {section name=ix loop=$diffdata} 67 {if $diffdata[ix].type == "diffheader"} 68 {assign var="oldd" value=$diffdata[ix].old} 69 {assign var="newd" value=$diffdata[ix].new} 70 <br><div class="diffheader">@@ {tr}-Lines: {$oldd} changed to +Lines: {$newd}{/tr} @@</div> 71 {elseif $diffdata[ix].type == "diffdeleted"} 72 <div class="diffdeleted"> 73 {section name=iy loop=$diffdata[ix].data} 74 {if not $smarty.section.iy.first}<br>{/if} 75 - {$diffdata[ix].data[iy]} 76 {/section} 77 </div> 78 {elseif $diffdata[ix].type == "diffadded"} 79 <div class="diffadded"> 80 {section name=iy loop=$diffdata[ix].data} 81 {if not $smarty.section.iy.first}<br>{/if} 82 + {$diffdata[ix].data[iy]} 83 {/section} 84 </div> 85 {elseif $diffdata[ix].type == "diffbody"} 86 <div class="diffbody"> 87 {section name=iy loop=$diffdata[ix].data} 88 {if not $smarty.section.iy.first}<br>{/if} 89 {$diffdata[ix].data[iy]} 90 {/section} 91 </div> 92 {/if} 93 {/section} 94 {else} 95 <div class="diffheader">{tr}Versions are identical{/tr}</div> 96 {/if} 97 </td> 98 </tr> 99 {/if} 100 101 {if $diff_style neq 'unidiff' && $diff_style neq 'sideview'} 102 {if $diffdata}{$diffdata}{else}<tr><td colspan="4">{tr}Versions are identical{/tr}</td></tr>{/if} 103 {/if} 104 </table> 105 </div> 106 {if not $hide_example_wikidiff_plugin_syntax} 107 {if $prefs.wikiplugin_wikidiff eq 'y' and $old} 108 {remarksbox type='tip' title='{tr}Example wikidiff plugin syntax{/tr}'} 109 <code>{ldelim}wikidiff object_id="{$page}" oldver="{$old.version}" newver="{$new.version}" diff_style="{$diff_style}" show_version_info="{if empty($hide_version_info)}y{else}n{/if}"{rdelim}</code> 110 {/remarksbox} 111 {/if} 112 {/if} 113{/if} 114