commit
99350d6cc4
|
@ -214,7 +214,7 @@ class EbookFileForm(forms.ModelForm):
|
||||||
class EbookForm(forms.ModelForm):
|
class EbookForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Ebook
|
model = Ebook
|
||||||
exclude =( 'created', 'download_count', 'active')
|
exclude =( 'created', 'download_count', 'active', 'filesize')
|
||||||
widgets = {
|
widgets = {
|
||||||
'edition': forms.HiddenInput,
|
'edition': forms.HiddenInput,
|
||||||
'user': forms.HiddenInput,
|
'user': forms.HiddenInput,
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
{% if edition.ebook_form %}
|
{% if edition.ebook_form %}
|
||||||
{% if show_ebook_form %}
|
{% if show_ebook_form %}
|
||||||
<div id="add_ebook">
|
<div id="add_ebook">
|
||||||
|
{% if alert %}<div class="yikes">{{alert}}</div>{% endif %}
|
||||||
{% if edition.ebooks.all.0 %}
|
{% if edition.ebooks.all.0 %}
|
||||||
<h2>eBooks for this Edition</h2>
|
<h2>eBooks for this Edition</h2>
|
||||||
{% if alert %}<div class="yikes">{{alert}}</div>{% endif %}
|
|
||||||
{% for ebook in edition.ebooks.all %}
|
{% for ebook in edition.ebooks.all %}
|
||||||
<a href="{% url download_ebook ebook.id %}">{{ ebook.format }}</a> {{ebook.rights}} at {{ebook.provider}}. Downloaded {{ ebook.download_count }} times.<br />
|
<a href="{% url download_ebook ebook.id %}">{{ ebook.format }}</a> {{ebook.rights}} at {{ebook.provider}}. Downloaded {{ ebook.download_count }} times.<br />
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue