{* $Id$ *} {title admpage="wiki" url='tiki-pagehistory.php?page='|cat:$page|escape}{tr}History:{/tr} {$page}{/title}
{assign var=thispage value=$page|escape:url} {button href="tiki-index.php?page=$thispage" _class="btn-info" _text="{tr}View published page{/tr}" _icon_name="view"} {if $editable} {button href="tiki-editpage.php?page=$thispage" class="btn btn-primary" _text="{tr}Edit published page{/tr}" _icon_name="edit"} {/if} {if !isset($noHistory)} {if $show_all_versions eq "y"} {button _text="{tr}Collapse Into Edit Sessions{/tr}" href="?clear_versions=1&show_all_versions=n" _auto_args="*" _class="btn-info" _icon_name="expanded"} {else} {button _text="{tr}Show All Versions{/tr}" href="?clear_versions=1&show_all_versions=y" _auto_args="*" _class="btn-info" _icon_name="collapsed"} {/if} {/if}
{if $preview}

{tr}Preview of version:{/tr} {$preview} {if $info.version eq $preview}{tr}(current){/tr}{/if}

{if $curver.version ne $preview && $object_curver eq 1} {self_link _script="tiki-pagehistory.php" page=$page preview=$curver.version|escape:'url' _title="{tr}Go to current version{/tr}"}{tr}Go to current version{/tr}{/self_link} {/if} {if $info.version ne $preview and $tiki_p_rollback eq 'y'}
{self_link _script="tiki-pagehistory.php" page=$page source=$preview _title="{tr}View source of this version{/tr}"}{tr}View source of this version{/tr}{/self_link} {self_link _script="tiki-rollback.php" page=$page version=$preview _title="{tr}Roll back{/tr}"}{tr}Roll back to this version{/tr}{/self_link}
{/if}
{if !isset($noHistory)} {if isset($show_all_versions) and $show_all_versions eq "n"} {pagination_links cant=$ver_cant offset=$smarty.request.preview_idx offset_arg="preview_idx" itemname="{tr}Session{/tr}" show_numbers="n"}{/pagination_links} {else} {pagination_links cant=$ver_cant offset=$smarty.request.preview_idx offset_arg="preview_idx" itemname="{tr}Version{/tr}" show_numbers="n"}{/pagination_links} {/if} {/if}
{if (isset($flaggedrev_approval) and $flaggedrev_approval) and $tiki_p_wiki_approve eq 'y' && !$flaggedrev_preview_rejected} {remarksbox type=comment title="{tr}Content Approval{/tr}"}
{if $flaggedrev_preview_approved}

{tr}This revision is currently marked as approved.{/tr}

{else}

{tr}This revision has not been approved.{/tr}

{/if}
{/remarksbox} {/if} {if (isset($flaggedrev_approval) and $flaggedrev_approval)} {remarksbox type=warning title="{tr}History view{/tr}"}

{if $flaggedrev_preview_approved} {tr}This revision may not be the latest approved revision{/tr}! {else} {if $flaggedrev_preview_rejected} {tr}This revision has been rejected.{/tr} {else} {tr}This revision has not been approved.{/tr} {/if} {/if}

{/remarksbox} {/if}
{$previewd}
{/if} {if $source}

{tr}Source of version:{/tr} {$source} {if $info.version eq $source}{tr}(current){/tr}{/if}

{if $info.version ne $source and $tiki_p_rollback eq 'y'}
{self_link _script="tiki-rollback.php" page=$page version=$source _title="{tr}Roll back{/tr}"}{tr}Roll back to this version{/tr}{/self_link}
{/if}
{if !isset($noHistory)} {if isset($show_all_versions) and $show_all_versions eq "n"} {pagination_links cant=$ver_cant offset=$smarty.request.source_idx offset_arg="source_idx" itemname="{tr}Session{/tr}" show_numbers="n"}{/pagination_links} {else} {pagination_links cant=$ver_cant offset=$smarty.request.source_idx offset_arg="source_idx" itemname="{tr}Version{/tr}" show_numbers="n"}{/pagination_links} {/if} {/if}
{if $prefs.feature_jquery_ui eq "y" && $prefs.feature_syntax_highlighter neq "y"}{jq}$("#page_source").resizable();{/jq}{/if} {/if} {if (isset($flaggedrev_approval) and $flaggedrev_approval) and $tiki_p_wiki_approve eq 'y' and $flaggedrev_compare_approve} {remarksbox type=comment title="{tr}Content Approval{/tr}"}

{tr}This revision has not been approved.{/tr}

{/remarksbox} {/if} {if !$preview} {if $curver.version ne $preview && $object_curver eq 1} {self_link _script="tiki-pagehistory.php" page=$page preview=$curver.version|escape:'url' _title="{tr}Go to current version{/tr}"}{tr}Go to current version{/tr}{/self_link} {/if} {/if} {include file='pagehistory.tpl'} {if !isset($noHistory)} {if $preview || $source || $diff_style}

{tr}History{/tr}

{/if}
{if $prefs.feature_multilingual eq 'y' and $tiki_p_edit eq 'y'}
{icon name='admin_i18n' class='tips' title=":{tr}Translation{/tr}"}
{if $show_translation_history} {button show_translation_history=0 _text="{tr}Hide translation history{/tr}" _auto_args="*" _class="btn btn-info"} {else} {button show_translation_history=1 _text="{tr}Show translation history{/tr}" _auto_args="*" _class="btn btn-info"} {/if}
{/if}
{if $paginate} {/if}
{if ($prefs.default_wiki_diff_style ne "old") and $history}
{if $prefs.javascript_enabled eq "y"} {/if} {if $prefs.javascript_enabled eq "y"} {button _text="{tr}Advanced{/tr}" _id="toggle_diffs" _ajax="n" _class="btn btn-secondary"} {jq} $("form#pagehistory") .each(function store_original_values(i, form){ form.originals = {}; $(form).find(':input').each(function(i, input){ var name = $(input).attr('name'); var value = $(input).val(); form.originals[name] = value; }); }) .submit(function submit_changed_values(evt){ var always = ['page', 'oldver']; var originals = this.originals || {}; $(this).find(':input:enabled').each(function(i, input){ var name = $(input).attr('name'); var value = $(input).val(); if(always.indexOf(name) === -1 && originals[name] === value) { $(input).attr('disabled', 'disabled') .prop('disabled', 'disabled'); } }); }); $("a#toggle_diffs").click(function(e){ if ($(this).text() == "{tr}Advanced{/tr}") { $(this).text("{tr}Simple{/tr}"); if (jqueryTiki.select2) { $("#diff_style_all").next(".select2-container").show(); $("#diff_style_simple").next(".select2-container").hide(); $("#diff_style_all").attr("name", "diff_style"); $("#diff_style_simple").attr("name", ""); } else { $("#diff_style_all").show().attr("name", "diff_style"); $("#diff_style_simple").hide().attr("name", ""); } } else { $(this).text("{tr}Advanced{/tr}"); if (jqueryTiki.select2) { $("#diff_style_all").next(".select2-container").hide(); $("#diff_style_simple").next(".select2-container").show(); $("#diff_style_all").attr("name", ""); $("#diff_style_simple").attr("name", "diff_style"); } else { $("#diff_style_all").hide().attr("name", ""); $("#diff_style_simple").show().attr("name", "diff_style"); } } return false; }); if (jqueryTiki.select2) { if ($("#diff_style_simple").html().indexOf("{{$diff_style}}") > -1) { $("#diff_style_all").next(".select2-container").hide().attr("name", ""); } else { $("#diff_style_simple").next(".select2-container").hide(); } } {{if $diff_style neq "htmldiff" and $diff_style neq "sidediff"}$("#toggle_diffs a").click();{/if}} {/jq} {/if}
{/if}
{* table-responsive class cuts off css drop-down menus *} {if $tiki_p_remove eq 'y'} {/if} {if $prefs.feature_contribution eq 'y'} {/if} {if $prefs.feature_contribution eq 'y' and $prefs.feature_contributor_wiki eq 'y'} {/if} {if $prefs.default_wiki_diff_style != "old" and $history} {/if} {if $history_offset eq 1} {if $tiki_p_remove eq 'y'} {/if} {if $prefs.feature_contribution eq 'y'} {/if} {if $prefs.feature_contribution eq 'y' and $prefs.feature_contributor_wiki eq 'y'} {/if} {if $prefs.default_wiki_diff_style ne "old" and $history} {/if} {/if} {foreach name=hist item=element from=$history} {if $tiki_p_remove eq 'y'} {/if} {if $prefs.feature_contribution eq 'y'} {/if} {if $prefs.feature_contribution eq 'y' and $prefs.feature_contributor_wiki eq 'y'} {/if} {if $prefs.default_wiki_diff_style ne "old"} {/if} {/foreach}
{select_all checkbox_names='checked[]'} {tr}Information{/tr} {tr}Contribution{/tr} {tr}Contributors{/tr} {tr}Version{/tr} {icon name='html' iclass='tips' ititle='{tr}HTML allowed:{/tr}{tr}HTML syntax is allowed either by page setting or use of the WYSIWIG editor{/tr}'}
  {$info.lastModif|tiki_short_datetime} {icon name="user"} {$info.user|userlink} {if $prefs.feature_wiki_history_ip ne 'n'}{tr _0=$info.ip}from %0{/tr}{/if} {if (isset($flaggedrev_approval) and $flaggedrev_approval) and $tiki_p_wiki_view_latest eq 'y' and $info.approved}({tr}approved{/tr}){/if} {if $info.comment}
{$info.comment|escape}
{/if} {if isset($translation_sources[$info.version]) and $translation_sources[$info.version]} {foreach item=source from=$translation_sources[$info.version]}
{tr}Updated from:{/tr} {self_link _script="tiki-index.php" page=$source.page|escape}{$source.page}{/self_link} at version {$source.version}
{/foreach} {/if} {if isset($translation_targets[$info.version]) and $translation_targets[$info.version]} {foreach item=target from=$translation_targets[$info.version]}
{tr}Used to update:{/tr} {self_link _script="tiki-index.php" page=$target.page|escape}{$target.page}{/self_link} to version {$target.version}
{/foreach} {/if}
{section name=ix loop=$contributions}{if !$smarty.section.ix.first},{/if}{$contributions[ix].name|escape}{/section} {section name=ix loop=$contributors}{if !$smarty.section.ix.first},{/if}{$contributors[ix].login|username}{/section} {if $current eq $info.version} {/if}{$info.version}
{tr}Current{/tr}{if $current eq $info.version}
{/if}
{if $info.is_html || $info.wysiwyg eq "y"} {icon name='html' iclass='tips' ititle=':{tr}HTML allowed{/tr}'} {/if} {actions} {strip} {self_link page=$page preview=$info.version _icon_name="view" _menu_text='y' _menu_icon='y'} {tr}View{/tr} {/self_link} {if $tiki_p_wiki_view_source eq "y" and $prefs.feature_source eq "y"} {self_link page=$page source=$info.version _icon_name="code" _menu_text='y' _menu_icon='y'} {tr}Source{/tr} {/self_link} {/if} {/strip} {/actions}
{$element.lastModif|tiki_short_datetime} {icon name="user"} {$element.user|userlink} {if $prefs.feature_wiki_history_ip ne 'n'}{tr _0=$element.ip}from %0{/tr}{/if} {if $element.comment}{$element.comment|escape}{/if} {if (isset($flaggedrev_approval) and $flaggedrev_approval) and $tiki_p_wiki_view_latest eq 'y' and $element.approved}({tr}approved{/tr}){/if} {if (isset($flaggedrev_approval) and $flaggedrev_approval) and $element.rejected}({tr}rejected:{/tr} {$element.rejection_reason}){/if} {if isset($translation_sources[$element.version]) and $translation_sources[$element.version]} {foreach item=source from=$translation_sources[$element.version]}
{tr}Updated from:{/tr} {self_link _script="tiki-index.php" page=$source.page|escape}{$source.page}{/self_link} at version {$source.version}
{/foreach} {/if} {if isset($translation_targets[$element.version]) and $translation_targets[$element.version]} {foreach item=target from=$translation_targets[$element.version]}
{tr}Used to update:{/tr} {self_link _script="tiki-index.php" page=$target.page|escape}{$target.page}{/self_link} to version {$target.version}
{/foreach} {/if}
{section name=ix loop=$element.contributions}{if !$smarty.section.ix.first} {/if}{$element.contributions[ix].name|escape}{/section} {section name=ix loop=$element.contributors}{if !$smarty.section.ix.first},{/if}{$element.contributors[ix].login|username}{/section} {if $current eq $element.version}{/if} {if $show_all_versions eq "n" and not empty($element.session)} {$element.session} - {$element.version} {else} {$element.version} {/if} {if $current eq $element.version}{/if} {if $element.is_html eq "1"} {icon name='html' iclass='tips' ititle=':{tr}HTML allowed{/tr}'} {/if} {actions} {strip} {self_link page=$page preview=$element.version _icon_name="view" _menu_text='y' _menu_icon='y'} {tr}View{/tr} {/self_link} {if $tiki_p_wiki_view_source eq "y" and $prefs.feature_source eq "y"} {self_link page=$page source=$element.version _icon_name="code" _menu_text='y' _menu_icon='y'} {tr}Source{/tr} {/self_link} {/if} {if $prefs.default_wiki_diff_style eq "old"} {self_link page=$page diff2=$element.version diff_style="sideview" _icon_name="copy" _menu_text='y' _menu_icon='y'} {tr}Compare{/tr} {/self_link} {self_link page=$page diff2=$element.version diff_style="unidiff" _icon_name="difference" _menu_text='y' _menu_icon='y'} {tr}Difference{/tr} {/self_link} {/if} {if $tiki_p_rollback eq 'y' && $lock neq true} {self_link _script="tiki-rollback.php" page=$page version=$element.version _icon_name="undo" _menu_text='y' _menu_icon='y'} {tr}Roll back{/tr} {/self_link} {/if} {/strip} {/actions} {if $show_all_versions eq 'n' and not empty($element.session)} {else} {/if} {* if $smarty.foreach.hist.last   *}
{if $paginate} {if isset($smarty.request.history_offset)} {pagination_links cant=$history_cant offset=$smarty.request.history_offset offset_arg="history_offset" step=$history_pagesize} {/pagination_links} {else} {pagination_links cant=$history_cant offset_arg="history_offset" step=$history_pagesize} {/pagination_links} {/if} {/if}
{/if}