Merge branch 'develop' into detailviews

This commit is contained in:
Johnny 2018-10-26 18:40:51 +00:00
commit 11c8eef4e4
7 changed files with 77 additions and 55 deletions

View file

@ -7,10 +7,10 @@
{% block content %}
{% load addclass %}
<div class="container main-content mt-4" id="main-copy">
<div class="row">
<div class="col-lg-12 col-sm-12">
<div class="card mt-3">
<div class="col">
<div class="card">
<div class="card-body">
<h1 class="card-title">{{ view.page_title }}</h1>
<hr />
@ -47,5 +47,5 @@
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -7,28 +7,26 @@
{% block content %}
{% load addclass %}
<div class="container main-content mt-4" id="main-copy">
<div class="row">
<div class="col">
<div class="card mt-3">
<div class="card-body">
<h1 class="card-title">{{ view.page_title }}</h1>
<hr />
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<h1 class="card-title">{{ view.page_title }}</h1>
<hr />
{% for object in object_list %}
<div class="media mb-4">
<a href="{{ object.web_get_detail_url }}"><img class="d-flex mr-3" src="http://placehold.jp/50x50.png" alt="" /></a>
<div class="media-body">
<p class="float-right ml-2">{{ object.db_date_created }}
<br /><a href="{{ object.web_get_delete_url }}">Delete</a>
<br /><a href="{{ object.web_get_update_url }}">Edit</a></p>
<h5 class="mt-0"><a href="{{ object.web_get_detail_url }}">{{ object }}</a> {% if object.subtitle %}<small class="text-muted" style="white-space:nowrap;">{{ object.subtitle }}</small>{% endif %}</h5>
<p>{{ object.db.desc }}</p>
</div>
{% for object in object_list %}
<div class="media mb-4">
<a href="{{ object.web_get_detail_url }}"><img class="d-flex mr-3" src="http://placehold.jp/50x50.png" alt="" /></a>
<div class="media-body">
<p class="float-right ml-2">{{ object.db_date_created }}
<br /><a href="{{ object.web_get_delete_url }}">Delete</a>
<br /><a href="{{ object.web_get_update_url }}">Edit</a></p>
<h5 class="mt-0"><a href="{{ object.web_get_detail_url }}">{{ object }}</a> {% if object.subtitle %}<small class="text-muted" style="white-space:nowrap;">{{ object.subtitle }}</small>{% endif %}</h5>
<p>{{ object.db.desc }}</p>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
</div>

View file

@ -6,7 +6,7 @@
<div class="row">
<div class="col">
<div class="card">
<div class="card-block">
<div class="card-block p-4">
<h1 class="card-title">Admin</h1>
<p class="card-text">
Welcome to the Evennia Admin Page. Here, you can edit many facets of accounts, characters, and other parts of the game.

View file

@ -1,32 +1,30 @@
{% if page_obj %}
<div class="container main-content mt-2" id="pagination">
<div class="row">
<div class="col">
<div class="card mt-3">
<div class="card-body">
<!-- Pagination -->
<ul class="pagination justify-content-center mb-0">
<li class="page-item {% if page_obj.has_previous %}{% else %}disabled{% endif %}">
<a class="page-link" href="{% if page_obj.has_previous %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.previous_page_number }}{% endif %}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
<div class="row">
<div class="col">
<div class="card mt-3">
<div class="card-body">
<!-- Pagination -->
<ul class="pagination justify-content-center mb-0">
<li class="page-item {% if page_obj.has_previous %}{% else %}disabled{% endif %}">
<a class="page-link" href="{% if page_obj.has_previous %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.previous_page_number }}{% endif %}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
{% for l in page_obj.paginator.page_range %}
{% if l <= page_obj.number|add:5 and l >= page_obj.number|add:-5 %}
<li class="page-item {% if forloop.counter == page_obj.number %}active{% endif %}"><a class="page-link" href="?{% if q %}q={{ q }}&{% endif %}page={{ forloop.counter }}">{{ forloop.counter }}</a></li>
{% endif %}
{% endfor %}
{% for l in page_obj.paginator.page_range %}
{% if l <= page_obj.number|add:5 and l >= page_obj.number|add:-5 %}
<li class="page-item {% if forloop.counter == page_obj.number %}active{% endif %}"><a class="page-link" href="?{% if q %}q={{ q }}&{% endif %}page={{ forloop.counter }}">{{ forloop.counter }}</a></li>
{% endif %}
{% endfor %}
<li class="page-item {% if page_obj.has_next %}{% else %}disabled{% endif %}">
<a class="page-link" href="{% if page_obj.has_next %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.next_page_number }}{% endif %}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
</div>
<li class="page-item {% if page_obj.has_next %}{% else %}disabled{% endif %}">
<a class="page-link" href="{% if page_obj.has_next %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.next_page_number }}{% endif %}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
</div>
</div>
</div>

View file

@ -0,0 +1,27 @@
{% extends "base.html" %}
{% block titleblock %}
Password Changed
{% endblock %}
{% block body %}
{% load addclass %}
<div class="container main-content mt-4" id="main-copy">
<div class="row">
<div class="col-lg-5 offset-lg-3 col-sm-12">
<div class="card mt-3">
<div class="card-body">
<h1 class="card-title">Password Changed</h1>
<hr />
<p>Your password was changed.</p>
<p>Click <a href="{% url 'index' %}">here</a> to return to the index.</p>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -7,10 +7,9 @@ Password Change
{% block content %}
{% load addclass %}
<div class="container main-content mt-4" id="main-copy">
<div class="row">
<div class="col-lg-6 offset-lg-3 col-sm-12">
<div class="card mt-3">
<div class="card">
<div class="card-body">
<h1 class="card-title">Password Change</h1>
<hr />

View file

@ -369,7 +369,7 @@ class CharacterPuppetView(LoginRequiredMixin, CharacterMixin, RedirectView, Obje
def get_redirect_url(self, *args, **kwargs):
# Get the requested character, if it belongs to the authenticated user
char = self.get_object()
next = self.kwargs.get('next', self.success_url)
next = self.request.GET.get('next', self.success_url)
if char:
self.request.session['puppet'] = int(char.pk)