mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-07 00:15:10 +01:00
Support for notes
This commit is contained in:
@@ -95,6 +95,7 @@ class Bookmark(db.Model):
|
|||||||
|
|
||||||
title = CharField(default='')
|
title = CharField(default='')
|
||||||
url = CharField()
|
url = CharField()
|
||||||
|
note = TextField(default='')
|
||||||
#image = CharField(default='')
|
#image = CharField(default='')
|
||||||
url_hash = CharField(default='')
|
url_hash = CharField(default='')
|
||||||
tags = CharField(default='')
|
tags = CharField(default='')
|
||||||
@@ -346,6 +347,7 @@ def updatebookmark(userkey, request, urlhash = None):
|
|||||||
title = request.form.get('title')
|
title = request.form.get('title')
|
||||||
url = request.form.get('url')
|
url = request.form.get('url')
|
||||||
tags = request.form.get('tags')
|
tags = request.form.get('tags')
|
||||||
|
note = request.form.get('note')
|
||||||
starred = False
|
starred = False
|
||||||
if request.form.get('starred'):
|
if request.form.get('starred'):
|
||||||
starred = True
|
starred = True
|
||||||
@@ -374,6 +376,7 @@ def updatebookmark(userkey, request, urlhash = None):
|
|||||||
bookmark.url = url
|
bookmark.url = url
|
||||||
bookmark.starred = starred
|
bookmark.starred = starred
|
||||||
bookmark.set_tags(tags)
|
bookmark.set_tags(tags)
|
||||||
|
bookmark.note = note
|
||||||
bookmark.set_hash()
|
bookmark.set_hash()
|
||||||
#bookmark.fetch_image()
|
#bookmark.fetch_image()
|
||||||
if not title:
|
if not title:
|
||||||
|
|||||||
@@ -85,6 +85,9 @@
|
|||||||
{% if bookmark.starred == True %}
|
{% if bookmark.starred == True %}
|
||||||
<i class="small material-icons yellow-text">star</i>
|
<i class="small material-icons yellow-text">star</i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if bookmark.note %}
|
||||||
|
<br /><i class="small material-icons white-text" title="Bookmark has a note">description</i>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-stacked">
|
<div class="card-stacked">
|
||||||
<div class="card-content white-text">
|
<div class="card-content white-text">
|
||||||
|
|||||||
@@ -55,6 +55,12 @@
|
|||||||
<input placeholder="tags, divided by comma's" type="text" name="tags" id="tags" value="{{ bookmark.tags }}" class="validate" />
|
<input placeholder="tags, divided by comma's" type="text" name="tags" id="tags" value="{{ bookmark.tags }}" class="validate" />
|
||||||
<label for="tags">Tags</label>
|
<label for="tags">Tags</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="input-field col s12">
|
||||||
|
<i class="material-icons prefix">description</i>
|
||||||
|
<input placeholder="note" type="text" name="note" id="note" value="{{ bookmark.note }}" class="validate" />
|
||||||
|
<label for="note">Note</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if tags %}
|
{% if tags %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
Reference in New Issue
Block a user