From 67bfe0293b4098ec5c14c289c4b095c86cb35d31 Mon Sep 17 00:00:00 2001 From: Jan Kristinus Date: Mon, 11 Jan 2016 16:47:13 +0100 Subject: [PATCH] Projektliste ist nun auch nach Namen sortierbar --- lang/de_de.lang | 3 ++- lib/projects/projects_controller_screen.php | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lang/de_de.lang b/lang/de_de.lang index 3c17dee..a023af6 100644 --- a/lang/de_de.lang +++ b/lang/de_de.lang @@ -355,9 +355,10 @@ select = auswählen projects_archive = Projektarchiv - projects_orderby_createddesc = Erstellungsdatum, absteigend projects_orderby_createdasc = Erstellungsdatum, aufsteigend +projects_orderby_namedesc = Projektname, absteigend +projects_orderby_nameasc = Projektname, aufsteigend get_from_clipboard = + Aus dem Clipboard auswählen clips_exist = Es wurden {0} Clips gefunden diff --git a/lib/projects/projects_controller_screen.php b/lib/projects/projects_controller_screen.php index 1d61ed2..7a50f74 100644 --- a/lib/projects/projects_controller_screen.php +++ b/lib/projects/projects_controller_screen.php @@ -496,7 +496,17 @@ public static function getProjectsListOrders($orders = [], $p, $ignore_fields = pz::url($p['mediaview'], $p['controll'], $p['function'], array_merge($p['linkvars'], ['mode' => 'list', 'search_orderby' => 'createdasc'])) . "')", ]; - $current_order = 'createddesc'; + $orders['nameasc'] = ['orderby' => 'name', 'sort' => 'asc', 'name' => pz_i18n::msg('projects_orderby_nameasc'), + 'link' => "javascript:pz_loadPage('" . $p['layer_list'] . "','" . + pz::url($p['mediaview'], $p['controll'], $p['function'], array_merge($p['linkvars'], ['mode' => 'list', 'search_orderby' => 'nameasc'])) . + "')", ]; + + $orders['namedesc'] = ['orderby' => 'name', 'sort' => 'desc', 'name' => pz_i18n::msg('projects_orderby_namedesc'), + 'link' => "javascript:pz_loadPage('" . $p['layer_list'] . "','" . + pz::url($p['mediaview'], $p['controll'], $p['function'], array_merge($p['linkvars'], ['mode' => 'list', 'search_orderby' => 'namedesc'])) . + "')", ]; + + $current_order = 'nameasc'; if (array_key_exists(rex_request('search_orderby'), $orders)) { $current_order = rex_request('search_orderby'); }