Commit 7beefa53 authored by Valentin Samir's avatar Valentin Samir

Template factorisation

parent 9df1cd2e
{% extends 'bootstrap3/bootstrap3.html' %}
{% block bootstrap3_title %}{% block title %}{% endblock %}{% endblock %}
{% load url from future %}
{% load staticfiles %}
{% load bootstrap3 %}
{% block bootstrap3_extra_head %}
<link rel="shortcut icon" href="/static/cas_server/favicon.ico?v=1" />
<link href="{% static "cas_server/login.css" %}" rel="stylesheet">
{% endblock %}
{% block bootstrap3_content %}
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
{% bootstrap_messages %}
{% block content %}
{% endblock %}
</div>
<div class="col-md-3"></div>
</div>
</div> <!-- /container -->
{% endblock %}
......@@ -2,20 +2,8 @@
{% load bootstrap3 %}
{% load staticfiles %}
{% load i18n %}
{% block bootstrap3_extra_head %}
<link href="{% static "cas_server/login.css" %}" rel="stylesheet">
{% endblock %}
{% block bootstrap3_content %}
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
{% bootstrap_messages %}
{% block content %}
<div class="alert alert-success" role="alert">{% trans "Logged" %}</div>
{% bootstrap_button _('Logout') size='lg' button_class="btn-danger btn-block" href="logout" %}
</div>
<div class="col-md-3"></div>
</div>
</div> <!-- /container -->
{% endblock %}
......@@ -2,24 +2,12 @@
{% load bootstrap3 %}
{% load staticfiles %}
{% load i18n %}
{% block bootstrap3_extra_head %}
<link href="{% static "cas_server/login.css" %}" rel="stylesheet">
{% endblock %}
{% block bootstrap3_content %}
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
{% bootstrap_messages %}
{% block content %}
<form class="form-signin" method="post">
<h2 class="form-signin-heading">{% trans "Please loggin" %}</h2>
{% csrf_token %}
{% bootstrap_form form %}
{% bootstrap_button _('Login') size='lg' button_type="submit" button_class="btn-primary btn-block"%}
</form>
</div>
<div class="col-md-3"></div>
</div>
</div> <!-- /container -->
{% endblock %}
......@@ -2,19 +2,7 @@
{% load bootstrap3 %}
{% load staticfiles %}
{% load i18n %}
{% block bootstrap3_extra_head %}
<link href="{% static "cas_server/login.css" %}" rel="stylesheet">
{% endblock %}
{% block bootstrap3_content %}
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
{% bootstrap_messages %}
{% block content %}
<div class="alert alert-success" role="alert">{% trans "Successfully logout" %}</div>
</div>
<div class="col-md-3"></div>
</div>
</div> <!-- /container -->
{% endblock %}
......@@ -2,19 +2,8 @@
{% load bootstrap3 %}
{% load staticfiles %}
{% load i18n %}
{% block bootstrap3_extra_head %}
<link href="{% static "cas_server/login.css" %}" rel="stylesheet">
{% endblock %}
{% block bootstrap3_content %}
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
{% bootstrap_messages %}
{% block content %}
{% bootstrap_button _('Connect to the service') size='lg' button_class="btn-primary btn-block" href=service_ticket_url %}
</div>
<div class="col-md-3"></div>
</div>
</div> <!-- /container -->
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment