regluit/frontend/templates/supporter.html

254 lines
14 KiB
HTML
Raw Normal View History

{% extends "base.html" %}
{% load endless %}
{% block title %} — {{ supporter.username }}{% endblock %}
2011-09-29 11:44:03 +00:00
{% block extra_head %}
<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" />
<script type="text/javascript" src="/static/js/wishlist.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/jquery-ui-1.8.16.custom.min.js"></script>
2011-10-14 13:49:27 +00:00
<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>
<script type="text/javascript" src="/static/js/import_books.js"></script>
{% endblock %}
/*
To do:
create topsection file for inclusion in multiple contexts, if needed
figure out how to configure date display
2011-10-14 05:29:23 +00:00
decide if we're even including date joined in profile
Goodreads
2011-10-14 05:29:23 +00:00
be sure words display correctly
do I need both add-wishlist and remove-wishlist classes? do they differ?
better alignment on I am ungluing & badges
make sure backed/backing/wishlist is the order we want the badges to be in
test code with other campaign statuses -- random_campaigns needs to set a variety of statuses!
why is there a status in regluit.payment.models.Transaction? does it duplicate the status in regluit.core.models.Campaign?
there's no tab for seeing ALL my books, only the filters! huh.
2011-10-14 05:29:23 +00:00
Values I need:
how do I integrate the your wishlist thing with the tabs thing?
*/
{% block topsection %}
<div id="js-topsection">
2011-10-14 05:29:23 +00:00
<div class="js-main">
<div class="js-topnews">
<div class="js-topnews1">
<div class="js-topnews2">
<div class="js-topnews3">
<div class="user-block">
{% ifequal supporter request.user %}
<div class="user-block1">
<div class="block-inner">
<a class="my-setting" href="#">My Settings</a>
</div>
</div>
2011-10-14 05:29:23 +00:00
{% endifequal %}
<div class="user-block2">
{% if supporter.profile.pic_url %}
2011-11-14 01:35:29 +00:00
<img class="user-avatar" src="{{ supporter.profile.pic_url }}" height="50" width="50" alt="Picture of {{ supporter }}" title="{{ supporter }}" />
{% else %}
2011-11-14 01:35:29 +00:00
<img class="user-avatar" src="/static/images/header/avatar.png" height="50" width="50" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %}
<span class="user-name"><a href="#">{{ supporter.username }}</a></span>
2011-10-13 16:55:44 +00:00
<span class="user-date">{{ date }}</span>
<span class="user-short-info">{{ supporter.profile.tagline }}</span>
</div>
<div class="user-block4">
2011-10-14 05:29:23 +00:00
<div class="social">
{% if supporter.profile.home_url %}
<a href="{{ supporter.profile.home_url }}">
2011-11-16 17:36:24 +00:00
<img src="/static/images/supporter_icons/home_square.png" alt="{{ supporter }}'s homepage" title="{{ supporter }}'s Homepage" />
</a>
{% endif %}
{% if supporter.profile.facebook_id %}
2011-11-12 18:58:31 +00:00
<a href="http://www.facebook.com/profile.php?id={{supporter.profile.facebook_id}}">
2011-11-16 17:36:24 +00:00
<img src="/static/images/supporter_icons/facebook_square.png" alt="{{ supporter }}'s Facebook" title="{{ supporter }}'s Facebook" />
</a>
{% endif %}
{% if supporter.profile.twitter_id %}
<a href="https://twitter.com/#!/{{ supporter.profile.twitter_id }}">
2011-11-16 17:36:24 +00:00
<img src="/static/images/supporter_icons/twitter_square.png" alt="{{ supporter }}'s Twitter" title="{{ supporter }}'s Twitter" />
</a>
{% endif %}
{% if supporter.profile.goodreads_user_link %}
<a href="{{supporter.profile.goodreads_user_link}}">
2011-11-16 17:36:24 +00:00
<img src="/static/images/supporter_icons/goodreads_square.png" alt="{{ supporter }}'s profile on GoodReads" title="{{ supporter }}'s page on GoodReads" />
</a>
{% endif %}
{% if supporter.profile.librarything_id %}
<a href="http://www.librarything.com/profile/{{ supporter.profile.librarything_id }}">
2011-11-16 17:36:24 +00:00
<img src="/static/images/supporter_icons/librarything_square.png" alt="{{ supporter }}'s profile on LibraryThing" title="{{ supporter }}'s page on LibraryThing" />
</a>
{% endif %}
</div>
</div>
<div class="user-block3">
2011-10-14 05:29:23 +00:00
<div class="user-block">
2011-11-15 18:12:03 +00:00
<span class="rounded"><span class="blue" {% ifequal request.user supporter %}title="I've unglued {{ backed }} {% if backed == 1 %}book{% else %}books{% endif %}."{% else %}title="{{ supporter }} has unglued {{ backed }} {% if backed == 1 %}book{% else %}books{% endif %}."{% endifequal %}>{{ backed }}</span></span>
<span class="rounded"><span class="orange" {% ifequal request.user supporter %}title="I'm supporting {{ backing }} {% if backing == 1 %}book{% else %}books{% endif %}."{% else %}title="{{ supporter }} is supporting {{ backing }} {% if backing == 1 %}book{% else %}books{% endif %}."{% endifequal %}>{{ backing }}</span></span>
<span class="rounded"><span class="grey" {% ifequal request.user supporter %}title="I'm wishing for {{ wished }} {% if wished == 1 %}book{% else %}books{% endif %}."{% else %}title="{{ supporter }} is wishing for {{ wished }} {% if wished == 1 %}book{% else %}books{% endif %}."{% endifequal %}>{{ wished }}</span></span>
2011-10-14 05:29:23 +00:00
</div>
<span class="user-status-title">I am ungluing</span>
</div>
</div>
{% ifequal supporter request.user %}
<div class="user-block-hide">
<form method="POST" action="">
{% csrf_token %}
2011-10-14 05:29:23 +00:00
<div class="block block1">
<div class="block-inner">
<h3><a class="profile-edit" href="#">Your Tagline</a></h3>
{{ profile_form.tagline.errors }}
{{ profile_form.tagline }}
<input class="profile-save" type="submit" name="submit" value="Update" id="submit">
</div>
</div>
<div class="block block2">
2011-10-14 05:29:23 +00:00
<h3 class="title">Links</h3>
<div class="check-list">
<label>Add your homepage URL:</label>
{{ profile_form.home_url }}{{ profile_form.home_url.errors }}
</div>
<div class="check-list">
{% if supporter.profile.twitter_id %}
<a href="{% url socialauth_associate_begin backend='twitter' %}">Update your Twitter connection</a> <br/> or disconnect Twitter: {{ profile_form.clear_twitter }}
{% else %}
<a href="{% url socialauth_associate_begin backend='twitter' %}">Connect your Twitter account</a> to Unglue.it
{% endif %}
</div>
2011-11-12 18:58:31 +00:00
<div class="check-list">
{% if supporter.profile.facebook_id %}
<a href="{% url socialauth_associate_begin backend='facebook' %}">Update your Facebook connection</a> <br/> or disconnect Facebook: {{ profile_form.clear_facebook }}
{% else %}
<a href="{% url socialauth_associate_begin backend='facebook' %}">Connect your Facebook account</a> to Unglue.it
{% endif %}
</div>
<div class="check-list">
{% if user.profile.goodreads_user_id %}
<a href="{{goodreads_auth_url}}">Update your GoodReads connection</a>
2011-11-12 18:58:31 +00:00
{% else %}
<a href="{{goodreads_auth_url}}">Connect your GoodReads account</a> to Unglue.it
2011-11-12 18:58:31 +00:00
{% endif %}
</div>
<div class="check-list">
<label>Add Your LibraryThing User ID:</label>
{{ profile_form.librarything_id }}{{ profile_form.librarything_id.errors }}
</div>
</div>
</form>
<div class="block block3">
<h3 class="title">Goodreads / LibraryThing Import </h3>
{% if goodreads_shelf_load_form %}
<form id="load_shelf_form" method="post" action="#">
{% csrf_token %}
{{ goodreads_shelf_load_form.non_field_errors }}
<div class="fieldWrapper">
{{ goodreads_shelf_load_form.goodreads_shelf_name_number.errors }}
{{ goodreads_shelf_load_form.goodreads_shelf_name_number }}
<input type="submit" value="Load Goodreads shelf to wishlist" />
</div>
</form>
{% endif %}
{% if librarything_id %}
<form id="librarything_load" method="post" action="#">
{% csrf_token %}
<input type="submit" value="Load your LibraryThing library" />
</form>
{% endif %}
</div>
</div>
{% endifequal %}
</div>
</div>
</div>
</div>
</div>
</div>
2011-09-29 11:44:03 +00:00
{% 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">
2011-09-29 02:02:33 +00:00
<div class="content-block">
<div class="content-block-heading" id="tabs">
2011-10-14 05:29:23 +00:00
<ul class="tabs">
<li class="tabs1"><a href="#">Unglued</a></li>
<li class="tabs2"><a href="#">Being Unglued</a></li>
<li class="tabs3 active"><a href="#">Want to Unglue</a></li>
</ul>
2011-09-29 02:02:33 +00:00
<ul class="book-list-view">
<li>View As:</li>
<li class="view-list">
<a href="#" id="toggle-list">
2011-09-29 02:02:33 +00:00
<img src="/static/images/booklist/view-list.png" align="view list" title="view list" height="21" width="24" />
</a>
</li>
<li class="view-list">
<a href="#" id="toggle-panel">
2011-09-29 02:02:33 +00:00
<img src="/static/images/booklist/view-icon.png" align="view icon" title="view icon" height="22" width="22" />
</a>
</li>
</ul>
</div>
<div class="content-block-content">
{% ifequal wishlist.works.all.count 0 %}
{% ifequal request.user supporter %}
<div class="empty-wishlist">
Your wishlist is currently empty.<br><br>
Go ahead and <span class="bounce-search">find</span> some books to give to the world, and add them to your Wishlist!<br><br>
We double dog dare you...
</div>
{% else %}
<div class="empty-wishlist">
It looks like {{ supporter.username }} is just
getting started, and hasn't added anything to their
wishlist just yet.<br><br>
Nudge, nudge, say no more.
{% endifequal %}
{% else %}
{% paginate 20 works %}
{% for work in works %}
2011-11-06 19:32:29 +00:00
<!-- classify which tab depending on work.last_campaign_status -->
{% include "book_panel.html" %}
2011-09-29 02:02:33 +00:00
{% endfor %}
<br>
<div class="pagination content-block-heading">
{% show_pages %}
</div>
{% endifequal %}
</div>
2011-09-29 02:02:33 +00:00
</div>
</div>
</div>
</div>
</div>
{% endblock %}