regluit/frontend/templates/work_list.html

178 lines
10 KiB
HTML

{% extends "base.html" %}
{% load endless %}
{% load lang_utils %}
{% with request.user.wishlist.works.all as wishlist %}
{% block title %} Works {% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/supporter_layout.css" />
<link type="text/css" rel="stylesheet" href="/static/css/book_list.css" />
<link type="text/css" rel="stylesheet" href="/static/css/book_panel.css" />
<link type="text/css" rel="stylesheet" href="/static/css/lists.css" />
{% endblock %}
{% block extra_head %}
<script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_home }}"></script>
<script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script>
<script type="text/javascript" src="/static/js/tabs.js"></script>
{% endblock %}
{% block topsection %}
<div id="locationhash">{{ activetab }}</div>
<div id="js-topsection">
<div class="js-main">
<div class="js-topnews">
<div class="js-topnews1">
<div class="js-topnews2">
<div class="js-topnews3">
<div class="user-block">
<div id="user-block1">
{% if facet == 'recommended' %}
<div id="block-intro-text"><span class="special-user-name">Staff Picks</span></div>
</div>
<div class="user-block2"><span class="user-short-info">Here are the {% if pub_lang %}{{pub_lang|ez_lang_name}} language {% endif %}books <a href="{% url supporter 'AmandaM' %}">Amanda</a>, <a href="{% url supporter 'andromeda' %}">Andromeda</a>, <a href="{% url supporter 'eric' %}">Eric</a>, and <a href="{% url supporter 'rdhyee' %}">Raymond</a> are loving lately.</span>
</div>
<div class="user-block3 recommended">
<a href="{% url supporter 'AmandaM' %}"><img class="user-avatar" src="https://si0.twimg.com/profile_images/1801686082/image_normal.jpg" height="50" width="50" alt="Picture of Amanda" title="Amanda" /></a>
<a href="{% url supporter 'andromeda' %}"><img class="user-avatar" src="https://si0.twimg.com/profile_images/611713549/andromeda_by_molly_color_normal.jpg" height="50" width="50" alt="Picture of Andromeda" title="Andromeda" /></a>
<a href="{% url supporter 'eric' %}"><img class="user-avatar" src="https://graph.facebook.com/1009077800/picture" height="50" width="50" alt="Picture of Eric" title="Eric" /></a>
<a href="{% url supporter 'RaymondYee' %}"><img class="user-avatar" src="https://graph.facebook.com/1229336/picture" height="50" width="50" alt="Picture of Raymond" title="Raymond" /></a>
</div>
{% else %}
<div id="block-intro-text"><span class="special-user-name">{{ facet|capfirst }}</span></div>
</div>
<div class="user-block2"><span class="user-short-info">With your help we're raising money to buy the rights to give these {% if pub_lang %}{{pub_lang|ez_lang_name}} language {% endif %}books to the world.</span>
</div>
<div class="user-block3">
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block content %}
<div id="main-container">
<div class="js-main">
<div id="js-leftcol">
{% include "explore.html" %}
</div>
<div id="js-maincol-fr">
<div class="js-maincol-inner">
<div id="content-block">
<div class="content-block-heading wantto" id="tabs">
<ul class="tabs">
<li class="tabs1"><a href="#">Unglued</a></li>
<li class="tabs2"><a href="#">Active</a></li>
<li class="tabs3"><a href="#">Unglue It!</a></li>
</ul>
<div class="badges listspage">
<span class="rounded"><span class="blue tabs1" title="Enjoy {{ counts.unglued }} unglued {% if counts.unglued == 1 %}book{% else %}books{% endif %}."><span class="hovertext">Enjoy&nbsp;</span>{{ counts.unglued }}</span></span>
<span class="rounded"><span class="orange tabs2" title="We're ungluing {{ counts.unglueing }} {% if counts.unglueing == 1 %}book{% else %}books{% endif %}."><span class="hovertext">Ungluing&nbsp;</span>{{ counts.unglueing }}</span></span>
<span class="rounded"><span class="grey tabs3" title="We're wishing for {{ counts.wished }} {% if counts.wished == 1 %}book{% else %}books{% endif %}."><span class="hovertext">Wishing for&nbsp;</span>{{ counts.wished }}</span></span>
</div>
<ul class="book-list-view">
<li>View As:</li>
<li class="view-list">
<a href="#" id="toggle-list">
<img src="/static/images/booklist/view-list.png" alt="view list" title="view list" height="21" width="24" />
</a>
</li>
<li class="view-list">
<a href="#" id="toggle-panel">
<img src="/static/images/booklist/view-icon.png" alt="view icon" title="view icon" height="22" width="22" />
</a>
</li>
</ul>
</div>
<div id="content-block-content">
{% ifequal work_list.count 0 %}
{% if facet == 'recommended' %}
Check back soon to see what we're recommending.
{% else %}
There aren't any {{pub_lang|ez_lang_name}} works in this list yet. Why not add your favorite books to your wishlist, so we can feature them here?
{% endif %}
{% else %}
{% comment %}
pagination commented out for now because it was causing huge db hits/pageload times. These sets have been limited in views.py to 20 on the theory that people only want to see the MOST popular works, and the other facets are unlikely to produce sets exceeding this anyway.
{% lazy_paginate 20 works_unglued using "works_unglued" %}
{% endcomment %}
{% for work in works_unglued %}
<div class="{% cycle 'row1' 'row2' %}">
{% with work.last_campaign_status as status %}
{% with work.last_campaign.deadline as deadline %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}{% endwith %}{% endwith %}
</div>
{% endfor %}
{% comment %}
<div class="pagination content-block-heading tabs-1">
{% get_pages %}
{% for page in pages %}
<a href="{{ page.path }}#1" class="endless_page_link">{{ page.number }}</a>
{% endfor %}
</div>
{% endcomment %}
{% comment %}
{% lazy_paginate 20 works_active using "works_active" %}
{% endcomment %}
{% for work in works_active %}
<div class="{% cycle 'row1' 'row2' %}">
{% with work.last_campaign_status as status %}
{% with work.last_campaign.deadline as deadline %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}{% endwith %}{% endwith %}
</div>
{% endfor %}
{% comment %}
<div class="pagination content-block-heading tabs-2">
{% get_pages %}
{% for page in pages %}
<a href="{{ page.path }}#2" class="endless_page_link">{{ page.number }}</a>
{% endfor %}
</div>
{% endcomment %}
{% comment %}
{% lazy_paginate 20 works_wished using "works_wished" %}
{% endcomment %}
{% for work in works_wished %}
<div class="{% cycle 'row1' 'row2' %}">
{% with work.last_campaign_status as status %}
{% with work.last_campaign.deadline as deadline %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}{% endwith %}{% endwith %}
</div>
{% endfor %}
{% comment %}
<div class="pagination content-block-heading tabs-3">
{% get_pages %}
{% for page in pages %}
<a href="{{ page.path }}#3" class="endless_page_link">{{ page.number }}</a>
{% endfor %}
</div>
{% endcomment %}
{% endifequal %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% endwith %}