[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [FIX][UX] Split page history form into separate forms to isolate pagination from version comparison
"Baraka Kinywa \(@bkinywa24\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68a5b289a13f6_2cd6d946490@gitlab-sidekiq-low-urgency-cpu-bound-v2-78d9d68c78-bpfxs.mail> |
Baraka Kinywa pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
f142407f by Landry Bitege at 2025-08-20T14:25:49+03:00
[FIX][UX] Split page history form into separate forms to isolate pagination from version comparison
---
* [FIX][UX] Split page history form into separate forms to isolate pagination from version comparison
---
* [FIX] Split page history form into separate forms to isolate pagination from version comparison
See merge request tikiwiki/tiki!8118
See merge request tikiwiki/tiki!8342
- - - - -
1 changed file:
- templates/tiki-pagehistory.tpl
Changes:
=====================================
templates/tiki-pagehistory.tpl
=====================================
@@ -123,99 +123,102 @@
{tr}History{/tr}
</h2>
{/if}
- <form id="pagehistory" action="tiki-pagehistory.php?page={$page}">
+ <form id="pagehistory" action="tiki-pagehistory.php?page={$page}" class="multi mb-4 d-flex align-items-end justify-content-between flex-wrap gap-2">
<input type="hidden" name="page" value="{$page|escape}">
<input type="hidden" name="history_offset" value="{$history_offset}">
- <div class="multi mb-4 d-flex align-items-end justify-content-between flex-wrap gap-2">
- {if $prefs.feature_multilingual eq 'y' and $tiki_p_edit eq 'y'}
- <div class="translation w-50">
- <label for="tra_lang" class="form-label">{tr}Translation{/tr}</label>
- <select name="tra_lang" class="form-select">
- {section name=ix loop=$languages}
- <option value="{$languages[ix].value|escape}"{if $lang eq $languages[ix].value} selected="selected"{/if}>{$languages[ix].name}</option>
- {/section}
- </select>
- </div>
-
- <div class="d-flex flex-grow-0 gap-2">
- <input type="submit" class="btn btn-primary" name="update_translation" value="{tr}Update Translation{/tr}"/>
- {if $show_translation_history}
- <input type="hidden" name="show_translation_history" value="1">
- {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}
- </div>
-
- {/if}
- </div>
+ {if $prefs.feature_multilingual eq 'y' and $tiki_p_edit eq 'y'}
+ <div class="translation w-50">
+ <label for="tra_lang" class="form-label">{tr}Translation{/tr}</label>
+ <select name="tra_lang" class="form-select">
+ {section name=ix loop=$languages}
+ <option value="{$languages[ix].value|escape}"{if $lang eq $languages[ix].value} selected="selected"{/if}>{$languages[ix].name}</option>
+ {/section}
+ </select>
+ </div>
- <div class="row mb-4">
- <div class="col-sm-6">
- <input type="checkbox" name="paginate" id="paginate"{if $paginate} checked="checked"{/if}>
- <label for="paginate">{tr}Enable pagination{/tr}</label>
- {if $paginate}
- <input type="text" name="history_pagesize" role="search" id="history_pagesize" value="{$history_pagesize}" class="form-control form-control-sm" style="width: 5em; display: inline-block">
- <label for="history_pagesize">{tr}rows per page{/tr}</label>
+ <div class="d-flex flex-grow-0 gap-2">
+ <input type="submit" class="btn btn-primary" name="update_translation" value="{tr}Update Translation{/tr}"/>
+ {if $show_translation_history}
+ <input type="hidden" name="show_translation_history" value="1">
+ {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}
</div>
- <div class="col-sm-6">
- {if ($prefs.default_wiki_diff_style ne "old") and $history}
- <div class="input-group">
- <select class="form-select" name="diff_style">
- <optgroup label="{tr}Simple{/tr}">
- {foreach $diff_styles.options as $value => $label}
- {if $value == 'htmldiff' || $value == 'sidediff'}
+ {/if}
+ </form>
+
+ <div class="row mb-4">
+ <form id="pagehistory" action="tiki-pagehistory.php?page={$page}" class="col-sm-6">
+ <input type="hidden" name="page" value="{$page|escape}">
+ <input type="hidden" name="history_offset" value="{$history_offset}">
+
+ <input type="checkbox" name="paginate" id="paginate"{if $paginate} checked="checked"{/if}>
+ <label for="paginate">{tr}Enable pagination{/tr}</label>
+ {if $paginate}
+ <input type="text" name="history_pagesize" role="search" id="history_pagesize" value="{$history_pagesize}" class="form-control form-control-sm" style="width: 5em; display: inline-block">
+ <label for="history_pagesize">{tr}rows per page{/tr}</label>
+ {/if}
+ </form>
+ <form id="pagehistory" action="tiki-pagehistory.php?page={$page}" class="col-sm-6">
+ <input type="hidden" name="page" value="{$page|escape}">
+ <input type="hidden" name="history_offset" value="{$history_offset}">
+
+ {if ($prefs.default_wiki_diff_style ne "old") and $history}
+ <div class="input-group">
+ <select class="form-select" name="diff_style">
+ <optgroup label="{tr}Simple{/tr}">
+ {foreach $diff_styles.options as $value => $label}
+ {if $value == 'htmldiff' || $value == 'sidediff'}
+ <option value="{$value}" {if $diff_style == $value} selected="selected"{/if}>
+ {tr}{$label}{/tr}
+ </option>
+ {/if}
+ {/foreach}
+ </optgroup>
+ <optgroup label="{tr}Advanced{/tr}">
+ {foreach $diff_styles.options as $value => $label}
+ {if $value == 'htmldiff' || $value == 'sidediff'}
+ {continue}
+ {/if}
<option value="{$value}" {if $diff_style == $value} selected="selected"{/if}>
{tr}{$label}{/tr}
</option>
- {/if}
- {/foreach}
- </optgroup>
- <optgroup label="{tr}Advanced{/tr}">
- {foreach $diff_styles.options as $value => $label}
- {if $value == 'htmldiff' || $value == 'sidediff'}
- {continue}
- {/if}
- <option value="{$value}" {if $diff_style == $value} selected="selected"{/if}>
- {tr}{$label}{/tr}
- </option>
- {/foreach}
- </optgroup>
- </select>
- {jq}
- $("form#pagehistory")
- .each(function store_original_values(i, form){
- form.originals = {};
+ {/foreach}
+ </optgroup>
+ </select>
+ {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;
- });
- })
- .on("submit", function submit_changed_values(evt){
- var always = ['page', 'oldver'];
- var originals = this.originals || {};
+ $(form).find(':input').each(function(i, input){
+ var name = $(input).attr('name');
+ var value = $(input).val();
+ form.originals[name] = value;
+ });
+ })
+ .on("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();
+ $(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');
- }
+ if(always.indexOf(name) === -1 && originals[name] === value) {
+ $(input).attr('disabled', 'disabled')
+ .prop('disabled', 'disabled');
+ }
+ });
});
- });
- {/jq}
- </div>
- <input type="hidden" name="show_all_versions" value="{$show_all_versions}">
- {/if}
- </div>
+ {/jq}
+ </div>
+ <input type="hidden" name="show_all_versions" value="{$show_all_versions}">
+ {/if}
</div>
- <div>
+ <div>
<div class="{if $js}table-responsive{/if}"> {* table-responsive class cuts off css drop-down menus *}
<table class="table table-condensed table-hover table-striped">
<tr>
@@ -496,6 +499,6 @@
{/pagination_links}
{/if}
{/if}
+ </form>
</div>
- </form>
{/if}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/f142407fac458ea14af8837ac818fcd0b88ace35
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/f142407fac458ea14af8837ac818fcd0b88ace35
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs