details tab displays editions

pull/1/head
Andromeda Yelton 2011-12-08 16:23:31 -05:00
parent 60f4b141fc
commit aa0a935d16
5 changed files with 31 additions and 5 deletions

View File

@ -67,13 +67,11 @@ jQuery(document).ready(function(){
<h3 class="book-year">{{ work.editions.all.0.publication_date }}</h3>
<div class="find-book">
<label>Find it here</label>
<!-- todo: these should be a real thing -->
<div class="find-link">
<a class="find-google" href="{{ work.googlebooks_url }}"><img src="/static/images/icons/google.png" align="" title="Find on GoogleBooks" /></a>
<a class="find-google" href="{{ work.googlebooks_url }}"><img src="/static/images/supporter_icons/googlebooks_square.png" align="" title="Find on Google Books" /></a>
<a rel="nofollow" class="find-librarything" href="{% url work_librarything work.id %}"><img src="/static/images/supporter_icons/librarything_square.png" title="Find on LibraryThing" /></a>
<a rel="nofollow" class="find-goodreads" href="{% url work_goodreads work.id %}"><img src="/static/images/supporter_icons/goodreads_square.png" title="Find on GoodReads"></a>
<a rel="nofollow" class="find-openlibrary" href="{% url work_openlibrary work.id %}"><img src="/static/images/supporter_icons/openlibrary_square.png" title="Find on OpenLibrary"></a>
<a class="find-group" href="#"><img src="/static/images/icons/group.png" align="" title="" /></a>
</div>
</div>
{% if status == 'ACTIVE' %}
@ -162,8 +160,14 @@ jQuery(document).ready(function(){
<div id="tabs-4" class="tabs">
<div class="tabs-content">
{% if status == 'ACTIVE' %}
<h4>Last campaign details</h4>
{{ work.last_campaign.details|safe }}
{% endif %}
<h4>Editions</h4>
{% for edition in editions %}
<div class="editions"><div><img src="http://covers.openlibrary.org/b/isbn/{{edition.isbn_10}}-S.jpg" /></div><div class="metadata">{{edition.publisher}}<br />{{edition.publication_date}}</div></div>
{% endfor %}
{% if work.claim.count %}
<h4> Rights Information </h4>

View File

@ -75,6 +75,7 @@ def stub(request):
def work(request, work_id, action='display'):
work = get_object_or_404(models.Work, id=work_id)
editions = work.editions.all()
campaign = work.last_campaign()
if not request.user.is_anonymous():
claimform = UserClaimForm( request.user, data={'work':work_id, 'user': request.user.id})
@ -100,6 +101,7 @@ def work(request, work_id, action='display'):
'claimform': claimform,
'wishers': wishers,
'base_url': base_url,
'editions': editions,
})
def manage_campaign(request, id):

View File

@ -250,7 +250,7 @@ ul.support li span.menu-item-price {
float: left;
margin-left: 5px;
}
/* differs from sitewide.css. should it? */
/* this line differs from sitewide.css. should it? */
a {
color: #3d4e53;
font-size: 12px;
@ -275,3 +275,11 @@ a {
background: url("/static/images/booklist/add-wishlist.png") left center no-repeat;
padding-left: 20px;
}
.editions div {
float: left;
}
.editions .metadata {
display: block;
overflow: hidden;
margin-left: 5px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -273,7 +273,7 @@ ul.support li {
}
}
/* differs from sitewide.css. should it? */
/* this line differs from sitewide.css. should it? */
a{ color:#3d4e53; font-size:12px;}
.add-wishlist, &.remove-wishlist, &.on-wishlist, &.create-account {
@ -290,4 +290,16 @@ a{ color:#3d4e53; font-size:12px;}
background:url("@{image-base}booklist/add-wishlist.png") left center no-repeat;
padding-left:20px;
}
}
.editions {
div {
float:left;
}
.metadata {
display:block;
overflow: hidden;
margin-left: 5px;
}
}