fmartingr
/
shelfzilla
Archived
1
0
Fork 0

Added some "for review" frontend visible alerts

This commit is contained in:
Felipe Martin 2014-04-25 13:19:34 +02:00
parent 718ece075e
commit 440f7067e5
3 changed files with 22 additions and 9 deletions

View File

@ -69,6 +69,16 @@ class Series(Model):
def __unicode__(self):
return u'{}'.format(self.name)
def have_review_pending(self):
if self.for_review:
return True
for vol in self.volumes.all():
if vol.for_review:
return True
return False
@property
def volumes_by_publisher(self):
return self.volumes.order_by('publisher__name', 'number')

View File

@ -7,18 +7,18 @@
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="panel panel-primary">
<!--
<div class="panel-heading">
<h1 class="panel-title panel-title-alt text-center">{{ item.name }}</h1>
</div>
-->
<div class="panel panel-warning">
{% if item.last_volume_cover %}
<div class="panel-body text-center">
<img src="{{ item.last_volume_cover.url }}" class="max-width-80" />
</div>
{% endif %}
<ul class="list-group">
{% if item.for_review and user.is_staff %}
<a class="list-group-item list-group-item-warning text-center">
{% trans "Requires review" %}
</a>
{% endif %}
<li class="list-group-item">
<strong>{% trans "Status" %}</strong>
{% if item.finished %}
@ -90,7 +90,7 @@
</div>
</div>
<div class="col-md-9">
<div class="panel panel-primary">
<div class="panel panel-primary">
<div class="panel-heading">
<h1 class="panel-title panel-title-alt text-center">{{ item.name }}</h1>
</div>

View File

@ -20,13 +20,16 @@
</a>
{% endif %}
</div>
<div class="text-center">
<div class="text-center volume-content">
{% if volume.for_review and user.is_staff %}
<span class="label label-warning">{% trans "Requires review" %}</span>
{% endif %}
{% if volume.number %}
<div><strong>#{{ volume.number }}</strong></div>
{% endif %}
{% if volume.name %}
<div><strong>{{ volume.name }}</strong></div>
{% endif %}
<img src="{% thumbnail volume.cover 150x150 %}" class="max-width-80" />
</div>
<img src="{% thumbnail volume.cover 150x150 %}" class="volume-cover max-width-80" />
</div>