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()
|
total = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.tags.contains(tag), Bookmark.status == Bookmark.VISIBLE).count()
|
||||||
alltags.append({'tag': tag, 'publictag': publictag, 'total': total})
|
alltags.append({'tag': tag, 'publictag': publictag, 'total': total})
|
||||||
total = len(alltags)
|
totaltags = len(alltags)
|
||||||
return render_template('tags.html', tags=alltags, total=total, userkey=userkey)
|
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>')
|
@app.route('/<userkey>/tag/<tag>')
|
||||||
|
|||||||
@@ -5,6 +5,33 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col s12">
|
<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>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -14,16 +41,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
All
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
-
|
|
||||||
<th>
|
|
||||||
{{ total }}
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
{% for tag in tags %}
|
{% for tag in tags %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user