Move templates and fix namespacing

Move base template

    Refactor services urls and templates

    Refactor groupmanagement urls and templates

    Refactor notifications urls and templates
This commit is contained in:
Basraah
2017-09-23 06:48:51 +10:00
parent b130cc6c8e
commit 7beec38881
110 changed files with 468 additions and 457 deletions

View File

@@ -0,0 +1,34 @@
{% extends "allianceauth/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Fleet Formatter Tool" %}{% endblock page_title %}
{% block extra_css %}{% endblock extra_css %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% trans "Fleet Broadcast Formatter Tool" %}</h1>
<div class="container-fluid">
<div class="col-md-6 col-md-offset-3">
<div class="row">
{% if generated != "" %}
<textarea class="form-control" rows="10" cols="60">{{ generated }}
</textarea>
{% endif %}
<form class="form-signin" role="form" action="" method="POST">
{% csrf_token %}
{{ form|bootstrap }}
<br/>
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans "Format" %}</button>
<br/>
</form>
</div>
</div>
</div>
</div>
{% endblock content %}

View File

@@ -0,0 +1,24 @@
{% extends "allianceauth/base.html" %}
{% load staticfiles %}
{% load i18n %}
{% block page_title %}Credentials{% endblock page_title %}
{% block title %}{% trans "Credentials" %}{% endblock title%}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% blocktrans %}{{ service }} Credentials{% endblocktrans %}</h1>
<div class="container-fluid">
<div class="col-lg-4 col-lg-offset-4">
<form class="form-signin">
{% for key, value in credentials.items %}
<div class="form-group">
<label class="control-label" for="id_{{ key }}">{{ key|capfirst }}</label>
<input class="form-control" value="{{ value }}" readonly>
</div>
{% endfor %}
</form>
<a href="{% url 'services:services' %}" class="btn btn-lg btn-block btn-primary" title="Continue">{% trans "Continue" %}</a>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,29 @@
{% extends "allianceauth/base.html" %}
{% load bootstrap %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Service Password Change" %}{% endblock page_title %}
{% block extra_css %}{% endblock extra_css %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% blocktrans %}Set {{service}} Password{% endblocktrans %}</h1>
<div class="container-fluid">
<div class="col-md-4 col-md-offset-4">
<div class="row">
<form class="form-signin" role="form" action="" method="POST"
onsubmit="submitbutton.disabled = true; return true;">
{% csrf_token %}
{{ form|bootstrap }}
<br/>
<button class="btn btn-lg btn-primary btn-block" name="submitbutton" type="submit">{% trans "Set Password" %}</button>
</form>
</div>
</div>
</div>
</div>
{% endblock content %}

View File

@@ -0,0 +1,26 @@
{% extends "allianceauth/base.html" %}
{% load staticfiles %}
{% load i18n %}
{% block title %}Alliance Auth{% endblock %}
{% block page_title %}{% trans "Services Management" %}{% endblock page_title %}
{% block extra_css %}{% endblock extra_css %}
{% block content %}
<div class="col-lg-12">
<h1 class="page-header text-center">{% trans "Available Services" %}</h1>
<table class="table table-hover">
<tr>
<th class="text-center">{% trans "Service" %}</th>
<th class="text-center">{% trans "Username" %}</th>
<th class="text-center">{% trans "Domain" %}</th>
<th class="text-center">{% trans "Action" %}</th>
</tr>
{% for svc in service_ctrls %}
{{ svc }}
{% endfor %}
</table>
</div>
{% endblock content %}

View File

@@ -0,0 +1,32 @@
{% load i18n %}
<tr>
<td class="text-center">{{ service_name }}</td>
<td class="text-center">{{ username }}</td>
<td class="text-center"><a href="{{ service_url }}">{{ service_url }}</a></td>
<td class="text-center">
{% ifequal username "" %}
{% if urls.auth_activate %}
<a href="{% url urls.auth_activate %}" title="Activate" class="btn btn-warning">
<span class="glyphicon glyphicon-ok"></span>
</a>
{% endif %}
{% else %}
{% if urls.auth_set_password %}
<a href="{% url urls.auth_set_password %}" title="Set Password" class="btn btn-warning">
<span class="glyphicon glyphicon-pencil"></span>
</a>
{% endif %}
{% if urls.auth_reset_password %}
<a href="{% url urls.auth_reset_password %}" title="Reset Password" class="btn btn-primary">
<span class="glyphicon glyphicon-refresh"></span>
</a>
{% endif %}
{% if urls.auth_deactivate %}
<a href="{% url urls.auth_deactivate %}" title="Deactivate" class="btn btn-danger">
<span class="glyphicon glyphicon-remove"></span>
</a>
{% endif %}
{% endifequal %}
</td>
</tr>