mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 23:05:10 +01:00
Show header with tag instead of Bookmarks
This commit is contained in:
@@ -251,7 +251,8 @@ def addingbookmark(userkey):
|
|||||||
#bookmark = Bookmark(url=url, title=title, starred=starred, userkey=userkey)
|
#bookmark = Bookmark(url=url, title=title, starred=starred, userkey=userkey)
|
||||||
bookmark, created = Bookmark.get_or_create(url=url, userkey=userkey)
|
bookmark, created = Bookmark.get_or_create(url=url, userkey=userkey)
|
||||||
if not created:
|
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
|
# Newly created, set properties
|
||||||
bookmark.title = title
|
bookmark.title = title
|
||||||
@@ -296,7 +297,8 @@ def tag(userkey, tag):
|
|||||||
""" Overview of all bookmarks with a certain tag """
|
""" Overview of all bookmarks with a certain tag """
|
||||||
bookmarks = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.tags.contains(tag))
|
bookmarks = Bookmark.select().where(Bookmark.userkey == userkey, Bookmark.tags.contains(tag))
|
||||||
tags = get_tags_for_user(userkey)
|
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')
|
@app.route('/<systemkey>/adduser')
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block title %}Bookmarks{% endblock %}
|
{% if not action %}
|
||||||
{% block pageheader %}Bookmarks{% endblock %}
|
{% set action = 'Bookmarks' %}
|
||||||
|
{% endif %}
|
||||||
|
{% block title %}{{ action }}{% endblock %}
|
||||||
|
{% block pageheader %}{{ action }}{% endblock %}
|
||||||
{% block pagecontent %}
|
{% block pagecontent %}
|
||||||
|
|
||||||
{% if message %}
|
{% if message %}
|
||||||
|
|||||||
Reference in New Issue
Block a user