mirror of
https://github.com/sissbruecker/linkding
synced 2024-11-26 13:20:23 +00:00
65f0eb2a04
* extract generic behaviors * preserve query string when refreshing content * refactor details modal refresh * refactor bulk edit * update tests * restore tag modal * Make IntelliJ aware of custom attributes * improve e2e test coverage
76 lines
2 KiB
Python
76 lines
2 KiB
Python
from django.contrib.auth.decorators import login_required
|
|
from django.shortcuts import render
|
|
|
|
from bookmarks.views.partials import contexts
|
|
|
|
|
|
@login_required
|
|
def active_bookmark_list(request):
|
|
bookmark_list_context = contexts.ActiveBookmarkListContext(request)
|
|
|
|
return render(
|
|
request,
|
|
"bookmarks/bookmark_list.html",
|
|
{"bookmark_list": bookmark_list_context},
|
|
)
|
|
|
|
|
|
@login_required
|
|
def active_tag_cloud(request):
|
|
tag_cloud_context = contexts.ActiveTagCloudContext(request)
|
|
|
|
return render(request, "bookmarks/tag_cloud.html", {"tag_cloud": tag_cloud_context})
|
|
|
|
|
|
@login_required
|
|
def active_tag_modal(request):
|
|
tag_cloud_context = contexts.ActiveTagCloudContext(request)
|
|
|
|
return render(request, "bookmarks/tag_modal.html", {"tag_cloud": tag_cloud_context})
|
|
|
|
|
|
@login_required
|
|
def archived_bookmark_list(request):
|
|
bookmark_list_context = contexts.ArchivedBookmarkListContext(request)
|
|
|
|
return render(
|
|
request,
|
|
"bookmarks/bookmark_list.html",
|
|
{"bookmark_list": bookmark_list_context},
|
|
)
|
|
|
|
|
|
@login_required
|
|
def archived_tag_cloud(request):
|
|
tag_cloud_context = contexts.ArchivedTagCloudContext(request)
|
|
|
|
return render(request, "bookmarks/tag_cloud.html", {"tag_cloud": tag_cloud_context})
|
|
|
|
|
|
@login_required
|
|
def archived_tag_modal(request):
|
|
tag_cloud_context = contexts.ArchivedTagCloudContext(request)
|
|
|
|
return render(request, "bookmarks/tag_modal.html", {"tag_cloud": tag_cloud_context})
|
|
|
|
|
|
def shared_bookmark_list(request):
|
|
bookmark_list_context = contexts.SharedBookmarkListContext(request)
|
|
|
|
return render(
|
|
request,
|
|
"bookmarks/bookmark_list.html",
|
|
{"bookmark_list": bookmark_list_context},
|
|
)
|
|
|
|
|
|
def shared_tag_cloud(request):
|
|
tag_cloud_context = contexts.SharedTagCloudContext(request)
|
|
|
|
return render(request, "bookmarks/tag_cloud.html", {"tag_cloud": tag_cloud_context})
|
|
|
|
|
|
def shared_tag_modal(request):
|
|
tag_cloud_context = contexts.SharedTagCloudContext(request)
|
|
|
|
return render(request, "bookmarks/tag_modal.html", {"tag_cloud": tag_cloud_context})
|