show more details about current search

This commit is contained in:
korelstar 2018-11-04 14:06:42 +01:00
parent efbf119c35
commit 8762d62fc2
3 changed files with 37 additions and 10 deletions

View File

@ -43,6 +43,12 @@
}
}
#app-navigation li.search-result-header > a,
#app-navigation li.search-result-header > a * {
font-style: italic;
cursor: default;
}
#app-navigation li:hover .nav-entry,
#app-navigation li:focus .nav-entry {
opacity: 1;
@ -361,6 +367,9 @@ form.category .icon-confirm {
.nav-icon-recent {
background-image: url('../img/recent.svg?v=1');
}
.nav-icon-search {
background-image: url('../img/search.svg?v=1');
}
.nav-icon-favorites {
background-image: url('../img/star.svg?v=1');
}

1
img/search.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 16" height="16" width="16"><g stroke="#000" stroke-width="2" fill="none"><ellipse rx="4" ry="4" cy="6" cx="6"/><path d="m14.3 14.25-5.65-5.65"/></g></svg>

After

Width:  |  Height:  |  Size: 225 B

View File

@ -30,6 +30,9 @@ style('notes', [
</script>
<div id="app-navigation" ng-controller="NotesController" ng-class="{'loading': !notesLoaded}">
{{ SelectedCategory = (filterCategory==null ? null : filterCategory || '<?php p($l->t('Uncategorized')); ?>'); ''}}
<!-- new note button -->
<div class="app-navigation-new">
<button class="icon-add" id="new-note-button" type="button" ng-click="create()">
@ -38,6 +41,8 @@ style('notes', [
</div>
<ul class="with-icon">
<!-- old style search (before NC 14) -->
<?php if(!$_['useSearchAPI']) { ?>
<li class="note-search">
<span class="nav-entry icon-search">
@ -46,8 +51,9 @@ style('notes', [
</li>
<?php } ?>
<!-- category selector -->
<li class="collapsible app-navigation-noclose separator-below" ng-class="{ open: folderSelectorOpen, 'current-category-item': !folderSelectorOpen && filterCategory!=null }" ng-show="notes.length>1">
<a class="nav-icon-files svg" ng-click="toggleFolderSelector()">{{!folderSelectorOpen && filterCategory!=null ? filterCategory || '<?php p($l->t('Uncategorized')); ?>' : '<?php p($l->t('Categories')); ?>' | categoryTitle}}</a>
<a class="nav-icon-files svg" ng-click="toggleFolderSelector()">{{!folderSelectorOpen && SelectedCategory ? SelectedCategory : '<?php p($l->t('Categories')); ?>' | categoryTitle}}</a>
<ul>
<li data-id="recent" class="nav-recent" ng-class="{ active: filterCategory==null && filterFavorite==false }" ng-show="notes.length>1">
@ -83,6 +89,26 @@ style('notes', [
</ul>
</li>
<!-- search result header -->
<li ng-show="search && filteredNotes.length" class="search-result-header">
<a class="nav-icon-search active">
<span ng-show="SelectedCategory"><?php p($l->t('Search result for "{{search}}" in {{SelectedCategory}}')); ?></span>
<span ng-show="!SelectedCategory"><?php p($l->t('Search result for "{{search}}"')); ?></span>
</a>
</li>
<!-- nothing found -->
<li ng-show="notesLoaded && !filteredNotes.length">
<span class="nav-entry" ng-show="search">
<div id="emptycontent" class="emptycontent-search">
<div class="icon-search"></div>
<h2 ng-show="SelectedCategory"><?php p($l->t('No search result for {{search}} in {{SelectedCategory}}')); ?></h2>
<h2 ng-show="!SelectedCategory"><?php p($l->t('No search result for {{search}}')); ?></h2>
</div>
</span>
<span class="nav-entry" ng-show="!search"><?php p($l->t('No notes found')); ?></span>
</li>
<!-- notes list -->
<li ng-repeat="note in filteredNotes = (notes | filter:categoryFilter | and:search | orderBy:filterOrder | groupNotes:filterCategory)"
ng-class="{ active: note.id == route.noteId, 'has-error': note.error, 'app-navigation-noclose': note.isCategory }"
@ -124,15 +150,6 @@ style('notes', [
</ul>
</div>
</li>
<li ng-show="notesLoaded && !filteredNotes.length">
<span class="nav-entry" ng-show="search">
<div id="emptycontent" class="emptycontent-search">
<div class="icon-search"></div>
<h2 class="ng-binding"><?php p($l->t('No search result for {{search}}')); ?></h2>
</div>
</span>
<span class="nav-entry" ng-show="!search"><?php p($l->t('No notes found')); ?></span>
</li>
</ul>
<div id="app-settings" ng-controller="NotesSettingsController">