Source

stack2blog / stack2blog / stack2blogapp / templates / userpage.html

{% extends "superpage.html" %}

{% block title %} {{so_user.display_name}}'s page - Stack2Blog {% endblock %}


{% block head %}
{% endblock %}

{% block content %}

<div id="userpage_container" class="container_16">

	<h1 class="grid_12" class="display_name"> Welcome {{so_user.display_name}} </h1>
	<div class="clear"></div>

	<p class="grid_12">
	Here you can see which answers you've already published, and which are waiting for you to post.
	</p>
	<div class="clear"></div>

	<!-- Unpublished answers -->
	<h2 class="grid_12">Answers you haven't published ({{ unpublished_answers|length }} shown, {{num_answers_remaining}} filtered):</h2>
	<div class="clear"></div>

	<form class="grid_12 filter_form" action="" method="get">
		<label for="length_filter">Only displaying answers with at least: </label>
		<input class="length_filter" type="text" name="length_filter" value="{{length_filter}}" id="userid"/> characters.
		<input type="submit" value="Update filter" />
	</form>

	<div class="clear"></div>

	<!-- The headers -->
	<ul class="answers_table_header unpublished_answers_table_header">
		<li class="grid_1"><a href="?length_filter={{length_filter|urlencode}}&amp;search_sort=votes&amp;search_order={{search_order_post_votes}}">Votes</a></li>
		<li class="grid_4"><a href="?length_filter={{length_filter|urlencode}}&amp;search_sort=question&amp;search_order={{search_order_post_title}}">Title</a> <span class="sort_help">(sort by activity)</span></li>
		<li class="grid_6"><a href="?length_filter={{length_filter|urlencode}}&amp;search_sort=answer&amp;search_order={{search_order_post_answer}}">Answer</a> <span class="sort_help">(sort by length)</span></li>
		<div class="clear"></div>
	</ul>

	{% for answer in unpublished_answers %}
		<div class="answer unposted_answer">
			<div class="grid_1 votecount"> {{answer.score}} </div>
			<div class="grid_4 question_title">
				<a class="question_link" href="{{answer.url}}"><div class="answer_title">{{answer.title}}</div>
				</a>
				<div class="answer_date">Last Activity: {{answer.last_activity_date}}</div>
			</div>
			<div class="grid_6"> <div class="answer_length">Length: {{answer.body_blurb|length}} characters</div> <div class="answer_body">{{answer.body_blurb|safe}}</div> </div>
			<div class="post_button"> <a href="/answer/{{answer.id}}/"> <img src="{{MEDIA_URL}}stack2blog_media/static_media/img/pos.jpg" alt="Post to Blog" /></a> </div>

			<div class="clear"></div>
		</div>

	{% endfor %}

	<div class="clear"></div>


	<!-- Published answers -->
	<h2 class="grid_12 published_answers_header">Answers you've already published ({{ published_answers|length }}):</h2>
	<div class="clear"></div>

	<!-- The headers -->
	<ul class="answers_table_header published_answers_table_header">
		<li class="grid_1">Votes</li>
		<li class="grid_6">Question Title</li>
		<li class="grid_5">Answer</li>
		<div class="clear"></div>
	</ul>

	{% for answer in published_answers %}
		<div class="answer unposted_answer">
			<div class="grid_1 votecount"> {{answer.score}} </div>
			<div class="grid_3 question_title"> {{answer.title}} </div>
			<div class="grid_5 answer_body"> {{answer.body_blurb|safe}} </div>

			<div class="clear"></div>
		</div>

	{% endfor %}

	<div class="clear"></div>

</div>

{% endblock %}