aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-03-06 23:28:51 +0000
committerplegall <plg@piwigo.org>2006-03-06 23:28:51 +0000
commit53d78c95b04b8c1be7a8d6534a358622160060b8 (patch)
tree9c00c6c2a479bc450a8d35aa0cca12752a889bde
parent8615119a8088ba77819601f50393ad05b6ce0208 (diff)
request 302: order categories alphanumerically
alphanumerically sort of language keys in admin.lang.php git-svn-id: http://piwigo.org/svn/trunk@1066 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/cat_list.php30
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php41
-rw-r--r--language/fr_FR.iso-8859-1/admin.lang.php41
-rw-r--r--template/yoga/admin/cat_list.tpl7
4 files changed, 79 insertions, 40 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index 0c350ea00..bd15c8de7 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -97,11 +97,41 @@ else if (isset($_POST['submitAdd']))
array_push($page['infos'], $output_create['info']);
}
}
+// save manual category ordering
else if (isset($_POST['submitOrder']))
{
asort($_POST['catOrd'], SORT_NUMERIC);
save_categories_order(array_keys($_POST['catOrd']));
+
+ array_push(
+ $page['infos'],
+ l10n('Categories manual order was saved')
+ );
}
+// sort categories alpha-numerically
+else if (isset($_POST['submitOrderAlphaNum']))
+{
+ $query = '
+SELECT id, name
+ FROM '.CATEGORIES_TABLE.'
+ WHERE id_uppercat '.
+ (!isset($_GET['parent_id']) ? 'IS NULL' : '= '.$_GET['parent_id']).'
+;';
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_assoc($result))
+ {
+ $categories[ $row['id'] ] = $row['name'];
+ }
+
+ asort($categories, SORT_REGULAR);
+ save_categories_order(array_keys($categories));
+
+ array_push(
+ $page['infos'],
+ l10n('Categories ordered alphanumerically')
+ );
+}
+
// +-----------------------------------------------------------------------+
// | Cache management |
// +-----------------------------------------------------------------------+
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index e0238b1dc..3411c5884 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -51,6 +51,8 @@ $lang['Batch management'] = 'Batch management';
$lang['Caddie management'] = 'Caddie management';
$lang['Caddie'] = 'Caddie';
$lang['Categories authorized thanks to group associations'] = 'Categories authorized thanks to group associations';
+$lang['Categories manual order was saved'] = 'Categories manual order was saved';
+$lang['Categories ordered alphanumerically'] = 'Categories ordered alphanumerically';
$lang['Check for upgrade failed for unknown reasons.'] = 'Check for upgrade failed for unknown reasons.';
$lang['Check for upgrade'] = 'Check for upgrade';
$lang['Comments for all'] = 'Comments for all';
@@ -106,6 +108,7 @@ $lang['Number of thumbnails to create'] = 'Number of thumbnails to create';
$lang['Only private categories are listed'] = 'Only private categories are listed';
$lang['Operating system'] = 'Operating system';
$lang['Options'] = 'Options';
+$lang['Order alphanumerically'] = 'Order alphanumerically';
$lang['Order by'] = 'Order by';
$lang['Other private categories'] = 'Other private categories';
$lang['Parent category'] = 'Parent category';
@@ -121,8 +124,8 @@ $lang['Preferences'] = 'Preferences';
$lang['Properties'] = 'Properties';
$lang['Random picture'] = 'Random picture';
$lang['Rate date'] = 'Rate date';
-$lang['Rating'] = 'Rating';
$lang['Rating by guests'] = 'Rating by guests';
+$lang['Rating'] = 'Rating';
$lang['Recent period'] = 'Recent period';
$lang['Registration date'] = 'Registration date';
$lang['Reject All'] = 'Reject All';
@@ -135,9 +138,9 @@ $lang['Save order'] = 'Save order';
$lang['Select at least one category'] = 'Select at least one category';
$lang['Select at least one picture'] = 'Select at least one picture';
$lang['Select at least one user'] = 'Select at least one user';
-$lang['Site manager'] = 'Site manager';
$lang['Show info'] = 'Show info';
$lang['Show number of comments'] = 'Show number of comments';
+$lang['Site manager'] = 'Site manager';
$lang['Status'] = 'Status';
$lang['Storage category'] = 'Storage category';
$lang['Submit'] = 'Submit';
@@ -229,6 +232,21 @@ $lang['metadata_basic'] = 'basic';
$lang['metadata_exif'] = 'EXIF';
$lang['metadata_iptc'] = 'IPTC';
$lang['name'] = 'name';
+$lang['nbm_%d mails were not sended.'] = '%d mails were not sended.';
+$lang['nbm_%d mails were sended.'] = '%d mails were sended.';
+$lang['nbm_Error when sending email to %s [%s].'] = 'Error when sending email to %s [%s].';
+$lang['nbm_Go to %s %s.'] = 'Go to %s %s.';
+$lang['nbm_Hello %s'] = 'Hello %s';
+$lang['nbm_Mail sended to %s [%s].'] = 'Mail sended to %s [%s].';
+$lang['nbm_New elements added'] = 'New elements added';
+$lang['nbm_New elements were added between %s and %s:'] = 'New elements were added between %s and %s:';
+$lang['nbm_New elements were added on %s:'] = 'New elements were added on %s:';
+$lang['nbm_No mail to send.'] = 'No mail to send.';
+$lang['nbm_No user to send notifications by mail.'] = 'No user to send notifications by mail.';
+$lang['nbm_Send mail to users'] = 'Send mail to users';
+$lang['nbm_To unsubscribe send a message to %s.'] = 'To unsubscribe send a message to %s.';
+$lang['nbm_User %s [%s] added.'] = 'User %s [%s] added.';
+$lang['nbm_item_notification'] = 'Notification';
$lang['no_write_access'] = 'no write access';
$lang['order_by'] = 'order by';
$lang['path'] = 'path';
@@ -335,8 +353,6 @@ $lang['update'] = 'Synchronize';
$lang['update_cats_subset'] = 'reduce to single existing categories';
$lang['update_default_title'] = 'Choose an option';
$lang['update_display_info'] = 'display maximum informations (added categories and elements, deleted categories and elements)';
-$lang['update_missing_file_or_dir'] = 'File/directory read error';
-$lang['update_missing_file_or_dir_info'] = 'The file or directory cannot be accessed (either it does not exist or the access is denied)';
$lang['update_err_pwg_version_differs'] = 'PhpWebGallery version differs on the remote site';
$lang['update_err_pwg_version_differs_info'] = 'Version of create_listing_file.php on the remote site and PhpWebGallery must be the same';
$lang['update_err_remote_listing_not_found'] = 'listing.xml file was not found';
@@ -344,6 +360,8 @@ $lang['update_err_remote_listing_not_found_info'] = 'listing.xml file was not fo
$lang['update_error_list_title'] = 'Error list';
$lang['update_errors_caption'] = 'Errors caption';
$lang['update_infos_title'] = 'Detailed informations';
+$lang['update_missing_file_or_dir'] = 'File/directory read error';
+$lang['update_missing_file_or_dir_info'] = 'The file or directory cannot be accessed (either it does not exist or the access is denied)';
$lang['update_missing_tn_info'] = 'a picture filetype requires a thumbnail. The thumbnail must be present in the sub-directory "thumbnail" of the category directory. The thumbnail filename must start with the configured thumbnail prefix and the extension must be among the following list :';
$lang['update_missing_tn_short'] = 'missing thumbnail';
$lang['update_nb_del_categories'] = 'categories deleted in the database';
@@ -381,19 +399,4 @@ $lang['users'] = 'Users';
$lang['visitors'] = 'Visitors';
$lang['w_day'] = 'Day';
$lang['waiting'] = 'Waiting';
-$lang['nbm_item_notification'] = 'Notification';
-$lang['nbm_User %s [%s] added.'] = 'User %s [%s] added.';
-$lang['nbm_New elements added'] = 'New elements added';
-$lang['nbm_Hello %s'] = 'Hello %s';
-$lang['nbm_New elements were added between %s and %s:'] = 'New elements were added between %s and %s:';
-$lang['nbm_New elements were added on %s:'] = 'New elements were added on %s:';
-$lang['nbm_Go to %s %s.'] = 'Go to %s %s.';
-$lang['nbm_To unsubscribe send a message to %s.'] = 'To unsubscribe send a message to %s.';
-$lang['nbm_Mail sended to %s [%s].'] = 'Mail sended to %s [%s].';
-$lang['nbm_Error when sending email to %s [%s].'] = 'Error when sending email to %s [%s].';
-$lang['nbm_%d mails were not sended.'] = '%d mails were not sended.';
-$lang['nbm_No mail to send.'] = 'No mail to send.';
-$lang['nbm_%d mails were sended.'] = '%d mails were sended.';
-$lang['nbm_No user to send notifications by mail.'] = 'No user to send notifications by mail.';
-$lang['nbm_Send mail to users'] = 'Send mail to users';
?> \ No newline at end of file
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php
index 49af95281..a4474fdba 100644
--- a/language/fr_FR.iso-8859-1/admin.lang.php
+++ b/language/fr_FR.iso-8859-1/admin.lang.php
@@ -51,6 +51,8 @@ $lang['Batch management'] = 'Gestion par lot';
$lang['Caddie management'] = 'Gestion du panier';
$lang['Caddie'] = 'Panier';
$lang['Categories authorized thanks to group associations'] = 'Catégories accessibles grâce à l\'appartenance aux groupes';
+$lang['Categories manual order was saved'] = 'L\'ordre manuel des catégories a été sauvegardé';
+$lang['Categories ordered alphanumerically'] = 'Catégories ordonnées alphabético-numériquement';
$lang['Check for upgrade failed for unknown reasons.'] = 'La vérification de la dernière version sur le serveur a échouée pour une raison inconnue.';
$lang['Check for upgrade'] = 'Dernière version ?';
$lang['Comments for all'] = 'Commentaires utilisateur pour tous';
@@ -106,6 +108,7 @@ $lang['Number of thumbnails to create'] = 'Nombre de miniatures à créer';
$lang['Only private categories are listed'] = 'Seules les catégories privées sont listées';
$lang['Operating system'] = 'System d\'exploitation';
$lang['Options'] = 'Options';
+$lang['Order alphanumerically'] = 'Ordonner alphabético-numériquement';
$lang['Order by'] = 'Trier selon';
$lang['Other private categories'] = 'Autres catégories privées';
$lang['Parent category'] = 'Catégorie parente';
@@ -121,8 +124,8 @@ $lang['Preferences'] = 'Préférences';
$lang['Properties'] = 'Propriétés';
$lang['Random picture'] = 'Au hasard';
$lang['Rate date'] = 'Date de notation';
-$lang['Rating'] = 'Notation';
$lang['Rating by guests'] = 'Notation par les visiteurs';
+$lang['Rating'] = 'Notation';
$lang['Recent period'] = 'Période récente';
$lang['Registration date'] = 'Date d\'enregistrement';
$lang['Reject All'] = 'Tout rejeter';
@@ -135,9 +138,9 @@ $lang['Save order'] = 'Sauvegarder l\'ordre';
$lang['Select at least one category'] = 'Sélectionner au moins une catégorie';
$lang['Select at least one picture'] = 'Sélectionner au moins une image';
$lang['Select at least one user'] = 'Séléctionner au moins un utilisateur';
-$lang['Site manager'] = 'Gestionnaire des sites';
$lang['Show info'] = 'Montrer les informations';
$lang['Show number of comments'] = 'Montrer le nombre de commentaires';
+$lang['Site manager'] = 'Gestionnaire des sites';
$lang['Status'] = 'Statut';
$lang['Storage category'] = 'Catégorie de stockage';
$lang['Submit'] = 'Valider';
@@ -229,6 +232,21 @@ $lang['metadata_basic'] = 'basique';
$lang['metadata_exif'] = 'EXIF';
$lang['metadata_iptc'] = 'IPTC';
$lang['name'] = 'nom';
+$lang['nbm_%d mails were not sended.'] = '%s mails n\'ont pas été envoyés.';
+$lang['nbm_%d mails were sended.'] = '%s mails ont été envoyés.';
+$lang['nbm_Error when sending email to %s [%s].'] = 'Erreur lors de l\'envoi du mail à %s [%s].';
+$lang['nbm_Go to %s %s.'] = 'Allez sur %s %s.';
+$lang['nbm_Hello %s'] = 'Bonjour %s';
+$lang['nbm_Mail sended to %s [%s].'] = 'Mail envoyé à %s [%s].';
+$lang['nbm_New elements added'] = 'Nouveaux éléments ajoutés';
+$lang['nbm_New elements were added between %s and %s:'] = 'Des nouveaux éléments ont été ajoutés entre le %s et le %s:';
+$lang['nbm_New elements were added on %s:'] = 'Des nouveaux éléments ont été ajoutés le %s:';
+$lang['nbm_No mail to send.'] = 'Pas de mail à envoyer.';
+$lang['nbm_No user to send notifications by mail.'] = 'Pas d\'utilisateur pour envoyer des notifications par mails.';
+$lang['nbm_Send mail to users'] = 'Envoi de mail aux utilisateurs';
+$lang['nbm_To unsubscribe send a message to %s.'] = 'Pour vous désinscrire, envoyer un mail à %s.';
+$lang['nbm_User %s [%s] added.'] = 'Utilisateur %s [%s] ajouté.';
+$lang['nbm_item_notification'] = 'Notification';
$lang['no_write_access'] = 'pas d\'accès en écriture';
$lang['order_by'] = 'trier selon';
$lang['path'] = 'chemin';
@@ -335,8 +353,6 @@ $lang['update'] = 'Synchroniser';
$lang['update_cats_subset'] = 'traiter uniquement une catégorie';
$lang['update_default_title'] = 'Choisir une option';
$lang['update_display_info'] = 'afficher un maximum d\'informations (catégories ajoutées, éléments ajoutés, catégories et éléments supprimés)';
-$lang['update_missing_file_or_dir'] = 'Erreur d\'ouverture fichier/répertoire';
-$lang['update_missing_file_or_dir_info'] = 'Le fichier ou répertoire ne peut pas être accede (soit il n\'existe pas, soit l\'accés est refusé)';
$lang['update_err_pwg_version_differs'] = 'La version PhpWebGallery sur le site distant est differente';
$lang['update_err_pwg_version_differs_info'] = 'La version de create_listing_file.php sur le site distant et PhpWebGallery doit être la même';
$lang['update_err_remote_listing_not_found'] = 'le fichier listing.xml est introuvable';
@@ -344,6 +360,8 @@ $lang['update_err_remote_listing_not_found_info'] = 'le fichier listing.xml est
$lang['update_error_list_title'] = 'Liste des erreurs';
$lang['update_errors_caption'] = 'Légende des erreurs';
$lang['update_infos_title'] = 'Informations détaillées';
+$lang['update_missing_file_or_dir'] = 'Erreur d\'ouverture fichier/répertoire';
+$lang['update_missing_file_or_dir_info'] = 'Le fichier ou répertoire ne peut pas être accede (soit il n\'existe pas, soit l\'accés est refusé)';
$lang['update_missing_tn_info'] = 'Chaque fichier image requiert une miniature. La miniature doit être présente dans le sous-répertoire "thumbnail" du répertoire de la catégorie. Le nom du fichier de la miniature doit commencer avec le paramètre de configuration "prefix_thumbnail" et l\'extension du nom du fichier doit être parmi la liste suivante :';
$lang['update_missing_tn_short'] = 'miniature manquante';
$lang['update_nb_del_categories'] = 'catégories supprimées de la base de données';
@@ -381,19 +399,4 @@ $lang['users'] = 'Utilisateurs';
$lang['visitors'] = 'Visiteurs';
$lang['w_day'] = 'Jour';
$lang['waiting'] = 'En attente';
-$lang['nbm_item_notification'] = 'Notification';
-$lang['nbm_User %s [%s] added.'] = 'Utilisateur %s [%s] ajouté.';
-$lang['nbm_New elements added'] = 'Nouveaux éléments ajoutés';
-$lang['nbm_Hello %s'] = 'Bonjour %s';
-$lang['nbm_New elements were added between %s and %s:'] = 'Des nouveaux éléments ont été ajoutés entre le %s et le %s:';
-$lang['nbm_New elements were added on %s:'] = 'Des nouveaux éléments ont été ajoutés le %s:';
-$lang['nbm_Go to %s %s.'] = 'Allez sur %s %s.';
-$lang['nbm_To unsubscribe send a message to %s.'] = 'Pour vous désinscrire, envoyer un mail à %s.';
-$lang['nbm_Mail sended to %s [%s].'] = 'Mail envoyé à %s [%s].';
-$lang['nbm_Error when sending email to %s [%s].'] = 'Erreur lors de l\'envoi du mail à %s [%s].';
-$lang['nbm_%d mails were not sended.'] = '%s mails n\'ont pas été envoyés.';
-$lang['nbm_No mail to send.'] = 'Pas de mail à envoyer.';
-$lang['nbm_%d mails were sended.'] = '%s mails ont été envoyés.';
-$lang['nbm_No user to send notifications by mail.'] = 'Pas d\'utilisateur pour envoyer des notifications par mails.';
-$lang['nbm_Send mail to users'] = 'Envoi de mail aux utilisateurs';
?> \ No newline at end of file
diff --git a/template/yoga/admin/cat_list.tpl b/template/yoga/admin/cat_list.tpl
index b19577dc2..1124b1157 100644
--- a/template/yoga/admin/cat_list.tpl
+++ b/template/yoga/admin/cat_list.tpl
@@ -3,7 +3,7 @@
<h3>{CATEGORIES_NAV}</h3>
-<form id="categoryOrdering" action="" method="post">
+<form id="categoryOrdering" action="{F_ACTION}" method="post">
<ul class="categoryUl">
@@ -38,7 +38,10 @@
<!-- END category -->
</ul>
- <p><input name="submitOrder" type="submit" value="{lang:Save order}" /></p>
+ <p>
+ <input name="submitOrder" type="submit" value="{lang:Save order}" />
+ <input name="submitOrderAlphaNum" type="submit" value="{lang:Order alphanumerically}" />
+ </p>
</form>