Skip to content

Commit

Permalink
Projektliste ist nun auch nach Namen sortierbar
Browse files Browse the repository at this point in the history
  • Loading branch information
dergel committed Jan 11, 2016
1 parent 42a758f commit 67bfe02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lang/de_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion lib/projects/projects_controller_screen.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down

0 comments on commit 67bfe02

Please sign in to comment.