diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/add_feed.tpl | 2 | ||||
-rw-r--r-- | views/hover_help.tpl | 1 | ||||
-rw-r--r-- | views/index.tpl | 35 | ||||
-rw-r--r-- | views/list_feeds.tpl | 4 | ||||
-rw-r--r-- | views/manage_feed.tpl | 2 | ||||
-rw-r--r-- | views/tag_hover_help.tpl | 1 |
6 files changed, 41 insertions, 4 deletions
diff --git a/views/add_feed.tpl b/views/add_feed.tpl index b08ea0e..0110bac 100644 --- a/views/add_feed.tpl +++ b/views/add_feed.tpl @@ -21,7 +21,7 @@ <br> <div class="side-by-side-help-container"> <input type="text" placeholder="Tags" name="tags"> - <span class="hover-help" tabindex="0" title="Space separated. Backslashes escape spaces.">🛈</span> + % include("tag_hover_help.tpl") </div> <input type="submit" value="Add"> </form> diff --git a/views/hover_help.tpl b/views/hover_help.tpl new file mode 100644 index 0000000..5d5eb97 --- /dev/null +++ b/views/hover_help.tpl @@ -0,0 +1 @@ +<span class="hover-help" tabindex="0" title="{{text}}">🛈</span> diff --git a/views/index.tpl b/views/index.tpl index acb6fd1..52e997f 100644 --- a/views/index.tpl +++ b/views/index.tpl @@ -51,6 +51,33 @@ <a href="/list_feeds" class="no-visited-indication">List feeds</a> </p> </nav> + <details {{"open" if (included_feeds or included_tags) else ""}}> + <summary>Filter</summary> + <form> + <div class="side-by-side-help-container"> + <label>Included feeds: + <input type="text" name="included_feeds" value="{{' '.join([str(feed_id) for feed_id in included_feeds]) if included_feeds else ''}}"> + </label> + % include("hover_help.tpl", text="Space-separated feed IDs.") + </div> + <div class="side-by-side-help-container"> + <label>Included tags: + <input type="text" name="included_tags" value="{{included_tags_str}}"> + </label> + % include("tag_hover_help.tpl") + </div> + <input type="submit" value="Filter"> + <input type="number" value="{{page_num}}" min="1" max="{{total_pages}}" name="page_num" style="display: none;"> + <input type="number" value="{{per_page}}" min="1" max="{{max_per_page}}" name="per_page" style="display: none;"> + </form> + <form> + <input type="text" name="included_feeds" value="" style="display: none;"> + <input type="text" name="included_tags" value="" style="display: none;"> + <input type="submit" value="Clear filters"> + <input type="number" value="{{page_num}}" min="1" max="{{total_pages}}" name="page_num" style="display: none;"> + <input type="number" value="{{per_page}}" min="1" max="{{max_per_page}}" name="per_page" style="display: none;"> + </form> + </details> <table> <thead> <tr> @@ -92,7 +119,7 @@ <td class="td-feed"> <div> <a href="/manage_feed?feed={{entry['feed_id']}}" class="no-visited-indication">⚙</a> - {{core.get_feed_title(entry["feed_id"])}} + {{core.get_feed_title(entry["feed_id"])}} <small>(</small>{{entry["feed_id"]}}<small>)</small> </div> </td> </tr> @@ -107,6 +134,12 @@ <input type="number" value="{{per_page}}" min="1" max="{{max_per_page}}" name="per_page"> </label> <input type="submit" value="Go"> + % if included_feeds: + <input type="text" name="included_feeds" value="{{included_feeds_str}}" style="display: none;"> + % end + % if included_tags: + <input type="text" name="included_feeds" value="{{included_tags_str}}" style="display: none;"> + % end </form> % include("footer.tpl") </body> diff --git a/views/list_feeds.tpl b/views/list_feeds.tpl index 6377289..3c60f06 100644 --- a/views/list_feeds.tpl +++ b/views/list_feeds.tpl @@ -13,6 +13,7 @@ <thead> <tr> <th>#</th> + <th>ID</th> <th>Feed</th> <th>Source</th> <th>Manage</th> @@ -22,7 +23,8 @@ % for i, feed in enumerate(feeds): <tr> <td>{{i + 1 + offset}}</td> - <td>{{feed["title"]}}</td> + <td>{{feed["id"]}}</td> + <td>{{feed["title"]}} (<a href="/?included_feeds={{feed['id']}}" class="no-visited-indication">filter</a>)</td> <td><a href="{{feed['source']}}" class="no-visited-indication">🔗</a></td> <td><a href="/manage_feed?feed={{feed['id']}}" class="no-visited-indication">⚙</a></td> </tr> diff --git a/views/manage_feed.tpl b/views/manage_feed.tpl index c110ad2..0ff127e 100644 --- a/views/manage_feed.tpl +++ b/views/manage_feed.tpl @@ -46,7 +46,7 @@ <label>Tags: <input type="text" name="tags" value="{{feed['serialised_tags']}}"> </label> - <span class="hover-help" tabindex="0" title="Space separated. Backslashes escape spaces.">🛈</span> + % include("tag_hover_help.tpl") </div> <input type="submit" value="Update" name="update_feed"> </form> diff --git a/views/tag_hover_help.tpl b/views/tag_hover_help.tpl new file mode 100644 index 0000000..9007e55 --- /dev/null +++ b/views/tag_hover_help.tpl @@ -0,0 +1 @@ +% include("hover_help.tpl", text="Space-separated. Backslashes escape spaces.") |