Skip to content

Commit

Permalink
admin: Add support for comment search by Thread URL in admin interface
Browse files Browse the repository at this point in the history
See:
- #642
- #1000
  • Loading branch information
pkvach committed Apr 29, 2024
1 parent ba8dffb commit d63e5f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions isso/templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ <h2>Administration</h2>
<div class="search">
<form action="/admin/" method="get">
<input type="hidden" name="mode" value="0" />
<label>Comment search URL
<input type="search" class="search__input" name="comment_search_url" value="{{comment_search_url}}" spellcheck="false"
required placeholder="Comment or Thread URL" />
<label>Search by URL
<input type="url" class="search__input" name="comment_search_url" value="{{comment_search_url}}" spellcheck="false"
required placeholder="https://example.com/demo/#isso-1" />
</label>
<button type="submit" class="search__button">Search</button>
</form>
Expand Down
4 changes: 3 additions & 1 deletion isso/views/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,9 @@ def login(self, env, req):
@apiQuery {Number{0,1}} [asc=0]
Ascending
@apiQuery {String} comment_search_url
Search comments by URL
Search comments by URL. Both threads and individual comments are valid.
For example, a thread might have a URL like 'http://example.com/thread'
and an individual comment might have a URL like 'http://example.com/thread#isso-1'
@apiExample {curl} Listing of published comments:
curl 'https://comments.example.com/admin/?mode=1&page=0&order_by=modified&asc=1' -b cookie.txt
Expand Down

0 comments on commit d63e5f4

Please sign in to comment.