|
@ -104,14 +104,15 @@ def update(request, id):
|
|||
|
||||
|
||||
@mastodon_request_included
|
||||
@login_required
|
||||
# @login_required
|
||||
def retrieve(request, id):
|
||||
if request.method == 'GET':
|
||||
book = get_object_or_404(Book, pk=id)
|
||||
mark = None
|
||||
review = None
|
||||
try:
|
||||
mark = BookMark.objects.get(owner=request.user, book=book)
|
||||
if request.user.is_authenticated:
|
||||
mark = BookMark.objects.get(owner=request.user, book=book)
|
||||
except ObjectDoesNotExist:
|
||||
mark = None
|
||||
if mark:
|
||||
|
@ -123,18 +124,27 @@ def retrieve(request, id):
|
|||
})
|
||||
|
||||
try:
|
||||
review = BookReview.objects.get(owner=request.user, book=book)
|
||||
if request.user.is_authenticated:
|
||||
review = BookReview.objects.get(owner=request.user, book=book)
|
||||
except ObjectDoesNotExist:
|
||||
review = None
|
||||
|
||||
|
||||
mark_list = BookMark.get_available(book, request.user, request.session['oauth_token'])
|
||||
mark_list_more = True if len(mark_list) > MARK_NUMBER else False
|
||||
mark_list = mark_list[:MARK_NUMBER]
|
||||
for m in mark_list:
|
||||
m.get_status_display = BookMarkStatusTranslator(m.status)
|
||||
review_list = BookReview.get_available(book, request.user, request.session['oauth_token'])
|
||||
review_list_more = True if len(review_list) > REVIEW_NUMBER else False
|
||||
review_list = review_list[:REVIEW_NUMBER]
|
||||
if request.user.is_anonymous:
|
||||
mark_list = None
|
||||
review_list = None
|
||||
mark_list_more = None
|
||||
review_list_more = None
|
||||
else:
|
||||
mark_list = BookMark.get_available(book, request.user, request.session['oauth_token'])
|
||||
review_list = BookReview.get_available(book, request.user, request.session['oauth_token'])
|
||||
mark_list_more = True if len(mark_list) > MARK_NUMBER else False
|
||||
mark_list = mark_list[:MARK_NUMBER]
|
||||
for m in mark_list:
|
||||
m.get_status_display = BookMarkStatusTranslator(m.status)
|
||||
review_list_more = True if len(review_list) > REVIEW_NUMBER else False
|
||||
review_list = review_list[:REVIEW_NUMBER]
|
||||
|
||||
|
||||
# def strip_html_tags(text):
|
||||
# import re
|
||||
|
|
|
@ -144,10 +144,6 @@ textarea {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
input, select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
label,
|
||||
legend {
|
||||
display: block;
|
||||
|
@ -1073,6 +1069,11 @@ select::placeholder {
|
|||
.main-section-wrapper {
|
||||
padding: 32px 48px 32px 36px;
|
||||
background-color: #f7f7f7;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.main-section-wrapper input, .main-section-wrapper select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.entity-list .entity-list__title {
|
||||
|
@ -1525,6 +1526,7 @@ select::placeholder {
|
|||
padding: 28px 25px 12px 25px;
|
||||
background-color: #f7f7f7;
|
||||
margin-bottom: 30px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.aside-section-wrapper--transparent {
|
||||
|
@ -1896,6 +1898,10 @@ select::placeholder {
|
|||
overflow: auto;
|
||||
}
|
||||
|
||||
.single-section-wrapper input, .single-section-wrapper select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.entity-form, .review-form {
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ $aside-section-padding-mobile: 24px 25px 10px 25px
|
|||
padding: $aside-section-padding
|
||||
background-color: $color-bright
|
||||
margin-bottom: 30px
|
||||
overflow: auto
|
||||
|
||||
&--transparent
|
||||
background-color: unset
|
||||
|
|
|
@ -15,8 +15,8 @@ textarea
|
|||
min-height: 6.5rem
|
||||
width: 100%
|
||||
|
||||
input, select
|
||||
width: 100%
|
||||
// input, select
|
||||
// width: 100%
|
||||
|
||||
label,
|
||||
legend
|
||||
|
|
|
@ -9,6 +9,10 @@ $sub-section-title-margin: 8px
|
|||
.main-section-wrapper
|
||||
padding: $main-section-padding
|
||||
background-color: $color-bright
|
||||
overflow: auto
|
||||
|
||||
& input, & select
|
||||
width: 100%
|
||||
|
||||
// for search result etc
|
||||
.entity-list
|
||||
|
|
|
@ -5,6 +5,9 @@ $single-section-padding-mobile: 32px 28px
|
|||
padding: $single-section-padding
|
||||
background-color: $color-bright
|
||||
overflow: auto
|
||||
|
||||
& input, & select
|
||||
width: 100%
|
||||
|
||||
.entity-form, .review-form
|
||||
overflow: auto
|
||||
|
|
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 93 KiB |
|
@ -6,6 +6,10 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="og:title" content="{% trans 'Nicedb - 登录' %}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="{{ request.build_absolute_uri }}">
|
||||
<meta property="og:image" content="{{ request.scheme }}://{{ request.get_host }}{% static 'img/logo_square.svg' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/milligram.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic_edit.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic_box.css' %}">
|
||||
|
|