Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Keel - LDH Middleware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
26
Issues
26
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liberty
host
Keel - LDH Middleware
Commits
556b2ff3
Commit
556b2ff3
authored
Jun 23, 2017
by
David Seaward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* add title and byline to site settings (use on front page)
* standardise login/logout widget in templates
parent
bc535e62
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
36 deletions
+46
-36
ldapregister/jinja2/ldapregister/home.html
ldapregister/jinja2/ldapregister/home.html
+19
-15
ldapregister/templates/base.html
ldapregister/templates/base.html
+18
-16
ldapregister/templates/registration/login.html
ldapregister/templates/registration/login.html
+3
-2
ldapregister/templates/registration/logout.html
ldapregister/templates/registration/logout.html
+1
-3
ldapregister/views.py
ldapregister/views.py
+5
-0
No files found.
ldapregister/jinja2/ldapregister/home.html
View file @
556b2ff3
...
...
@@ -2,34 +2,38 @@
<html
lang=
"en"
>
<head>
<link
rel=
"stylesheet"
href=
"{% static 'PuristFlex.css' %}"
/>
<title>
Purist - Easy, secure communication for everyone
</title>
<title>
{{ site_title }} - {{ site_byline }}
</title>
<link
rel=
"icon"
sizes=
"960x960"
href=
"{% static 'favicon.png' %}"
>
<meta
name=
"application-name"
content=
"Purist"
>
</head>
<body
style=
"text-align: center"
>
{% if username %}
<p
style=
"text-align: right"
>
You are logged in as {{username}}.
<br
/>
<a
href=
"/accounts/logout/"
>
Log out
</a>
</p>
{% if username %}
{% trans "Your are logged in as" %} {{ username }}
<br/>
<a
href=
"{% url 'auth_password_change' %}"
>
{% trans "Change password" %}
</a><br/>
<a
href=
"{% url 'auth_logout' %}"
>
{% trans "Log out" %}
</a>
{% else %}
<p
style=
"text-align: right"
>
You are not logged in.
<br
/>
<a
href=
"/accounts/login/"
>
Log in
</a>
or
<a
href=
"/accounts/register/"
>
register
</a>
.
</p>
{% trans "You are not logged in." %}
<br/>
<a
href=
"{% url 'auth_login' %}"
>
{% trans "Log in" %}
</a>
{% trans "or" %}
<a
href=
"{% url 'registration_register' %}"
>
{% trans "register" %}
</a>
{% endif %}
</p>
<h1><img
style=
"max-height:
30%; max-width: 50%"
src=
"{% static 'logo.png' %}"
alt=
"Purist
"
/></h1>
<h1><img
style=
"max-height:
40vh; max-width: 40vw"
src=
"{% static 'logo.png' %}"
alt=
"{{ site_title }}
"
/></h1>
<p>
Easy, secure communication for everyone
</p>
<p>
{{ site_byline }}
</p>
<p><a
href=
"https://plan.puri.st"
>
plan
</a>
|
<a
href=
"https://code.puri.sm/purist"
>
code
</a>
|
<a
href=
"http://dev.comms.puri.st:8000"
>
test
</a>
|
<a
href=
"/admin/"
>
admin
</a></p>
<p>
<a
href=
"https://plan.puri.st"
>
plan
</a>
|
<a
href=
"https://code.puri.sm/purist"
>
code
</a>
|
<a
href=
"http://dev.comms.puri.st:8000"
>
test
</a>
|
<a
href=
"/admin/"
>
admin
</a>
</p>
<p
style=
"font-size: small"
>
Services provided by
<a
href=
"https://puri.sm"
>
Purism SPC
</a>
. Stand-in logo from
<a
href=
"https://openclipart.org/detail/158443/kawaii-rainbow"
>
Openclipart
</a>
[CC0].
</p>
<p
style=
"font-size: small"
>
Services provided by
<a
href=
"https://puri.sm"
>
Purism SPC
</a>
. Stand-in logo from
<a
href=
"https://openclipart.org/detail/158443/kawaii-rainbow"
>
Openclipart
</a>
[CC0].
</p>
</body>
</html>
ldapregister/templates/base.html
View file @
556b2ff3
...
...
@@ -18,23 +18,25 @@
<body>
<header>
<a
href=
"{% url 'home_page' %}"
><img
class=
"logo"
src=
"{% static 'logo.png' %}"
alt=
"Purist"
/></a>
<div>
<h1>
{% block header %}Base{% endblock %}
</h1>
<!-- p></p -->
<p>
{% block byline %}Byline{% endblock %} |
{% if user.is_authenticated %}
{% trans "Logged in" %}: {{ user.username }}
(
<a
href=
"{% url 'auth_logout' %}"
>
{% trans "Log out" %}
</a>
|
<a
href=
"{% url 'auth_password_change' %}"
>
{% trans "Change password" %}
</a>
)
{% else %}
<a
href=
"{% url 'auth_login' %}"
>
{% trans "Log in" %}
</a>
{% endif %}
</p>
<header
style=
"justify-content: space-between;"
>
<div
id=
"title_box"
>
<a
href=
"{% url 'home_page' %}"
><img
class=
"logo"
src=
"{% static 'logo.png' %}"
alt=
"Purist"
/></a>
<div
id=
"title_text"
>
<h1>
{% block header %}Base{% endblock %}
</h1>
<p>
{% block byline %}Byline{% endblock %}
</p>
</div>
</div>
<div
id=
"log_state"
>
{% if user.is_authenticated %}
{% trans "Logged in as" %} {{ user.username }}
<br/>
<a
href=
"{% url 'auth_password_change' %}"
>
{% trans "Change password" %}
</a><br/>
<a
href=
"{% url 'auth_logout' %}"
>
{% trans "Log out" %}
</a>
{% else %}
{% trans "You are not logged in." %}
<br/>
<a
href=
"{% url 'auth_login' %}"
>
{% trans "Log in" %}
</a>
{% trans "or" %}
<a
href=
"{% url 'registration_register' %}"
>
{% trans "register" %}
</a>
{% endif %}
</div>
</header>
...
...
ldapregister/templates/registration/login.html
View file @
556b2ff3
...
...
@@ -21,6 +21,7 @@
</section>
</main>
<p
class=
"text-center"
>
{% trans "No account yet?" %}
<a
href=
"{% url 'registration_register' %}"
>
{% trans "Register!"
%}
</a></p>
<p
class=
"text-center"
>
{% trans "No account yet?" %}
<a
href=
"{% url 'registration_register' %}"
>
{% trans "Register!" %}
</a>
</p>
{% endblock %}
ldapregister/templates/registration/logout.html
View file @
556b2ff3
...
...
@@ -4,9 +4,7 @@
{% block title %}{% trans 'Log out' %}{% endblock %}
{% block header %}{% trans 'Log out' %}{% endblock %}
{% block byline %}{% endblock %}
{% block byline %}{%
trans 'You have been logged out' %}{%
endblock %}
{% block content %}
<br/>
<p>
{% trans "You have been logged out" %}
</p>
{% endblock %}
ldapregister/views.py
View file @
556b2ff3
from
django.shortcuts
import
render
# from registration.backends.simple.views import
from
purist_account
import
settings
def
home_page
(
request
):
render_data
=
{
"username"
:
request
.
user
.
get_username
(),
"site_title"
:
settings
.
SITE_TITLE
,
"site_byline"
:
settings
.
SITE_BYLINE
,
}
return
render
(
request
,
'ldapregister/home.html'
,
render_data
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment