Merge pull request #336 from Gluejar/rh_create_work

rights holder can create new work
pull/1/head
Raymond Yee 2014-04-29 18:16:25 -07:00
commit 8e39548740
3 changed files with 5 additions and 0 deletions

View File

@ -17,7 +17,9 @@
<h2>Create New Edition</h2> <h2>Create New Edition</h2>
{% endif %} {% endif %}
{% else %} {% else %}
{% if edition.pk %}
<h2>Add Ebook Links for <a href="{% url work edition.work.id %}">{{ edition.work }}</a></h2> <h2>Add Ebook Links for <a href="{% url work edition.work.id %}">{{ edition.work }}</a></h2>
{% endif %}
{% endif %} {% endif %}
{% if admin %} {% if admin %}

View File

@ -221,6 +221,7 @@ Any questions not covered here? Please email us at <a href="mailto:rights@gluej
</ul></li> </ul></li>
<li>...or send us metadata for books you have rights to. <li>...or send us metadata for books you have rights to.
<ul> <ul>
<li>Use <a href="{% url new_edition '' '' %}">this form</a> to enter the metadata.</li>
<li>Your ebooks must have ISBNs assigned.</li> <li>Your ebooks must have ISBNs assigned.</li>
<li>Your metadata should have title, authors, language, description.</li> <li>Your metadata should have title, authors, language, description.</li>
<li><a href="mailto:support@gluejar.com?subject=loading%20metadata">Contact us</a> to load ONIX or CSV files for you.</li> <li><a href="mailto:support@gluejar.com?subject=loading%20metadata">Contact us</a> to load ONIX or CSV files for you.</li>

View File

@ -497,6 +497,8 @@ def new_edition(request, work_id, edition_id, by=None):
elif work and work.last_campaign(): elif work and work.last_campaign():
if request.user in work.last_campaign().managers.all(): if request.user in work.last_campaign().managers.all():
admin = True admin = True
elif work==None and request.user.rights_holder.count():
admin = True
if edition_id: if edition_id:
try: try:
edition = models.Edition.objects.get(id = edition_id) edition = models.Edition.objects.get(id = edition_id)