mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-23 17:42:15 -05:00
implemented random button
This commit is contained in:
parent
9c55ed0923
commit
311baf86be
@ -445,6 +445,7 @@ class Poche
|
||||
$tpl_vars['entries'] = $this->store->getEntriesByView($view, $this->user->getId(), $this->pagination->get_limit(), $id);
|
||||
$tpl_vars['page_links'] = $page_links;
|
||||
$tpl_vars['nb_results'] = $count;
|
||||
$tpl_vars['random'] = rand(1,$count);
|
||||
}
|
||||
Tools::logm('display ' . $view . ' view');
|
||||
break;
|
||||
@ -812,4 +813,4 @@ class Poche
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -736,6 +736,9 @@ a.add-to-wallabag-link-after:after {
|
||||
.icon-print:before {
|
||||
content: "\e80d";
|
||||
}
|
||||
.icon-random:before {
|
||||
// RANDOM ICON TO ADD
|
||||
}
|
||||
|
||||
|
||||
/* .icon-image class, for image-based icons
|
||||
|
@ -25,7 +25,7 @@
|
||||
{% block pager %}
|
||||
{% if nb_results > 1 %}
|
||||
<div class="results">
|
||||
<div class="nb-results">{{ nb_results }} {% trans "results" %}{% if search_term is defined %} {% trans %}found for « {{ search_term }} »{% endtrans %}{% endif %}</div>
|
||||
<div class="nb-results">{{ nb_results }} {% trans "results" %}{% if search_term is defined %} {% trans %}found for « {{ search_term }} »{% endtrans %}{% endif %} <span class="icon icon-random"><a href="?view=view&id={{ random }}"> {% trans "random" %}</span></div>
|
||||
{{ page_links | raw }}
|
||||
</div>
|
||||
{% elseif nb_results == 1 %}
|
||||
|
@ -151,6 +151,16 @@ a:visited {
|
||||
text-indent: -9999px;
|
||||
}
|
||||
|
||||
.random {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
text-align: left;
|
||||
text-indent: -9999px;
|
||||
background-image: url('../img/default/dice.png');
|
||||
}
|
||||
|
||||
/*** ***/
|
||||
|
||||
/*** ARTICLE PAGE ***/
|
||||
|
@ -31,7 +31,8 @@
|
||||
{% block pager %}
|
||||
{% if nb_results > 1 %}
|
||||
<div class="results">
|
||||
<div class="nb-results">{{ nb_results }} {% trans "results" %}{% if searchterm is defined %}{% trans " found for « " %} {{ searchterm }} »{% endif %}</div>
|
||||
<div class="nb-results">{{ nb_results }} {% trans "results" %}{% if searchterm is defined %}{% trans " found for « " %} {{ searchterm }} »{% endif %}
|
||||
<a class="random" href="?view=view&id={{ random }}"><span>{% trans "random" %}</span></a></div>
|
||||
{{ page_links | raw }}
|
||||
</div>
|
||||
{% elseif nb_results == 1 %}
|
||||
|
BIN
themes/default/img/default/dice.png
Normal file
BIN
themes/default/img/default/dice.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 243 B |
Loading…
Reference in New Issue
Block a user