From 54c544113b275c792044ff9482f7bd297164e1b2 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Mon, 17 Apr 2017 12:45:29 -0400 Subject: [PATCH] Tweak the main menu a bit --- app/views/main-menu.php | 58 +++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 249c1eb9..173c76a7 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -1,37 +1,55 @@ - +get('whose_list') . "'s "; +$lastSegment = $urlGenerator->lastSegment(); +$extraSegment = $lastSegment === 'list' ? '/list' : ''; + +?>

- - get('whose_list') ?>'s List - + get("show_{$url_type}_collection")): ?> - [ Collection] + [a( + $url->generate('collection.view'), + ucfirst($url_type) . ' Collection' + ) ?>] - [ List] + [a( + $urlGenerator->defaultUrl($other_type) . $extraSegment, + ucfirst($other_type) . ' List' + ) ?>] - - get('whose_list') ?>'s Collection - - [Anime List] - [Manga List] + + [a($urlGenerator->defaultUrl('anime'), 'Anime List') ?>] + [a($urlGenerator->defaultUrl('manga'), 'Manga List') ?>] - - [a($url->generate('user_info'), 'About '. $config->get('whose_list')) ?>] - + + [a( + $url->generate('user_info'), + 'About '. $config->get('whose_list') + ) ?>] + isAuthenticated()): ?>   - - + +   + isAuthenticated()): ?> - Logout + a( + $url->generate('logout'), + 'Logout', + ['class' => 'bracketed'] + ) ?> - [get('whose_list') ?>'s Login] + [a($url->generate('login'), "{$whose} Login") ?>]

@@ -40,8 +58,8 @@ menu($menu_name) ?>