mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 23:05:10 +01:00
Better total stats, now also info about nr bookmarks
This commit is contained in:
@@ -425,8 +425,9 @@ def tags(userkey):
|
||||
|
||||
total = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.tags.contains(tag), Bookmark.status == Bookmark.VISIBLE).count()
|
||||
alltags.append({'tag': tag, 'publictag': publictag, 'total': total})
|
||||
total = len(alltags)
|
||||
return render_template('tags.html', tags=alltags, total=total, userkey=userkey)
|
||||
totaltags = len(alltags)
|
||||
totalbookmarks = Bookmark.select().where(Bookmark.userkey == userkey).count()
|
||||
return render_template('tags.html', tags=alltags, totaltags=totaltags, totalbookmarks=totalbookmarks, userkey=userkey)
|
||||
|
||||
|
||||
@app.route('/<userkey>/tag/<tag>')
|
||||
|
||||
@@ -5,6 +5,33 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col s12">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
Different tags
|
||||
</td>
|
||||
<td>
|
||||
{{ totaltags }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Total bookmarks
|
||||
</td>
|
||||
<td>
|
||||
{{ totalbookmarks }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -14,16 +41,6 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
All
|
||||
</th>
|
||||
<th>
|
||||
-
|
||||
<th>
|
||||
{{ total }}
|
||||
</th>
|
||||
</tr>
|
||||
{% for tag in tags %}
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user