Merge branch 'master' of github.com:Gluejar/regluit into ry

pull/1/head
Raymond Yee 2012-01-16 12:35:34 -05:00
commit c56f3fdeb6
3 changed files with 25 additions and 21 deletions

View File

@ -288,7 +288,10 @@ class Work(models.Model):
if campaign: if campaign:
status = campaign.status status = campaign.status
else: else:
status = "No campaign yet" if self.first_ebook() or self.first_epub():
status = "Available"
else:
status = "No campaign yet"
return status return status
def percent_unglued(self): def percent_unglued(self):

View File

@ -124,21 +124,18 @@ Welcome to the alpha version of Unglue.It. This site is a preview of our full f
</div> </div>
{% block counter %} {% block counter %}
<script type="text/javascript"> <script type="text/javascript">
var sc_project=7447776;
var sc_invisible=1; var _gaq = _gaq || [];
var sc_security="9ae2ba93"; _gaq.push(['_setAccount', 'UA-28369982-1']);
var sc_https=1; _gaq.push(['_trackPageview']);
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "http://www."); (function() {
document.write("<sc"+"ript type='text/javascript' src='" + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
scJsHost + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
"statcounter.com/counter/counter_xhtml.js'></"+"script>");</script> var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
<noscript><div class="statcounter"><a title="web })();
statistics" href="http://statcounter.com/free-web-stats/"
class="statcounter"><img class="statcounter" </script>{% endblock %}
src="https://c.statcounter.com/7447776/0/9ae2ba93/1/"
alt="web statistics" /></a></div></noscript>
{% endblock %}
</body> </body>
</html> </html>

View File

@ -1,4 +1,4 @@
<div class="thewholebook listview tabs {% if status == 'SUCCESSFUL' %}tabs-1{% else %}{% if status == 'ACTIVE' %}tabs-2{% else %}tabs-3{% endif %}{% endif %}"> <div class="thewholebook listview tabs {% if status == 'SUCCESSFUL' or work.first_pdf_url or work.first_epub_url %}tabs-1{% else %}{% if status == 'ACTIVE' %}tabs-2{% else %}tabs-3{% endif %}{% endif %}">
<div class="listview book-list"> <div class="listview book-list">
<div class="listview panelback side2"> <div class="listview panelback side2">
<div class="greenpanel2"> <div class="greenpanel2">
@ -124,21 +124,25 @@
{% if status == 'No campaign yet' or status == 'INITIALIZED' %} {% if status == 'No campaign yet' or status == 'INITIALIZED' %}
<span class="rounded"><span class="grey"><span class="panelnope">Wished by&nbsp;</span>{{ work.wished_by.count }}</span></span> <span class="rounded"><span class="grey"><span class="panelnope">Wished by&nbsp;</span>{{ work.wished_by.count }}</span></span>
{% else %} {% else %}
{% if work.first_pdf_url or work.first_epub_url %}
<span class="rounded"><span class="grey"><span class="panelnope">Loved by&nbsp;</span>{{ work.wished_by.count }}</span></span>
{% else %}
<div class="booklist-status-img"> <div class="booklist-status-img">
<img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="book list status" alt="book list status" /> <img src="/static/images/images/icon-book-37by25-{{ work.percent_unglued }}.png" title="book list status" alt="book list status" />
</div> </div>
<div class="booklist-status-label">{{ work.percent_unglued_number }}%</div> <div class="booklist-status-label">{{ work.percent_unglued_number }}%</div>
{% endif %} {% endif %}{% endif %}
</div> </div>
<div class="listview panelfront side1 ebooks"> <div class="listview panelfront side1 ebooks">
{% if work.first_epub_url %} {% if work.first_epub_url and work.first_pdf_url %}
<span class="listview boolist-ebook"> <span class="listview boolist-ebook">
{% if work.first_epub_url %}
<a href="{{ work.first_epub_url }}">epub</a> <a href="{{ work.first_epub_url }}">epub</a>
</span>
{% endif %} {% endif %}
{% if work.first_pdf_url %} {% if work.first_pdf_url %}
<span class="listview boolist-ebook">
<a href="{{ work.first_pdf_url }}">pdf</a> <a href="{{ work.first_pdf_url }}">pdf</a>
{% endif %}
</span> </span>
{% endif %} {% endif %}
</div> </div>