[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Prevent module order from going below 0 or beyond the column length
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <691cb4f1bca72_2a48f1db849657@gitlab-sidekiq-low-urgency-cpu-bound-v2-cf788b4bc-bmzs4.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
bfee461b by David Maene at 2025-11-18T17:54:39+00:00
[ENH] Prevent module order from going below 0 or beyond the column length
---
* [ENH] Hide up/down buttons when modules are already at the top or bottom
* [REF] Usermodules: Ensure all operations succeed or fail as a unit
* Prevent module order from going below 0 or beyond the column length
See merge request tikiwiki/tiki!8084
- - - - -
1 changed file:
- templates/tiki-user_assigned_modules.tpl
Changes:
=====================================
templates/tiki-user_assigned_modules.tpl
=====================================
@@ -52,6 +52,7 @@
<form action="tiki-user_assigned_modules.php" method="post">
{ticket}
<input type="hidden" name="redirect" value="1">
+ {if $smarty.section.ix.index > 0}
<button
type="submit"
name="up"
@@ -62,6 +63,8 @@
>
{icon name="up"}
</button>
+ {/if}
+ {if $smarty.section.ix.index < $smarty.section.ix.total - 1}
<button
type="submit"
name="down"
@@ -72,6 +75,7 @@
>
{icon name="down"}
</button>
+ {/if}
{if $prefs.feature_right_column ne 'n'}
<button
type="submit"
@@ -125,6 +129,7 @@
<form action="tiki-user_assigned_modules.php" method="post">
{ticket}
<input type="hidden" name="redirect" value="1">
+ {if $smarty.section.ix.index > 0}
<button
type="submit"
name="up"
@@ -135,6 +140,8 @@
>
{icon name="up"}
</button>
+ {/if}
+ {if $smarty.section.ix.index < $smarty.section.ix.total - 1}
<button
type="submit"
name="down"
@@ -145,6 +152,7 @@
>
{icon name="down"}
</button>
+ {/if}
{if $prefs.feature_left_column ne 'n'}
<button
type="submit"
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bfee461ba951d12192f5ba0786e7b7b03efc3810
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bfee461ba951d12192f5ba0786e7b7b03efc3810
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