Created
June 7, 2012 14:40
-
-
Save TomiToivio/2889163 to your computer and use it in GitHub Desktop.
Online users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% load i18n %} | |
{% block header %} | |
<title>Booktype</title> | |
<script> | |
$(function() { | |
$("#formsignin").booksparkSignin({'url': '{% url signin %}'}); | |
$("#formregister").booksparkRegister({'url': '{% url signin %}', 'redirect': '{% url view_profile 'XXX' %}'}); | |
}); | |
</script> | |
{% endblock %} | |
{% block content %} | |
<div id="intro"> | |
<h2>{% trans "Welcome to Booktype" %}</h2> | |
<div class="recent-activity"> | |
<h2>Users online:</h2> | |
{% for key, value in users %} | |
{% for username in value %} | |
<div class="user"><a href="{% url view_profile username %}" class="user"><div class="image"><img src="{% url view_profilethumbnail username %}?width=24" al\ | |
t="{{username}}"></div><b>{{ username }}</b></a></div> | |
{% endfor %} | |
{% endfor %} | |
</div> | |
{% if request.user.is_authenticated %} | |
<!-- <h3>Show message when user is signed in</h3>--> | |
{% else %} | |
<div class="signin-block"> | |
{% include "account/form_signin.html" %} | |
</div> | |
<div class="register-block"> | |
{% include "account/form_register.html" %} | |
</div> | |
<div class="clearfix"></div> | |
{% endif %} | |
<h3>{% trans "Recent activity" %}</h3> | |
{% for activity in activity_history %} | |
<div class="recent-activity"> | |
<div class="image"> | |
<img src="{% url view_profilethumbnail activity.user %}?width=48" alt="{{activity.user}}"> | |
</div><!--end .image--> | |
<div class="user"> | |
<a href="{% url view_profile activity.user.username %}">{{ activity.user }}</a> {{ activity.modified|timesince}} {% trans "ago" %} | |
<div class="chapter"> | |
{% if activity.kind == 1 %} | |
{% trans "Created new chapter" %} <a href="{% url book_chapter activity.book.url_title activity.chapter.url_title %}">"{{activity.chapter.title}}"</a>. | |
<div class="book-title">#{{activity.book.url_title}} | |
</div> | |
{% endif %} | |
{% if activity.kind == 10 %} | |
{% trans "Created new book" %} <a href="{% url book_view activity.book.url_title %}">"{{activity.book.title}}"</a>. | |
<div class="book-title">#{{activity.book.url_title}} | |
</div> | |
{% endif %} | |
</div><!-- End of .chapter --> | |
</div><!-- end .user--> | |
</div><!-- end .recent-activity--> | |
{% endfor %} | |
</div><!-- end intro --> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment