+ /**
+ * Show all notes of a tag
+ *
+ * @NoAdminRequired
+ * @NoCSRFRequired
+ */
+ public function tag($rawtag)
+ {
+ $notes = $this->getNotes()->loadNotesOverview(null, $rawtag);
+
+ $res = new TemplateResponse('grauphel', 'tag');
+ $res->setParams(
+ array(
+ 'tag' => $this->getPrettyTagName($rawtag),
+ 'rawtag' => $rawtag,
+ 'notes' => $notes,
+ )
+ );
+ $this->addNavigation($res, $rawtag);
+
+ return $res;
+ }
+
+ /**
+ * Show access tokens
+ *
+ * @NoAdminRequired
+ * @NoCSRFRequired
+ */
+ public function tokens()
+ {
+ $tokens = new TokenStorage();
+ $res = new TemplateResponse('grauphel', 'tokens');
+ $res->setParams(
+ array(
+ 'tokens' => $tokens->loadForUser(
+ $this->user->getUid(), 'access'
+ ),
+ 'client' => new Client(),
+ 'username' => $this->user->getUid(),
+ )
+ );
+ $this->addNavigation($res, null);
+
+ return $res;
+ }
+
+ protected function addNavigation(TemplateResponse $res, $selectedRawtag = null)