Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion template/admin/dictionary-index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="clearfix">
<h3><?php _e('List of top searched terms'); ?></h3>
<?php if ($config['save_log']) { ?>
<table class="table table-striped table-bordered table-condensed">
<table class="table table-striped table-bordered table-sm">
<tr>
<th><?php _e('Term'); ?></th>
<th><?php _e('Count of search'); ?></th>
Expand Down
26 changes: 12 additions & 14 deletions template/block/search.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
var results = jQuery.parseJSON(data);
$(results).each(function (key, value) {
if (value.image != '') {
$('.search-results').append('<li' + value.class + '><a title="' + value.title + '" href="' + value.url + '"><img src="' + value.image + '" alt="' + value.title + '"> ' + value.title + '</a></li>');
$('.search-results').append('<a class="dropdown-item ' + value.class + '" title="' + value.title + '" href="' + value.url + '"><img src="' + value.image + '" alt="' + value.title + '"> ' + value.title + '</a>');
} else {
$('.search-results').append('<li' + value.class + '><a title="' + value.title + '" href="' + value.url + '">' + value.title + '</a></li>');
$('.search-results').append('<a class="dropdown-item ' + value.class + '" title="' + value.title + '" href="' + value.url + '">' + value.title + '</a>');
}
})
});
Expand All @@ -32,9 +32,9 @@
var keyword = $("#search-keyword").val();
$(".search-info-text").remove();
if (keyword.length == 0) {
$(".search-results").show().append('<li class="search-info-text"><a>%s</a></li>');
$(".search-results").show().append('<a class="dropdown-item search-info-text">%s</a>');
} else {
$(".search-results").show().append('<li class="search-info-text"><a>%s</a></li>');
$(".search-results").show().append('<a class="dropdown-item search-info-text">%s</a>');
}
});
})(jQuery)
Expand Down Expand Up @@ -65,14 +65,14 @@ EOT;
</div>
<?php } else { ?>
<div class="input-group-btn">
<button class="btn btn-default">
<button class="btn btn-secondary">
<i class="fa fa-search"></i>
</button>
</div>
<?php } ?>
</div>
</form>
<ul class="search-results dropdown-menu"></ul>
<div class="search-results dropdown-menu"></div>
</div>
<?php } else { ?>
<form method="get" action="<?php echo $block['action']; ?>"
Expand All @@ -83,19 +83,17 @@ EOT;
<input type="text" class="form-control" name="q" placeholder="<?php echo _b('Search'); ?>">
<div class="input-group-btn">
<?php if (!empty($block['list'])) { ?>
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<a class="btn btn-secondary dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-search"></i>
<span class="caret"></span>

</a>
<ul class="dropdown-menu pull-right" id="js-search-menu">
<div class="dropdown-menu pull-right" id="js-search-menu">
<?php foreach ($block['list'] as $name => $label) { ?>
<li>
<a href="#" data-value="<?php echo $this->escape($name); ?>">
<a class="dropdown-item" href="#" data-value="<?php echo $this->escape($name); ?>">
<?php echo $this->escape($label); ?>
</a>
</li>
<?php } ?>
</ul>
</div>
<input type="hidden" name="m">
<?php } else { ?>
<?php if ($block['options']['module'] != 'all') { ?>
Expand All @@ -106,7 +104,7 @@ EOT;
<i class="fa fa-search"></i>
</div>
<?php } else { ?>
<button class="btn btn-default">
<button class="btn btn-secondary">
<i class="fa fa-search"></i>
</button>
<?php } ?>
Expand Down
8 changes: 4 additions & 4 deletions template/front/search-form.phtml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php $this->footScript()->appendFile($this->assetModule('front/search-tabs.js')); ?>
<div class="row">
<div class="col-md-8 col-md-offset-2 col-xs-12">
<div class="col-md-8 col-md-offset-2 col-12">
<form method="get" id="js-search-form"
data-url="<?php echo $this->url('search'); ?>"
data-module-url="<?php echo $this->url('search', ['m' => '_NAME']); ?>"
data-service-url="<?php echo $this->url('search', ['service' => '_NAME']); ?>"
data-module="<?php echo $searchModule; ?>">
<div class="search-tabs">
<ul class="list-inline">
<li>
<li class="list-inline-item">
<a href="#" class="js-search-global<?php if (!$searchModule) {
echo ' active';
} ?>">
Expand All @@ -17,7 +17,7 @@
</li>
<?php foreach ($modules as $name => $data) {
echo sprintf(
'<li><a data-name="%s" href="#" class="js-search-module%s">%s</a></li>',
'<li class="list-inline-item"><a data-name="%s" href="#" class="js-search-module%s">%s</a></li>',
$name,
$name == $searchModule ? ' active' : '',
$this->escape($data['title'])
Expand All @@ -39,7 +39,7 @@
<ul class="list-inline">
<?php foreach ($service as $name => $data) {
echo sprintf(
'<li><a data-name="%s" href="#" class="js-search-service">%s</a></li>',
'<li class="list-inline-item"><a data-name="%s" href="#" class="js-search-service">%s</a></li>',
$name,
$this->escape($data['title'])
);
Expand Down
20 changes: 10 additions & 10 deletions template/front/search-google.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ $this->headMeta('noindex', 'robots');
$mode = 'resultonly'; // 'resultonly', 'custom'
?>
<?php if ('default' == $mode) { ?>
<div class="panel panel-primary">
<div class="panel-heading">
<h1 class="panel-title"><?php echo sprintf(__('Google search for %s'), $this->escape(Pi::config('sitename'))); ?></h1>
<div class="card card-primary">
<div class="card-heading">
<h1 class="card-title"><?php echo sprintf(__('Google search for %s'), $this->escape(Pi::config('sitename'))); ?></h1>
</div>
<div class="panel-body">
<div class="card-text">
<script>
(function () {
var cx = '<?php echo $google['code']; ?>';
Expand All @@ -24,7 +24,7 @@ $mode = 'resultonly'; // 'resultonly', 'custom'
<gcse:search>
<div class="row" style="margin-top: 20px;">
<div class="col-md-offset-2 col-md-8">
<div class="well well-lg">
<div class="card card-body bg-light mb-3">
<h4>
<?php _e('Loading ...'); ?>
</h4>
Expand Down Expand Up @@ -74,7 +74,7 @@ $mode = 'resultonly'; // 'resultonly', 'custom'
<gcse:searchresults-only>
<div class="row" style="margin-top: 20px;">
<div class="col-md-offset-2 col-md-8">
<div class="well well-lg">
<div class="card card-body bg-light mb-3">
<h4>
<?php _e('Loading ...'); ?>
</h4>
Expand All @@ -84,11 +84,11 @@ $mode = 'resultonly'; // 'resultonly', 'custom'
</gcse:searchresults-only>
</div>
<?php } else { ?>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title"><?php echo sprintf(__('Google search for %s'), $this->escape(Pi::config('sitename'))); ?></h3>
<div class="card card-primary">
<div class="card-heading">
<h3 class="card-title"><?php echo sprintf(__('Google search for %s'), $this->escape(Pi::config('sitename'))); ?></h3>
</div>
<div class="panel-body" id="cse" style='width: 100%;'><?php _e('Loading ...'); ?></div>
<div class="card-body" id="cse" style='width: 100%;'><?php _e('Loading ...'); ?></div>

<script src="https://<?php echo $google['host']; ?>/jsapi" type="text/javascript"></script>
<script>
Expand Down
10 changes: 5 additions & 5 deletions template/front/search-home.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ $this->headMeta('noindex', 'robots');
$this->footScript()->appendFile($this->assetModule('front/search-tabs.js'));
?>
<div class="row">
<div class="col-md-8 col-md-offset-2 col-xs-12 text-center">
<div class="col-md-8 col-md-offset-2 col-12 text-center">
<h1><?php _e('Search'); ?></h1>
</div>
<div class="col-md-8 col-md-offset-2 col-xs-12">
<div class="col-md-8 col-md-offset-2 col-12">
<form method="get" id="js-search-form"
data-url="<?php echo $this->url('search'); ?>"
data-module-url="<?php echo $this->url('search', ['m' => '_NAME']); ?>"
data-service-url="<?php echo $this->url('search', ['service' => '_NAME']); ?>"
data-module="<?php echo $searchModule; ?>">
<div class="search-tabs">
<ul class="list-inline">
<li>
<li class="list-inline-item">
<a href="#" class="js-search-global<?php if (!$searchModule) {
echo ' active';
} ?>">
Expand All @@ -25,7 +25,7 @@ $this->footScript()->appendFile($this->assetModule('front/search-tabs.js'));
<?php
foreach ($modules as $name => $data) {
echo sprintf(
'<li><a data-name="%s" href="#" class="js-search-module%s">%s</a></li>',
'<li class="list-inline-item"><a data-name="%s" href="#" class="js-search-module%s">%s</a></li>',
$name,
$name == $searchModule ? ' active' : '',
$this->escape($data['title'])
Expand All @@ -48,7 +48,7 @@ $this->footScript()->appendFile($this->assetModule('front/search-tabs.js'));
<ul class="list-inline">
<?php foreach ($service as $name => $data) {
echo sprintf(
'<li><a data-name="%s" href="#" class="js-search-service">%s</a></li>',
'<li class="list-inline-item"><a data-name="%s" href="#" class="js-search-service">%s</a></li>',
$name,
$this->escape($data['title'])
);
Expand Down
6 changes: 3 additions & 3 deletions template/front/search-module-result.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $this->css($this->assetModule('front/front.css'));
$this->headMeta('noindex', 'robots');
?>
<div class="clearfix">
<div class="col-md-8 col-md-offset-2 col-xs-12 text-center">
<div class="col-md-8 col-md-offset-2 col-12 text-center">
<?php if (isset($query) && !empty($query)) { ?>
<h1><?php echo sprintf(__('Search result of %s on %s'), $this->escape($query), $this->escape($modules[$searchModule]['title'])); ?></h1>
<?php } else { ?>
Expand All @@ -12,7 +12,7 @@ $this->headMeta('noindex', 'robots');
</div>
<?php include $this->template('./search-form.phtml'); ?>

<div class="well well-sm">
<div class="card card-body bg-light mb-3">
<?php if (0 < $total) {
echo sprintf(__('On <strong>%s</strong> module we found about <strong>%d</strong> result on search of <strong>%s</strong>'), $this->escape($modules[$searchModule]['title']), $total, $this->escape($query));
} elseif (!empty($flood)) {
Expand All @@ -33,7 +33,7 @@ $this->headMeta('noindex', 'robots');
<?php if (!empty($item['image'])) { ?>
<div class="col-md-2">
<a title="<?php echo $item['title']; ?>" href="<?php echo $item['url']; ?>">
<img class="img-responsive img-rounded"
<img class="img-fluid rounded"
src="<?php echo $this->escape($item['image']); ?>"
alt="<?php echo $this->escape($item['title']); ?>">
</a>
Expand Down
14 changes: 7 additions & 7 deletions template/front/search-result.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ $this->css($this->assetModule('front/front.css'));
$this->headMeta('noindex', 'robots');
?>
<div class="clearfix">
<div class="col-md-8 col-md-offset-2 col-xs-12 text-center">
<div class="col-md-8 col-md-offset-2 col-12 text-center">
<h1><?php echo sprintf(__('Search result of %s'), $this->escape($query)); ?></h1>
</div>
<?php include $this->template('./search-form.phtml'); ?>
<div class="well well-sm">
<div class="card card-body bg-light mb-3">
<?php if (0 < $total) {
echo sprintf(__('On all modules we found about <strong>%d</strong> result on search of <strong>%s</strong>'), $total, $this->escape($query));
} elseif (!empty($flood)) {
Expand All @@ -24,12 +24,12 @@ $this->headMeta('noindex', 'robots');
<div class="clearfix">
<div class="clearfix page-header">
<?php if (isset($query) && !empty($query)) { ?>
<h2 class="col-md-10 panel-title"><?php echo sprintf(__('Search result of %s on %s'), $this->escape($query), $this->escape($modules[$name]['title'])); ?></h2>
<h2 class="col-md-10 card-title"><?php echo sprintf(__('Search result of %s on %s'), $this->escape($query), $this->escape($modules[$name]['title'])); ?></h2>
<?php } else { ?>
<h2 class="col-md-10 panel-title"><?php _e('Search result'); ?></h2>
<h2 class="col-md-10 card-title"><?php _e('Search result'); ?></h2>
<?php } ?>
<div class="col-md-2 text-right">
<span class="label label-default">
<span class="badge badge-default">
<?php echo sprintf(__('%d found.'), $total); ?>
</span>
</div>
Expand All @@ -43,7 +43,7 @@ $this->headMeta('noindex', 'robots');
<?php if (!empty($item['image'])) { ?>
<div class="col-md-2">
<a title="<?php echo $item['title']; ?>" href="<?php echo $item['url']; ?>">
<img class="img-responsive img-rounded"
<img class="img-fluid rounded"
src="<?php echo $this->escape($item['image']); ?>"
alt="<?php echo $this->escape($item['title']); ?>">
</a>
Expand All @@ -68,7 +68,7 @@ $this->headMeta('noindex', 'robots');
<?php if ($total > Pi::config('leading_limit', 'search')) { ?>
<div class="search-all-result clearfix col-md-12 text-right">
<a href="<?php echo $modules[$name]['url']; ?>">
<span class="label label-success"><?php echo __('All result &raquo;'); ?></span>
<span class="badge badge-success"><?php echo __('All result &raquo;'); ?></span>
</a>
</div>
<?php } ?>
Expand Down