-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow adding/deleting entries in the web app for #239.
- Loading branch information
Showing
5 changed files
with
105 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{% extends "layout.html" %} | ||
|
||
{% import "macros.html" as macros %} | ||
|
||
|
||
{% block page_title %}Add entry to {{ macros.feed_title(feed) }}{% endblock %} | ||
{% block main_title %}Add entry to <b>{{ macros.feed_title(feed) }}</b>{% endblock %} | ||
|
||
|
||
{% block body %} | ||
|
||
<div> | ||
|
||
|
||
<form action="{{ url_for('.form_api') }}" method="post"> | ||
|
||
<p><input type="text" name="link" placeholder="link" autocomplete="off"> | ||
<p><input type="text" name="title" placeholder="title" autocomplete="off"> | ||
<p><button type="submit" name="action" value="add-entry" autocomplete="off">add</button> | ||
|
||
<input type="hidden" name='feed-url' value='{{ feed.url }}'> | ||
|
||
{# TODO: maybe redirect to entry page? how? – we don't know the entry url yet #} | ||
<input type="hidden" name='next' value='{{ url_for('.entries', feed=feed.url) }}'> | ||
|
||
</form> | ||
|
||
|
||
<ul class="controls"> | ||
|
||
{% for message in get_flashed_messages_by_prefix( | ||
('add-entry', feed.url), | ||
) %} | ||
<li class="error">{{ message }} | ||
{% endfor %} | ||
|
||
</ul> | ||
|
||
|
||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters