[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] File Galleries: Add preference to show file modification date and time in long format

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68cdbf92e4071_2cdf0fc38643@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f6c4ccb95-xp6gg.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
e7821fee by Bruno Kambere at 2025-09-19T20:31:44+00:00
[ENH] File Galleries: Add preference to show file modification date and time in long format
---
* [ENH] File Galleries: Add preference to show modification date and time for file galleries

See merge request tikiwiki/tiki!8330

- - - - -


3 changed files:

- lib/prefs/fgal.php
- templates/admin/include_fgal.tpl
- tiki-list_file_gallery.php


Changes:

=====================================
lib/prefs/fgal.php
=====================================
@@ -434,6 +434,13 @@ When the limit is reached, no more files can be uploaded. The user will see an e
             'type' => 'flag',
             'default' => 'y',
         ],
+        'fgal_show_modtimedate' => [
+            'name' => tra('Show modification date and time'),
+            'shorthint' => tra('Displays both date and time for file modifications'),
+            'description' => tra('If checked, the modification date will be shown as date and time instead of just the date.'),
+            'type' => 'flag',
+            'default' => 'y',
+        ],
         'fgal_show_path' => [
             'name' => tra('Show path'),
             'type' => 'flag',


=====================================
templates/admin/include_fgal.tpl
=====================================
@@ -77,6 +77,7 @@
                     {preference name='fgal_delete_after_email'}
                 </div>
                 {preference name='fgal_keep_fileId'}
+                {preference name='fgal_show_modtimedate'}
                 {preference name='feature_use_fgal_for_user_files'}
                 {preference name='feature_use_fgal_for_wiki_attachments'}
                 {preference name='feature_file_galleries_save_draft'}


=====================================
tiki-list_file_gallery.php
=====================================
@@ -235,6 +235,10 @@ if (
     Feedback::errorPage(['mes' => tr('You do not have permission to view this gallery'), 'errortype' => 401]);
 }
 
+if ($prefs['fgal_show_modtimedate']) {
+    $gal_info['show_modtimedate'] = $prefs['fgal_show_modtimedate'];
+}
+
 // Init smarty variables to blank values
 $smarty->assign('fname', '');
 $smarty->assign('fdescription', '');
@@ -472,7 +476,6 @@ if (isset($_REQUEST['fgal_actions'])) {
     }
 }
 
-
 if (isset($_REQUEST['permsel']) && isset($_REQUEST['subgal']) && $access->checkCsrf()) {
     $access->check_permission('assign_perm_file_gallery');
     $fails = [];



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e7821fee12d5bae82e1ff508a6699f443b9d172a

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/e7821fee12d5bae82e1ff508a6699f443b9d172a
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.