diff options
| author | Perflyst <mail@perflyst.de> | 2020-11-12 17:00:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 17:00:23 +0100 |
| commit | 557b0d76abe978cd8044a48f89313ef805954713 (patch) | |
| tree | fcc36a8f9d436adab9cb026880e8093ded852c6d | |
| parent | 13073411cc534d423a854eba4e395c66ff282663 (diff) | |
| parent | 48cbe45a9d3212a6f32551741213b028700d59b2 (diff) | |
| download | invidious-557b0d76abe978cd8044a48f89313ef805954713.tar.gz invidious-557b0d76abe978cd8044a48f89313ef805954713.tar.bz2 invidious-557b0d76abe978cd8044a48f89313ef805954713.zip | |
Merge pull request #919 from edumoreira1506/feature/add-buttons-top-page
Add Previous/Next page buttons at the top of the page
| -rw-r--r-- | src/invidious/views/search.ecr | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index d084bd31..bc13b7ea 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -2,6 +2,24 @@ <title><%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious</title> <% end %> +<div class="pure-g h-box v-box"> + <div class="pure-u-1 pure-u-lg-1-5"> + <% if page > 1 %> + <a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page - 1 %>"> + <%= translate(locale, "Previous page") %> + </a> + <% end %> + </div> + <div class="pure-u-1 pure-u-lg-3-5"></div> + <div class="pure-u-1 pure-u-lg-1-5" style="text-align:right"> + <% if count >= 20 %> + <a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page + 1 %>"> + <%= translate(locale, "Next page") %> + </a> + <% end %> + </div> +</div> + <div class="pure-g"> <% videos.each_slice(4) do |slice| %> <% slice.each do |item| %> |
