Update everything to work with Bootstrap 3.0.0 as well as include Avatar templates

This commit is contained in:
Daniel Greenfeld 2013-08-20 17:53:17 +02:00
parent 31cd83d087
commit 0e9eb8c9ac
10 changed files with 84 additions and 7 deletions

View File

@ -10,7 +10,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="col-12">
<div class="col-xs-12">
<h2>{% trans "Confirm E-mail Address" %}</h2>
{% if confirmation %}

View File

@ -9,7 +9,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="col-12">
<div class="col-xs-12">
<h2>{% trans "Confirm E-mail Address" %}</h2>
{% user_display email_address.user as user_display %}

View File

@ -8,7 +8,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="col-12">
<div class="col-xs-12">
<h2>{% trans "Password Reset" %}</h2>
{% if user.is_authenticated %}

View File

@ -9,7 +9,7 @@
{% block content %}
<div class="container">
<div class="row">
<div class="col-12">
<div class="col-xs-12">
<h2>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h2>
{% if token_fail %}

View File

@ -0,0 +1,21 @@
{% extends "avatar/base.html" %}
{% load i18n avatar_tags %}
{% load url from future %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>{% trans "Your current avatar: " %}</h2>
{% avatar user %}
{% if not avatars %}
<p>{% trans "You haven't uploaded an avatar yet. Please upload one now." %}</p>
{% endif %}
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
{{ upload_avatar_form.as_p }}
<p>{% csrf_token %}<input type="submit" value="{% trans "Upload New Image" %}" /></p>
</form>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1 @@
<img src="{{ url }}" width="{{ size }}" height="{{ size }}" class="img-thumbnail">

View File

@ -0,0 +1,4 @@
{% extends "base.html" %}
{% block title %}django-avatar{% endblock %}
{% block content %}{% endblock %}

View File

@ -0,0 +1,28 @@
{% extends "avatar/base.html" %}
{% load i18n avatar_tags %}
{% load url from future %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>{% trans "Your current avatar: " %}</h2>
{% avatar user %}
{% if not avatars %}
<p>{% trans "You haven't uploaded an avatar yet. Please upload one now." %}</p>
{% else %}
<form method="POST" action="{% url 'avatar_change' %}">
<ul>
{{ primary_avatar_form.as_ul }}
</ul>
<p>{% csrf_token %}<input type="submit" value="{% trans "Choose new Default" %}" /></p>
</form>
{% endif %}
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
{{ upload_avatar_form.as_p }}
<p>{% csrf_token %}<input type="submit" value="{% trans "Upload New Image" %}" /></p>
</form>
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,24 @@
{% extends "avatar/base.html" %}
{% load i18n %}
{% load url from future %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2>{% trans "Please select the avatars that you would like to delete." %}</h2>
{% if not avatars %}
{% url 'avatar_change' as avatar_change_url %}
<p>{% blocktrans %}You have no avatars to delete. Please <a href="{{ avatar_change_url }}">upload one</a> now.{% endblocktrans %}</p>
{% else %}
<form method="POST" action="{% url 'avatar_delete' %}">
<ul>
{{ delete_avatar_form.as_ul }}
</ul>
<p>{% csrf_token %}<input type="submit" value="{% trans "Delete These" %}" /></p>
</form>
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -9,9 +9,8 @@
<div class="container">
<div class="row">
<div class="col-12">
<h2>Members</h2>
<p>Who loves cheese!</p>
<div class="col-xs-12">
<h2>Users</h2>
</div>
</div>