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:
authorHendrik Leppelsack <hendrik@leppelsack.de>2016-12-12 01:00:31 +0300
committerGitHub <noreply@github.com>2016-12-12 01:00:31 +0300
commit6aa596ed6b9a3eacfd53922e73e606d8862c0c02 (patch)
treeacf31e7321c28287a2cb3e3fc5eb878f0ff197e6 /templates
parentf8084a61ae16acff5bac72f2c91b81703c9b6f57 (diff)
Simple search functionality (#28)
* simple search functionality * filter by multiple words * fix firefox styling issues * add test for and filter
Diffstat (limited to 'templates')
-rw-r--r--templates/main.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/templates/main.php b/templates/main.php
index 7d8c0400..509203c6 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -36,13 +36,18 @@ style('notes', [
<div id="app-navigation" ng-controller="NotesController">
<ul>
+ <li class="note-search">
+ <span class="nav-entry icon-search">
+ <input type="text" ng-model="search" />
+ </span>
+ </li>
<!-- new note button -->
<li id="note-add" ng-click="create()"
oc-click-focus="{ selector: '#app-content textarea' }">
<a href='#'>+ <span><?php p($l->t('New note')); ?></span></a>
</li>
<!-- notes list -->
- <li ng-repeat="note in notes|orderBy:['-favorite','-modified']"
+ <li ng-repeat="note in filteredNotes = (notes| and:search | orderBy:['-favorite','-modified'])"
ng-class="{ active: note.id == route.noteId }">
<a href="#/notes/{{ note.id }}">
{{ note.title | noteTitle }}
@@ -61,6 +66,11 @@ style('notes', [
ng-class="{'icon-starred': note.favorite}"></button>
</span>
</li>
+ <li ng-hide="filteredNotes.length">
+ <span class="nav-entry">
+ <?php p($l->t('No notes found')); ?>
+ </span>
+ </li>
</ul>
</div>