diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-08-12 15:09:28 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-08-12 15:09:28 -0700 |
commit | de33ee6bb87aeff4bdc01a995c24515894a6a3a8 (patch) | |
tree | 1198934cb80514dcfda4bb1ad471067aa1ed5554 /youtube | |
parent | dd4841901f676fff619d9cf794c37a35e202bda6 (diff) | |
download | yt-local-de33ee6bb87aeff4bdc01a995c24515894a6a3a8.tar.lz yt-local-de33ee6bb87aeff4bdc01a995c24515894a6a3a8.tar.xz yt-local-de33ee6bb87aeff4bdc01a995c24515894a6a3a8.zip |
When restricting subscriptions to a tag, make that tag unclickable and add link to unrestrict
Diffstat (limited to 'youtube')
-rw-r--r-- | youtube/subscriptions.py | 1 | ||||
-rw-r--r-- | youtube/templates/subscriptions.html | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/youtube/subscriptions.py b/youtube/subscriptions.py index 5a957ac..64a72f4 100644 --- a/youtube/subscriptions.py +++ b/youtube/subscriptions.py @@ -535,6 +535,7 @@ def get_subscriptions_page(): num_pages = math.ceil(number_of_videos_in_db/60), parameters_dictionary = request.args, tags = tags, + current_tag = tag, subscription_list = subscription_list, ) diff --git a/youtube/templates/subscriptions.html b/youtube/templates/subscriptions.html index b4b87f0..62ed681 100644 --- a/youtube/templates/subscriptions.html +++ b/youtube/templates/subscriptions.html @@ -71,9 +71,19 @@ <hr> <ol class="sidebar-list tags"> + {% if current_tag %} + <li class="sidebar-list-item"> + <a href="/youtube.com/subscriptions" class="sidebar-item-name">Any tag</a> + </li> + {% endif %} + {% for tag in tags %} <li class="sidebar-list-item"> - <a href="?tag={{ tag|urlencode }}" class="sidebar-item-name">{{ tag }}</a> + {% if tag == current_tag %} + <span class="sidebar-item-name">{{ tag }}</span> + {% else %} + <a href="?tag={{ tag|urlencode }}" class="sidebar-item-name">{{ tag }}</a> + {% endif %} <form method="POST" class="sidebar-item-refresh"> <input type="submit" value="Check"> <input type="hidden" name="action" value="refresh"> |