From ccb1f0dd869f068b8c1fa1d078aa18a1db0dd25f Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 27 Nov 2013 22:14:52 -0500 Subject: [PATCH] create and edit Library objects, which now have names and owners --- frontend/templates/base.html | 3 + frontend/templates/explore.html | 4 +- frontend/templates/libraries.html | 15 ++- frontend/templates/libraryauth/edit.html | 39 ++++++ frontend/templates/libraryauth/library.html | 8 +- frontend/templates/libraryauth/list.html | 4 +- frontend/templates/libraryauth/users.html | 4 +- .../notification/library_join/full.txt | 4 +- .../notification/library_join/notice.html | 6 +- frontend/templates/supporter.html | 2 +- libraryauth/forms.py | 40 ++++++ ...dd_field_library_approved__add_field_li.py | 115 ++++++++++++++++++ libraryauth/models.py | 9 +- .../templates/libraryauth/cardnum_join.html | 2 +- .../templates/libraryauth/email_join.html | 2 +- .../templates/libraryauth/ip_join.html | 2 +- libraryauth/urls.py | 12 +- libraryauth/views.py | 86 +++++++++++-- 18 files changed, 321 insertions(+), 36 deletions(-) create mode 100644 frontend/templates/libraryauth/edit.html create mode 100644 libraryauth/migrations/0003_auto__add_field_library_name__add_field_library_approved__add_field_li.py diff --git a/frontend/templates/base.html b/frontend/templates/base.html index cb740e0c..04b8bff2 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -155,6 +155,9 @@ Not needed on newly designed home page?
  • Rights Holder Tools
  • Privacy
  • Terms of Use
  • + {% for library in user.libraries.all %} +
  • {{ library }} Administration
  • + {% endfor %} {% if user.is_staff %}
  • Unglue.it Administration
  • Create New Editions
  • diff --git a/frontend/templates/explore.html b/frontend/templates/explore.html index 3dcb4987..066b70ed 100644 --- a/frontend/templates/explore.html +++ b/frontend/templates/explore.html @@ -11,7 +11,7 @@ {% if not request.user.is_anonymous %}
  • My Books
  • {% for library in request.user.profile.libraries %} -
  • {{ library }}
  • +
  • {{ library }}
  • {% endfor %}
  • {% else %} @@ -55,7 +55,7 @@
  • {% endfor %} {% if library %} -
  • More from {{ library }}
  • +
  • More from {{ library }}
  • {% endif %} diff --git a/frontend/templates/libraries.html b/frontend/templates/libraries.html index eb66df1f..3f351d8a 100644 --- a/frontend/templates/libraries.html +++ b/frontend/templates/libraries.html @@ -25,16 +25,21 @@

    We love libraries because we're from the library world. And because we live in a real world that still needs libraries. We've built Unglue.it in part because we've seen that the ebook system we have now really doesn't work for libraries, and we believe in making things better.

    We started out with "Pledge" campaigns to help books become Creative Commons licensed ebooks. -We’ve added "Buy-to-Unglue" campaigns to so that libraries can lend ebooks on the road to being unglued.

    +We’ve added "Buy-to-Unglue" campaigns to so that libraries can lend ebooks on the road to being unglued. We've built a free distribution platform to help libraries distribute these books.

    We need your help, though. We can't unglue ebooks all by ourselves; we need lots of people to pitch in. If you'd like to share free, unlimited, no-DRM, privacy-respecting ebooks with your patrons, here are some ways you can help:

    -
    Sign up.
    -
    Starting an account, for yourself or your library, is free, and lets you add books to your wishlist, comment on them, and support campaigns. Sign up here. It's the first step towards becoming an Unglue.it participating library.
    +
    Sign up. It's Free!
    +
    Starting an account, for yourself or your library, is free. Use it to help us distribute unglued and ungluing ebooks.
    Become an Unglue.it participating library
    -
    Review our LIBRARY LICENCE AGREEMENT. Once an agreement has been signed, you and your patrons can buy Library Licenses for any ebook with a Buy-to-Unglue campaign. You can lend these ebooks to your patrons immediately using our free distribution platform. -The library license gives download access to one library member at a time for 14 days each, in multiple formats, from the our platform or yours, if you have one. +
    1. Make your library page on Unglue.it. It takes just a few minutes. It's the first step towards becoming an Unglue.it participating library.
    2. +
    3. Review our LIBRARY LICENCE AGREEMENT.
    4. +
    5. Once an agreement has been signed, we'll "approve" your library; you and your patrons can then buy Library Licenses for any ebook with a Buy-to-Unglue campaign. You can lend these ebooks to your patrons immediately using our free distribution platform. +The library license gives download access to one library member at a time for 14 days each, in multiple formats, from our platform or yours, if you have one.
    6. +
    7. Log in as the library, and add unglued and ungluing books to your library list. Buy licenses to our buy-to-unglue titles.
    8. +
    9. Let your users know about Unglue.it!
    10. +
    Stay in touch.
    You can follow us on Twitter (@unglueit), Facebook, and our blog, and subscribe to our newsletter (1-2 emails per month).
    diff --git a/frontend/templates/libraryauth/edit.html b/frontend/templates/libraryauth/edit.html new file mode 100644 index 00000000..c39e7ab4 --- /dev/null +++ b/frontend/templates/libraryauth/edit.html @@ -0,0 +1,39 @@ +{% extends "basedocumentation.html" %} +{% block title %} Library Admin {% endblock %} +{% block extra_extra_head %} + +{{ form.media.css }} + + +{{ form.media.js }} +{% endblock %} + +{% block doccontent %} +{% if library.pk %} +

    Edit Library

    +