1
0
mirror of https://github.com/aquatix/digimarks.git synced 2025-12-06 22:05:09 +01:00

Show header with tag instead of Bookmarks

This commit is contained in:
2016-07-22 09:34:07 +02:00
parent e4dc631e46
commit 3e410e0a7a
2 changed files with 9 additions and 4 deletions

View File

@@ -251,7 +251,8 @@ def addingbookmark(userkey):
#bookmark = Bookmark(url=url, title=title, starred=starred, userkey=userkey)
bookmark, created = Bookmark.get_or_create(url=url, userkey=userkey)
if not created:
return redirect(url_for('editbookmark', userkey=userkey, urlhash=bookmark.url_hash, message='Existing bookmark, did not overwrite with new values'))
message = 'Existing bookmark, did not overwrite with new values'
return redirect(url_for('editbookmark', userkey=userkey, urlhash=bookmark.url_hash, message=message))
# Newly created, set properties
bookmark.title = title
@@ -296,7 +297,8 @@ def tag(userkey, tag):
""" Overview of all bookmarks with a certain tag """
bookmarks = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.tags.contains(tag))
tags = get_tags_for_user(userkey)
return render_template('bookmarks.html', bookmarks=bookmarks, userkey=userkey, tags=tags)
pageheader = 'tag: ' + tag
return render_template('bookmarks.html', bookmarks=bookmarks, userkey=userkey, tags=tags, action=pageheader)
@app.route('/<systemkey>/adduser')

View File

@@ -1,6 +1,9 @@
{% extends "base.html" %}
{% block title %}Bookmarks{% endblock %}
{% block pageheader %}Bookmarks{% endblock %}
{% if not action %}
{% set action = 'Bookmarks' %}
{% endif %}
{% block title %}{{ action }}{% endblock %}
{% block pageheader %}{{ action }}{% endblock %}
{% block pagecontent %}
{% if message %}