diff options
| author | winter | 2025-01-19 23:12:10 +0000 |
|---|---|---|
| committer | winter | 2025-01-19 23:12:10 +0000 |
| commit | f5ad15cc68804351389192f149b0f48866f1d9eb (patch) | |
| tree | 9af66b2416b8f860ea489699a14228aa568a1eb4 /templates/left_side_navigation.php | |
| parent | 8c6dad8c48d5d730b102d9de0079fee9752b0d35 (diff) | |
make left and right panes accessible on small screens
Diffstat (limited to 'templates/left_side_navigation.php')
| -rw-r--r-- | templates/left_side_navigation.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/templates/left_side_navigation.php b/templates/left_side_navigation.php new file mode 100644 index 0000000..983aa07 --- /dev/null +++ b/templates/left_side_navigation.php @@ -0,0 +1,26 @@ +<?php +use Digitigrade\Model\FollowRelation; +use Digitigrade\Model\UserAccount; + +$links = []; +$user = UserAccount::findByCurrentSession(); + +if ($user != null) { + $links = [[ + 'href' => '/followrequests', + 'icon' => 'person_add', + 'label' => __('navigation.followRequests'), + 'unreadCount' => FollowRelation::countWhere("object = ? AND status = 'pending'", [$user->actor->id]) + ]]; + if ($user->isAdmin) { + $links[] = ['href' => '/admin/settings/instance', 'icon' => 'settings', 'label' => __('navigation.instanceSettings')]; + } + $links[] = [ + 'href' => '/logout', + 'icon' => 'logout', + 'label' => __('navigation.logout'), + 'confirmation' => __('navigation.logout.confirmation') + ]; + + call_template('side_navigation', ['links' => $links]); +} |
