Skip to content

Commit

Permalink
Merge pull request #1606 from nextcloud/search-detail
Browse files Browse the repository at this point in the history
search design details
  • Loading branch information
MorrisJobke authored Oct 18, 2016
2 parents 129fdf2 + 1930aa3 commit 2bb031e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2426,8 +2426,9 @@
$('#searchresults').addClass('filter-empty');
$('#searchresults .emptycontent').addClass('emptycontent-search');
if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) {
var error = t('files', "No search results in other folders for '{tag}{filter}{endtag}'", {filter:this._filter}, null, {'escape': false});
this.$el.find('.nofilterresults').removeClass('hidden').
find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}, null, {'escape': false}));
find('p').html(error.replace('{tag}', '<strong>').replace('{endtag}', '</strong>'));
}
} else {
$('#searchresults').removeClass('filter-empty');
Expand Down
4 changes: 2 additions & 2 deletions apps/files/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
show size and last modified date on the right */
this.updateLegacyMimetype(result);

var $pathDiv = $('<div class="path"></div>').text(result.path);
var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1));
$row.find('td.info div.name').after($pathDiv).text(result.name);

$row.find('td.result a').attr('href', result.link);
Expand All @@ -80,7 +80,7 @@
show size and last modified date on the right */
this.updateLegacyMimetype(result);

var $pathDiv = $('<div class="path"></div>').text(result.path);
var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1));
$row.find('td.info div.name').after($pathDiv).text(result.name);

$row.find('td.result a').attr('href', result.link);
Expand Down
1 change: 0 additions & 1 deletion apps/files_sharing/templates/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<div class="nofilterresults hidden">
<div class="icon-search"></div>
<h2><?php p($l->t('No entries found in this folder')); ?></h2>
<p></p>
</div>

<table id="filestable">
Expand Down
3 changes: 2 additions & 1 deletion core/search/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@
$status.addClass('emptycontent').removeClass('status');
$status.html('');
$status.append('<div class="icon-search"></div>');
$status.append('<h2>' + t('core', 'No search results in other folders') + '</h2>');
var error = t('core', "No search results in other folders for '{tag}{filter}{endtag}'", {filter:lastQuery});
$status.append('<h2>' + error.replace('{tag}', '<strong>').replace('{endtag}', '</strong>') + '</h2>');
} else {
$status.removeClass('emptycontent').addClass('status');
$status.text(n('core', '{count} search result in another folder', '{count} search results in other folders', count, {count:count}));
Expand Down

0 comments on commit 2bb031e

Please sign in to comment.