Skip to content

Commit

Permalink
[notes] add nav and sidenav links to notes pages
Browse files Browse the repository at this point in the history
  • Loading branch information
discomrade authored and shish committed Sep 7, 2024
1 parent e15f9cd commit 9354725
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ext/notes/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ public function onDatabaseUpgrade(DatabaseUpgradeEvent $event): void
}
}

public function onPageNavBuilding(PageNavBuildingEvent $event): void
{
$event->add_nav_link("note", new Link('note/requests'), "Notes");
}

public function onPageSubNavBuilding(PageSubNavBuildingEvent $event): void
{
if ($event->parent == "note") {
$event->add_nav_link("note_requests", new Link('note/requests'), "Requests");
$event->add_nav_link("note_list", new Link('note/list'), "List");
$event->add_nav_link("note_updated", new Link('note/updated'), "Updates");
$event->add_nav_link("note_help", new Link('ext_doc/notes'), "Help");
}
}

public function onPageRequest(PageRequestEvent $event): void
{
global $page, $user;
Expand Down

0 comments on commit 9354725

Please sign in to comment.