Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkorelstar <github@korelstar.de>2016-10-21 17:05:33 +0300
committerHendrik Leppelsack <hendrik@leppelsack.de>2016-10-21 17:05:33 +0300
commitc4726b85f06f56299e78217d085f075101d23994 (patch)
treeeb2900db6e5034a90dcaefe2821407d7218c81e2 /templates/main.php
parentbbae651bddad0634e5ed37fde024a10e377b212b (diff)
New feature: set a note as favorite (star/unstar) (#248)
* New feature: set note as favorite (star/unstar) * fix use of hidden classes * minor optimizations requested by Henni * remove array annotation * check if tagger is null * adjust tests for new favorite feature * allow setting favorite over API
Diffstat (limited to 'templates/main.php')
-rw-r--r--templates/main.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/main.php b/templates/main.php
index d5ebcf8c..7d8c0400 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -42,7 +42,7 @@ style('notes', [
<a href='#'>+ <span><?php p($l->t('New note')); ?></span></a>
</li>
<!-- notes list -->
- <li ng-repeat="note in notes|orderBy:'modified':'reverse'"
+ <li ng-repeat="note in notes|orderBy:['-favorite','-modified']"
ng-class="{ active: note.id == route.noteId }">
<a href="#/notes/{{ note.id }}">
{{ note.title | noteTitle }}
@@ -53,6 +53,12 @@ style('notes', [
notes-tooltip
data-placement="bottom"
ng-click="delete(note.id)"></button>
+ <button class="svg action icon-star"
+ title="<?php p($l->t('Favorite')); ?>"
+ notes-tooltip
+ data-placement="bottom"
+ ng-click="toggleFavorite(note.id)"
+ ng-class="{'icon-starred': note.favorite}"></button>
</span>
</li>