'note-content' => $converter->convert(
$note->{'note-content'}
),
+ 'links' => array(
+ 'json' => $this->urlGen->linkToRoute(
+ 'grauphel.api.note', array(
+ 'guid' => $guid, 'username' => $this->user->getUid()
+ )
+ ),
+ 'xml' => $this->urlGen->linkToRoute(
+ 'grauphel.notes.xml', array('guid' => $guid)
+ ),
+ )
)
);
- $this->addNavigation($res);
+ $selectedRawtag = null;
+ if (count($note->tags) > 0) {
+ $selectedRawtag = $note->tags[0];
+ }
+
+ $this->addNavigation($res, $selectedRawtag);
return $res;
}
'href' => $this->urlGen->linkToRoute(
'grauphel.gui.tag', array('rawtag' => $rawtag)
),
+ 'selected' => $rawtag == $selectedRawtag,
);
}
}