mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 22:05:09 +01:00
Support for notes
This commit is contained in:
@@ -95,6 +95,7 @@ class Bookmark(db.Model):
|
||||
|
||||
title = CharField(default='')
|
||||
url = CharField()
|
||||
note = TextField(default='')
|
||||
#image = CharField(default='')
|
||||
url_hash = CharField(default='')
|
||||
tags = CharField(default='')
|
||||
@@ -346,6 +347,7 @@ def updatebookmark(userkey, request, urlhash = None):
|
||||
title = request.form.get('title')
|
||||
url = request.form.get('url')
|
||||
tags = request.form.get('tags')
|
||||
note = request.form.get('note')
|
||||
starred = False
|
||||
if request.form.get('starred'):
|
||||
starred = True
|
||||
@@ -374,6 +376,7 @@ def updatebookmark(userkey, request, urlhash = None):
|
||||
bookmark.url = url
|
||||
bookmark.starred = starred
|
||||
bookmark.set_tags(tags)
|
||||
bookmark.note = note
|
||||
bookmark.set_hash()
|
||||
#bookmark.fetch_image()
|
||||
if not title:
|
||||
|
||||
@@ -85,6 +85,9 @@
|
||||
{% if bookmark.starred == True %}
|
||||
<i class="small material-icons yellow-text">star</i>
|
||||
{% endif %}
|
||||
{% if bookmark.note %}
|
||||
<br /><i class="small material-icons white-text" title="Bookmark has a note">description</i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-stacked">
|
||||
<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" />
|
||||
<label for="tags">Tags</label>
|
||||
</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>
|
||||
{% if tags %}
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user