Permalink
Browse files

Search block consistency

quick-n-dirty, to rework in 4.8
  • Loading branch information...
bloatware committed Dec 6, 2017
1 parent 6dd7040 commit 427203a1114787f9eee3dc6c01f38ee310718a0e
Showing with 22 additions and 12 deletions.
  1. +6 −0 textpattern/include/txp_file.php
  2. +6 −0 textpattern/include/txp_image.php
  3. +10 −12 textpattern/include/txp_list.php
@@ -260,12 +260,18 @@ function file_list($message = '', $ids = array())
list($page, $offset, $numPages) = pager($total, $limit, $page);
if ($total < 1) {
if ($criteria == 1) {
echo script_js('$(".txp-search").hide()');
}
echo graf(
span(null, array('class' => 'ui-icon ui-icon-info')).' '.
gTxt($criteria != 1 ? 'no_results_found' : 'no_files_recorded'),
array('class' => 'alert-block information')
);
} else {
echo script_js('$(".txp-search").show()');
$rs = safe_query(
"SELECT
txp_file.id,
@@ -240,12 +240,18 @@ function image_list($message = '')
.tag_start('div', array('id' => 'txp-list-container'));
if ($total < 1) {
if ($criteria == 1) {
echo script_js('$(".txp-search").hide()');
}
echo graf(
span(null, array('class' => 'ui-icon ui-icon-info')).' '.
gTxt($criteria != 1 ? 'no_results_found' : 'no_images_recorded'),
array('class' => 'alert-block information')
);
} else {
echo script_js('$(".txp-search").show()');
$rs = safe_query(
"SELECT
txp_image.id,
@@ -259,20 +259,18 @@ function list_list($message = '', $post = '')
echo $searchBlock.$contentBlockStart.$createBlock;
if ($total < 1) {
if ($criteria != 1) {
echo graf(
span(null, array('class' => 'ui-icon ui-icon-info')).' '.
gTxt('no_results_found'),
array('class' => 'alert-block information')
);
} else {
echo graf(
span(null, array('class' => 'ui-icon ui-icon-info')).' '.
gTxt('no_articles_recorded'),
array('class' => 'alert-block information')
);
if ($criteria == 1) {
echo script_js('$(".txp-search").hide()');
}
echo graf(
span(null, array('class' => 'ui-icon ui-icon-info')).' '.
gTxt($criteria != 1 ? 'no_results_found' : 'no_articles_recorded'),
array('class' => 'alert-block information')
);
} else {
echo script_js('$(".txp-search").show()');
$show_authors = !has_single_author('textpattern', 'AuthorID');
$headers = array(

0 comments on commit 427203a

Please sign in to comment.