Move the remanants of the profiles app into the local app for more caminus-only bits
This commit is contained in:
5
templates/local/_login_form.html
Normal file
5
templates/local/_login_form.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<form method="POST" action="{% url django.contrib.auth.views.login %}">
|
||||
{% csrf_token %}
|
||||
{{login_form.as_p}}
|
||||
<input type="submit" value="Login"/>
|
||||
</form>
|
||||
11
templates/local/claim_invite.html
Normal file
11
templates/local/claim_invite.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "base_simple.html" %}
|
||||
{%block title%}Claim an Invite{%endblock%}
|
||||
|
||||
{%block content %}
|
||||
<form method="POST" action="{%url local.views.claimInvite%}">
|
||||
{% csrf_token %}
|
||||
{{form.as_p}}
|
||||
<input type="submit" value="Claim!"/>
|
||||
</form>
|
||||
{%endblock%}
|
||||
|
||||
12
templates/local/delete_invite.html
Normal file
12
templates/local/delete_invite.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'base_simple.html' %}
|
||||
|
||||
{% block title %}Delete Invite{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{%url local.views.deleteInvite code=invite.code %}">
|
||||
{% csrf_token %}
|
||||
<p>If you delete this invite, it may not be used to create an account. If you already gave this invite to someone, <em>they will not be able to use it!</em></p>
|
||||
<p>Are you sure you want to delete this invite?</p>
|
||||
<input type="submit" value="Yes, I'm sure."/>
|
||||
</form>
|
||||
{% endblock %}
|
||||
11
templates/local/edit.html
Normal file
11
templates/local/edit.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "profile_base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="item">
|
||||
<form method="POST" action="{%url local.views.edit %}">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="Submit"/>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
50
templates/local/invites.html
Normal file
50
templates/local/invites.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block sectiontitle %}Invites{% endblock %}
|
||||
|
||||
{% block title %}Invites{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="item">
|
||||
<p>Your Invites:</p>
|
||||
<table id='invite-table'>
|
||||
<tr class="header">
|
||||
<th>Code</th>
|
||||
<th>Invited User</th>
|
||||
</tr>
|
||||
{% if invites %}
|
||||
{% for invite in invites %}
|
||||
<tr class="{%cycle 'even' 'odd' %} {% if invite.deleted %}deleted{%endif%}">
|
||||
<td>
|
||||
{% if invite.deleted %}
|
||||
{{invite.code}}
|
||||
{% else %}
|
||||
<a href="{{invite.get_absolute_url}}">{{invite.code}}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if invite.claimer %}
|
||||
{{invite.claimer}}
|
||||
{% else %}
|
||||
{% if invite.deleted %}
|
||||
<em>Deleted</em>
|
||||
{% else %}
|
||||
<a href="{%url local.views.deleteInvite code=invite.code %}">Delete</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr class="infoBar">
|
||||
<td colspan="2">No invites!</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr class="actionBar">
|
||||
<td colspan="2">
|
||||
<a href="{% url local.views.createInvite %}">Create a new invite</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
13
templates/local/list.html
Normal file
13
templates/local/list.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends 'base_simple.html' %}
|
||||
{% load minecraft %}
|
||||
|
||||
{% block title %}Users{% endblock %}
|
||||
{% block sectiontitle %}Users{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<ul id='profile-list'>
|
||||
{% for user in profiles %}
|
||||
<li>{% avatar user %}<p>{{user}}</p></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
8
templates/local/login.html
Normal file
8
templates/local/login.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Login{%endblock %}
|
||||
{% block sectiontitle %}Login{% endblock %}
|
||||
{% block content %}
|
||||
<div class="item">
|
||||
{% include 'local/_login_form.html' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
17
templates/local/profile.html
Normal file
17
templates/local/profile.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "profile_base.html" %}
|
||||
{% load minecraft %}
|
||||
{%block title%}{{user}}{%endblock%}
|
||||
|
||||
{% block sectiontitle %}{{user}}{%endblock%}
|
||||
|
||||
{%block content %}
|
||||
<div class="item">
|
||||
{% avatar user %}
|
||||
<a href="{%url local.views.edit %}">Edit profile</a>
|
||||
<a href="{%url local.views.invites %}">Invites</a>
|
||||
<ul>
|
||||
<li>Member Since: {{user.date_joined|date:"SHORT_DATE_FORMAT"}}</li>
|
||||
<li>Last seen: {{user.last_login|date:"SHORT_DATE_FORMAT"}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{%endblock%}
|
||||
12
templates/local/register.html
Normal file
12
templates/local/register.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "base_simple.html" %}
|
||||
{%block title%}Register an Account{%endblock%}
|
||||
|
||||
{%block content %}
|
||||
<form method="POST" action="{%url local.views.register %}">
|
||||
{% csrf_token %}
|
||||
{{profileForm.as_p}}
|
||||
{{userForm.as_p}}
|
||||
<input type="submit" value="Register!"/>
|
||||
</form>
|
||||
{%endblock%}
|
||||
|
||||
10
templates/local/show_invite.html
Normal file
10
templates/local/show_invite.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends 'base_simple.html' %}
|
||||
|
||||
{% block title %}Invite{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>To invite a friend to Caminus, simply share them this code, or link to this page:</p>
|
||||
<div id="invite-code">
|
||||
<input type="text" value="{{invite.code}}" onClick="this.select()"/>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user