mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
add share icon to owner's note as well
This commit is contained in:
@@ -44,7 +44,17 @@ class NoteController extends Controller {
|
||||
public function index() {
|
||||
$notes = $this->notemapper->findAll($this->userId);
|
||||
foreach($notes as $note) {
|
||||
$note->setIsShared(false);
|
||||
$note->setIsShared(false);
|
||||
$sharedWith = $this->notesharemapper->getSharesForNote($note->getId());
|
||||
if(count($sharedWith) > 0) {
|
||||
$shareList = array();
|
||||
foreach($sharedWith as $share) {
|
||||
$shareList[] = $share->getSharedUser();
|
||||
}
|
||||
$note->setSharedWith(implode(", ", $shareList));
|
||||
} else {
|
||||
$note->setSharedWith(null);
|
||||
}
|
||||
}
|
||||
$shareEntries = $this->notesharemapper->findForUser($this->userId);
|
||||
$shares = array();
|
||||
|
||||
Reference in New Issue
Block a user