added: to 'sort' winix function: 'renumerate' button if 'index' param is present

WIP: #2
This commit is contained in:
Tomasz Sowa 2021-01-29 08:35:17 +01:00
parent a7629f638f
commit 9df146af3b
3 changed files with 16 additions and 2 deletions

View File

@ -26,14 +26,20 @@
[else]
<p>{sort_info_multi}</p>
<p>
[if winix_function_param_is "index"]
{sort_info_multi_index}
[else]
{sort_info_multi}
[end]
</p>
[if item_tab]
<form class="uk-form-stacked" id="winix_sortable_form" action="[doc_base_url][dir]sort" method="post">
<ul class="uk-list" id="winix_sort_items" data-uk-sortable>
[for item_tab]
<li class="uk-tile uk-tile-muted uk-padding-small uk-padding-remove-top uk-padding-remove-bottom" id="winix_sort_item_[item_tab_index]" style="cursor: move;">
<input class="uk-hidden uk-input uk-width-1-6 uk-margin-small-right" type="text" name="sort[item_tab_id]" value="[item_tab_sort]">
<input class="[if not [winix_function_param_is "index"]]uk-hidden [end]uk-input uk-width-1-6 uk-margin-small-right" type="text" name="sort[item_tab_id]" value="[item_tab_sort]">
[# is it correct? may give this 'if' only to /-/thumb param? ]
[if item_tab_has_thumb]<img src="[item_tab_link]/-/thumb" alt="[item_tab_subject]">[end]
@ -47,6 +53,12 @@
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
[if winix_function_param_is "index"]
<div class="uk-margin">
<button class="uk-button uk-button-default auk-button-primary" type="button" id="winix_sort_renumerate">renumeruj</button>
</div>
[end]
<div class="uk-margin">
<input class="uk-button uk-button-primary" type="submit" value="{change}">
</div>

View File

@ -457,6 +457,7 @@ slog_turn_over = Session's log turned over due to size greater than
sort_header = Sort
sort_current_sortindex = Current sort index
sort_info_multi = Set an order of items by using the mouse.
sort_info_multi_index = Set an order of items by providing an index number. You can also set an order of items by using the mouse and then clicking the renumerate button.
sort_item_subject = Subject:
stat_header = Stat

View File

@ -475,6 +475,7 @@ slog_turn_over = Log sesji wyczyszczony w związku z przekroczeniem wielkości
sort_header = Sortuj
sort_current_sortindex = Bieżący indeks sortowania
sort_info_multi = Ustaw kolejność elementów przeciągając je przy pomocy myszki.
sort_info_multi_index = Ustaw kolejność elementów podająć ich indeks. Możesz także ustawić kolejność elementów przeciągając je przy pomocy myszki i następnie kliknąć przycisk Renumeruj.
sort_item_subject = Tytuł:
stat_header = Stat