mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-10 06:04:15 +00:00
ffaaf0521d
* return updated HTML from bookmark actions * open details through URL * fix details update * improve modal behavior * use a frame * make behaviors properly destroy themselves * remove page and details params from tag urls * use separate behavior for details and tags * remove separate details view * make it work with other views * add asset actions * remove asset refresh for now * remove details partial * fix tests * remove old partials * update tests * cache and reuse tags * extract search autocomplete behavior * remove details param from pagination * fix tests * only return details modal when navigating in frame * fix link target * remove unused behaviors * use auto submit behavior for user select * fix import
40 lines
1.4 KiB
Python
40 lines
1.4 KiB
Python
from bookmarks.views import contexts, turbo
|
|
|
|
|
|
def render_bookmark_update(request, bookmark_list, tag_cloud, details):
|
|
return turbo.stream(
|
|
request,
|
|
"bookmarks/updates/bookmark_view_stream.html",
|
|
{
|
|
"bookmark_list": bookmark_list,
|
|
"tag_cloud": tag_cloud,
|
|
"details": details,
|
|
},
|
|
)
|
|
|
|
|
|
def active_bookmark_update(request):
|
|
bookmark_list = contexts.ActiveBookmarkListContext(request)
|
|
tag_cloud = contexts.ActiveTagCloudContext(request)
|
|
details = contexts.get_details_context(
|
|
request, contexts.ActiveBookmarkDetailsContext
|
|
)
|
|
return render_bookmark_update(request, bookmark_list, tag_cloud, details)
|
|
|
|
|
|
def archived_bookmark_update(request):
|
|
bookmark_list = contexts.ArchivedBookmarkListContext(request)
|
|
tag_cloud = contexts.ArchivedTagCloudContext(request)
|
|
details = contexts.get_details_context(
|
|
request, contexts.ArchivedBookmarkDetailsContext
|
|
)
|
|
return render_bookmark_update(request, bookmark_list, tag_cloud, details)
|
|
|
|
|
|
def shared_bookmark_update(request):
|
|
bookmark_list = contexts.SharedBookmarkListContext(request)
|
|
tag_cloud = contexts.SharedTagCloudContext(request)
|
|
details = contexts.get_details_context(
|
|
request, contexts.SharedBookmarkDetailsContext
|
|
)
|
|
return render_bookmark_update(request, bookmark_list, tag_cloud, details)
|