show mark created timestamp as mark time
This commit is contained in:
parent
09e716956e
commit
befd8ea4ec
18 changed files with 30 additions and 20 deletions
|
@ -169,7 +169,7 @@
|
|||
{% if others_mark.visibility > 0 %}
|
||||
<span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z"/></svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ others_mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ others_mark.created_time }}</span>
|
||||
{% if others_mark.book != book %}
|
||||
<span class="entity-marks__mark-time source-label"><a class="entity-marks__mark-time" href="{% url 'books:retrieve' others_mark.book.id %}">{{ others_mark.book.get_source_site_display }}</a></span>
|
||||
{% endif %}
|
||||
|
@ -235,7 +235,7 @@
|
|||
</span>
|
||||
<div class="mark-panel__clear"></div>
|
||||
|
||||
<div class="mark-panel__time">{{ mark.edited_time }}</div>
|
||||
<div class="mark-panel__time">{{ mark.created_time }}</div>
|
||||
|
||||
{% if mark.text %}
|
||||
<p class="mark-panel__text">{{ mark.text }}</p>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z" />
|
||||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ mark.created_time }}</span>
|
||||
{% if mark.book != book %}
|
||||
<span class="entity-marks__mark-time source-label"><a class="entity-marks__mark-time" href="{% url 'books:retrieve' mark.book.id %}">{{ mark.book.get_source_site_display }}</a></span>
|
||||
{% endif %}
|
||||
|
|
|
@ -270,6 +270,8 @@ def create_update_mark(request):
|
|||
return HttpResponseBadRequest()
|
||||
old_rating = mark.rating
|
||||
old_tags = mark.bookmark_tags.all()
|
||||
if mark.status != request.POST.get('status'):
|
||||
mark.created_time = timezone.now()
|
||||
# update
|
||||
form = BookMarkForm(request.POST, instance=mark)
|
||||
else:
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">
|
||||
{% trans '于' %} {{ mark.edited_time }}
|
||||
{% trans '于' %} {{ mark.created_time }}
|
||||
{% if status == 'reviewed' %}
|
||||
{% trans '评论' %}: <a href="{% url 'books:retrieve_review' mark.id %}">{{ mark.title }}</a>
|
||||
{% else %}
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">
|
||||
{% trans '于' %} {{ mark.edited_time }}
|
||||
{% trans '于' %} {{ mark.created_time }}
|
||||
{% if status == 'reviewed' %}
|
||||
{% trans '评论' %}: <a href="{% url 'games:retrieve_review' mark.id %}">{{ mark.title }}</a>
|
||||
{% else %}
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">
|
||||
{% trans '于' %} {{ mark.edited_time }}
|
||||
{% trans '于' %} {{ mark.created_time }}
|
||||
{% if status == 'reviewed' %}
|
||||
{% trans '评论' %}: <a href="{% url 'movies:retrieve_review' mark.id %}">{{ mark.title }}</a>
|
||||
{% else %}
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">
|
||||
{% trans '于' %} {{ mark.edited_time }}
|
||||
{% trans '于' %} {{ mark.created_time }}
|
||||
{% if status == 'reviewed' %}
|
||||
{% trans '评论' %}:
|
||||
{% if music.category_name|lower == 'album' %}
|
||||
|
|
|
@ -196,7 +196,7 @@
|
|||
{% if others_mark.visibility > 0 %}
|
||||
<span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z"/></svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ others_mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ others_mark.created_time }}</span>
|
||||
{% if others_mark.text %}
|
||||
<p class="entity-marks__mark-content">{{ others_mark.text }}</p>
|
||||
{% endif %}
|
||||
|
@ -258,7 +258,7 @@
|
|||
</span>
|
||||
<div class="mark-panel__clear"></div>
|
||||
|
||||
<div class="mark-panel__time">{{ mark.edited_time }}</div>
|
||||
<div class="mark-panel__time">{{ mark.created_time }}</div>
|
||||
|
||||
{% if mark.text %}
|
||||
<p class="mark-panel__text">{{ mark.text }}</p>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z" />
|
||||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ mark.created_time }}</span>
|
||||
{% if mark.text %}
|
||||
<p class="entity-marks__mark-content">{{ mark.text }}</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -272,6 +272,8 @@ def create_update_mark(request):
|
|||
return HttpResponseBadRequest()
|
||||
old_rating = mark.rating
|
||||
old_tags = mark.gamemark_tags.all()
|
||||
if mark.status != request.POST.get('status'):
|
||||
mark.created_time = timezone.now()
|
||||
# update
|
||||
form = GameMarkForm(request.POST, instance=mark)
|
||||
else:
|
||||
|
|
|
@ -267,7 +267,7 @@
|
|||
{% if others_mark.visibility > 0 %}
|
||||
<span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z"/></svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ others_mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ others_mark.created_time }}</span>
|
||||
{% if others_mark.movie != movie %}
|
||||
<span class="entity-marks__mark-time source-label"><a class="entity-marks__mark-time" href="{% url 'movies:retrieve' others_mark.movie.id %}">{{ others_mark.movie.get_source_site_display }}</a></span>
|
||||
{% endif %}
|
||||
|
@ -341,7 +341,7 @@
|
|||
</span>
|
||||
<div class="mark-panel__clear"></div>
|
||||
|
||||
<div class="mark-panel__time">{{ mark.edited_time }}</div>
|
||||
<div class="mark-panel__time">{{ mark.created_time }}</div>
|
||||
|
||||
{% if mark.text %}
|
||||
<p class="mark-panel__text">{{ mark.text }}</p>
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z" />
|
||||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ mark.created_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ mark.created_time }}</span>
|
||||
{% if mark.movie != movie %}
|
||||
<span class="entity-marks__mark-time source-label"><a class="entity-marks__mark-time" href="{% url 'movies:retrieve' mark.movie.id %}">{{ mark.movie.get_source_site_display }}</a></span>
|
||||
{% endif %}
|
||||
|
|
|
@ -271,6 +271,8 @@ def create_update_mark(request):
|
|||
return HttpResponseBadRequest()
|
||||
old_rating = mark.rating
|
||||
old_tags = mark.moviemark_tags.all()
|
||||
if mark.status != request.POST.get('status'):
|
||||
mark.created_time = timezone.now()
|
||||
# update
|
||||
form = MovieMarkForm(request.POST, instance=mark)
|
||||
else:
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
{% if others_mark.visibility > 0 %}
|
||||
<span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z"/></svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ others_mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ others_mark.created_time }}</span>
|
||||
{% if others_mark.text %}
|
||||
<p class="entity-marks__mark-content">{{ others_mark.text }}</p>
|
||||
{% endif %}
|
||||
|
@ -294,7 +294,7 @@
|
|||
</span>
|
||||
<div class="mark-panel__clear"></div>
|
||||
|
||||
<div class="mark-panel__time">{{ mark.edited_time }}</div>
|
||||
<div class="mark-panel__time">{{ mark.created_time }}</div>
|
||||
|
||||
{% if mark.text %}
|
||||
<p class="mark-panel__text">{{ mark.text }}</p>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z" />
|
||||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ mark.created_time }}</span>
|
||||
{% if mark.text %}
|
||||
<p class="entity-marks__mark-content">{{ mark.text }}</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
{% if others_mark.visibility > 0 %}
|
||||
<span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z"/></svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ others_mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ others_mark.created_time }}</span>
|
||||
{% if others_mark.text %}
|
||||
<p class="entity-marks__mark-content">{{ others_mark.text }}</p>
|
||||
{% endif %}
|
||||
|
@ -240,7 +240,7 @@
|
|||
</span>
|
||||
<div class="mark-panel__clear"></div>
|
||||
|
||||
<div class="mark-panel__time">{{ mark.edited_time }}</div>
|
||||
<div class="mark-panel__time">{{ mark.created_time }}</div>
|
||||
|
||||
{% if mark.text %}
|
||||
<p class="mark-panel__text">{{ mark.text }}</p>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z" />
|
||||
</svg></span>
|
||||
{% endif %}
|
||||
<span class="entity-marks__mark-time">{{ mark.edited_time }}</span>
|
||||
<span class="entity-marks__mark-time">{{ mark.created_time }}</span>
|
||||
{% if mark.text %}
|
||||
<p class="entity-marks__mark-content">{{ mark.text }}</p>
|
||||
{% endif %}
|
||||
|
|
|
@ -290,6 +290,8 @@ def create_update_song_mark(request):
|
|||
return HttpResponseBadRequest()
|
||||
old_rating = mark.rating
|
||||
old_tags = mark.songmark_tags.all()
|
||||
if mark.status != request.POST.get('status'):
|
||||
mark.created_time = timezone.now()
|
||||
# update
|
||||
form = SongMarkForm(request.POST, instance=mark)
|
||||
else:
|
||||
|
@ -831,6 +833,8 @@ def create_update_album_mark(request):
|
|||
return HttpResponseBadRequest()
|
||||
old_rating = mark.rating
|
||||
old_tags = mark.albummark_tags.all()
|
||||
if mark.status != request.POST.get('status'):
|
||||
mark.created_time = timezone.now()
|
||||
# update
|
||||
form = AlbumMarkForm(request.POST, instance=mark)
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue