Add torrent counter on profile page (#409) (#513)

This commit is contained in:
Tadeo Kondrak 2018-07-17 05:52:54 -06:00 committed by Anna-Maria Meriniemi
parent 2bf96196cb
commit ef7ff1b9ce
2 changed files with 4 additions and 1 deletions

View File

@ -151,6 +151,9 @@
<div class="row"> <div class="row">
<h3> <h3>
Browsing <span class="text-{{ user.userlevel_color }}" data-toggle="tooltip" title="{{ user.userlevel_str }}">{{ user.username }}</span>'{{ '' if user.username[-1] == 's' else 's' }} torrents Browsing <span class="text-{{ user.userlevel_color }}" data-toggle="tooltip" title="{{ user.userlevel_str }}">{{ user.username }}</span>'{{ '' if user.username[-1] == 's' else 's' }} torrents
{% if torrent_query.total is number and not search.term: %}
({{ torrent_query.total }})
{% endif %}
</h3> </h3>
{% include "search_results.html" %} {% include "search_results.html" %}

View File

@ -1,6 +1,6 @@
import base64 import base64
import os import os
from urllib.parse import urlencode, quote from urllib.parse import quote, urlencode
import flask import flask
from flask import current_app as app from flask import current_app as app