Merge branch 'develop' into detailviews

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

View file

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

View file

@ -7,28 +7,26 @@
{% block content %} {% block content %}
{% load addclass %} {% load addclass %}
<div class="container main-content mt-4" id="main-copy"> <div class="row">
<div class="row"> <div class="col">
<div class="col"> <div class="card">
<div class="card mt-3"> <div class="card-body">
<div class="card-body"> <h1 class="card-title">{{ view.page_title }}</h1>
<h1 class="card-title">{{ view.page_title }}</h1> <hr />
<hr />
{% for object in object_list %} {% for object in object_list %}
<div class="media mb-4"> <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> <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"> <div class="media-body">
<p class="float-right ml-2">{{ object.db_date_created }} <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_delete_url }}">Delete</a>
<br /><a href="{{ object.web_get_update_url }}">Edit</a></p> <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> <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> <p>{{ object.db.desc }}</p>
</div>
</div> </div>
{% endfor %} </div>
{% endfor %}
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -6,7 +6,7 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<div class="card"> <div class="card">
<div class="card-block"> <div class="card-block p-4">
<h1 class="card-title">Admin</h1> <h1 class="card-title">Admin</h1>
<p class="card-text"> <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. 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 %} {% if page_obj %}
<div class="container main-content mt-2" id="pagination"> <div class="row">
<div class="row"> <div class="col">
<div class="col"> <div class="card mt-3">
<div class="card mt-3"> <div class="card-body">
<div class="card-body"> <!-- Pagination -->
<!-- Pagination --> <ul class="pagination justify-content-center mb-0">
<ul class="pagination justify-content-center mb-0"> <li class="page-item {% if page_obj.has_previous %}{% else %}disabled{% endif %}">
<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">
<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 aria-hidden="true">&laquo;</span> <span class="sr-only">Previous</span>
<span class="sr-only">Previous</span> </a>
</a> </li>
</li>
{% for l in page_obj.paginator.page_range %} {% for l in page_obj.paginator.page_range %}
{% if l <= page_obj.number|add:5 and l >= page_obj.number|add:-5 %} {% 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> <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 %} {% endif %}
{% endfor %} {% endfor %}
<li class="page-item {% if page_obj.has_next %}{% else %}disabled{% endif %}"> <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"> <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 aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
</a> </a>
</li> </li>
</ul> </ul>
</div>
</div> </div>
</div> </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 %} {% block content %}
{% load addclass %} {% load addclass %}
<div class="container main-content mt-4" id="main-copy">
<div class="row"> <div class="row">
<div class="col-lg-6 offset-lg-3 col-sm-12"> <div class="col-lg-6 offset-lg-3 col-sm-12">
<div class="card mt-3"> <div class="card">
<div class="card-body"> <div class="card-body">
<h1 class="card-title">Password Change</h1> <h1 class="card-title">Password Change</h1>
<hr /> <hr />

View file

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