aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/templates')
-rw-r--r--youtube/templates/channel.html6
-rw-r--r--youtube/templates/common_elements.html14
2 files changed, 19 insertions, 1 deletions
diff --git a/youtube/templates/channel.html b/youtube/templates/channel.html
index 780b651..252d017 100644
--- a/youtube/templates/channel.html
+++ b/youtube/templates/channel.html
@@ -105,7 +105,11 @@
<hr/>
<footer class="pagination-container">
- {% if current_tab == 'videos' %}
+ {% if current_tab == 'videos' and current_sort.__str__() == '2' %}
+ <nav class="next-previous-button-row">
+ {{ common_elements.next_previous_ctoken_buttons(None, ctoken, channel_url + '/' + current_tab, parameters_dictionary) }}
+ </nav>
+ {% elif current_tab == 'videos' %}
<nav class="pagination-list">
{{ common_elements.page_buttons(number_of_pages, channel_url + '/' + current_tab, parameters_dictionary, include_ends=(current_sort.__str__() == '3')) }}
</nav>
diff --git a/youtube/templates/common_elements.html b/youtube/templates/common_elements.html
index 9ccafeb..3c36157 100644
--- a/youtube/templates/common_elements.html
+++ b/youtube/templates/common_elements.html
@@ -112,4 +112,18 @@
{% set _ = parameters_dictionary.__setitem__('page', current_page + 1) %}
<a class="page-link next-page" href="{{ url + '?' + parameters_dictionary|urlencode }}">Next page</a>
{% endif %}
+
+ {% macro next_previous_ctoken_buttons(prev_ctoken, next_ctoken, url, parameters_dictionary) %}
+ {% set parameters_dictionary = parameters_dictionary.to_dict() %}
+
+ {% if prev_ctoken %}
+ {% set _ = parameters_dictionary.__setitem__('ctoken', prev_ctoken) %}
+ <a class="page-link previous-page" href="{{ url + '?' + parameters_dictionary|urlencode }}">Previous page</a>
+ {% endif %}
+
+ {% if next_ctoken %}
+ {% set _ = parameters_dictionary.__setitem__('ctoken', next_ctoken) %}
+ <a class="page-link next-page" href="{{ url + '?' + parameters_dictionary|urlencode }}">Next page</a>
+ {% endif %}
+ {% endmacro %}
{% endmacro %}