mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
CSS and templating, Sith begins to look nice
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
<head>
|
||||
{% block head %}
|
||||
<title>{% block title %}Bienvenue sur le Sith de l'AE!{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{{ static('core/base.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('core/form.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('core/style.css') }}">
|
||||
<script src="{{ static('core/script.js') }}"></script>
|
||||
<script src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
|
||||
@ -10,28 +12,24 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="logo"><a href="{{ url('core:index') }}"><img src="{{ static('core/img/logo.png') }}" alt="Logo" /></a></div>
|
||||
{% block header %}
|
||||
<header>
|
||||
{% block header %}
|
||||
{% if user.is_authenticated() %}Hello, {{ user.username }}!{% endif %}
|
||||
<ul>
|
||||
{% if not user.is_authenticated() %}
|
||||
<li><a href="{{ url('core:register') }}">Register</a></li>
|
||||
<li><a href="{{ url('core:login') }}">Login</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ url('core:logout') }}">Logout</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if user.is_authenticated() %}
|
||||
<ul>
|
||||
<li><a href="{{ url('core:user_profile', user_id=user.id) }}">Profile</a></li>
|
||||
<li><a href="{{ url('core:user_tools') }}">Tools</a></li>
|
||||
<li><a href="{{ url('core:user_list') }}">Users</a></li>
|
||||
<li><a href="{{ url('core:page', page_name="Index") }}">Pages</a></li>
|
||||
<li><a href="{{ url('club:club_list') }}">Clubs</a></li>
|
||||
</ul>
|
||||
{% if not user.is_authenticated() %}
|
||||
<a href="{{ url('core:register') }}">Register</a> |
|
||||
<a href="{{ url('core:login') }}">Login</a>
|
||||
{% else %}
|
||||
<a href="{{ url('core:user_profile', user_id=user.id) }}">{{ user.get_display_name() }}</a> |
|
||||
<a href="{{ url('core:user_tools') }}">Tools</a> |
|
||||
<a href="{{ url('core:logout') }}">Logout</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</header>
|
||||
{% endblock %}
|
||||
<nav>
|
||||
<a href="{{ url('core:user_list') }}">Users</a>
|
||||
<a href="{{ url('core:page', page_name="Index") }}">Pages</a>
|
||||
<a href="{{ url('club:club_list') }}">Clubs</a>
|
||||
</nav>
|
||||
|
||||
<div id="content">
|
||||
{% if error %}
|
||||
|
@ -11,13 +11,14 @@
|
||||
{% endif %}
|
||||
<p>You're seeing the page <strong>{{ page.get_display_name() }}</strong> -
|
||||
<a href="{{ url('core:page_hist', page_name=page.get_full_name()) }}">History</a></p>
|
||||
<hr>
|
||||
{% if rev %}
|
||||
<h4>This may not be the last update, you are seeing revision {{ rev.id }}!</h4>
|
||||
<h3>{{ rev.title }}</h3>
|
||||
<p>{{ rev.content|markdown }}</p>
|
||||
<div class="page_content">{{ rev.content|markdown }}</div>
|
||||
{% else %}
|
||||
<h3>{{ page.revisions.last().title }}</h3>
|
||||
<p>{{ page.revisions.last().content|markdown }}</p>
|
||||
<div class="page_content">{{ page.revisions.last().content|markdown }}</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -5,24 +5,25 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3>User Profile</h3>
|
||||
<p><a href="{{ url('core:user_list') }}">Back to list</a></p>
|
||||
|
||||
<ul>
|
||||
<div class="edit-bar">
|
||||
{% if can_edit(profile, request.user) or user.id == profile.id %}
|
||||
<li><a href="{{ url('core:user_edit', user_id=profile.id) }}">Edit</a></li>
|
||||
<a href="{{ url('core:user_edit', user_id=profile.id) }}">Edit</a>
|
||||
{% endif %}
|
||||
{% if can_edit_prop(profile, request.user) %}
|
||||
<li><a href="{{ url('core:user_prop', user_id=profile.id) }}">Props</a></li>
|
||||
<a href="{{ url('core:user_prop', user_id=profile.id) }}">Props</a>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
You're seeing the profile of <strong>{{ profile.get_full_name() }}</strong><br/>
|
||||
<strong>{{ profile.nick_name }}</strong><br/>
|
||||
<em>{{ profile.date_of_birth|date("d/m/Y") }}</em>
|
||||
</p>
|
||||
<h3>User Profile</h3>
|
||||
|
||||
<hr>
|
||||
<div class="user_profile">
|
||||
<h4>{{ profile.get_full_name() }}</h4>
|
||||
<p>{{ profile.nick_name }}</p>
|
||||
<p>Born: {{ profile.date_of_birth|date("d/m/Y") }}</p>
|
||||
</div>
|
||||
|
||||
{% if user.membership.filter(end_date=None).exists() %}
|
||||
<p>
|
||||
{% if get_subscriber(profile).is_subscribed() %}
|
||||
User is subscriber until {{ get_subscriber(profile).subscriptions.last().subscription_end }}
|
||||
@ -30,6 +31,7 @@ User is subscriber until {{ get_subscriber(profile).subscriptions.last().subscri
|
||||
User is not subscribed. <a href="{{ url('subscription:subscription') }}?member={{ profile.id }}">New subscription</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -7,7 +7,9 @@
|
||||
{{ form.as_p() }}
|
||||
<p><input type="submit" value="Update" /></p>
|
||||
</form>
|
||||
<p><a href="{{ url('core:password_change') }}">Change my password</a></p>
|
||||
{% if form.instance == user %}
|
||||
<p><a href="{{ url('core:password_change') }}">Change my password</a></p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
{% block content %}
|
||||
<h3>User Tools</h3>
|
||||
<p><a href="{{ url('core:user_profile', user_id=request.user.id) }}">Back to profile</a></p>
|
||||
|
||||
<h4>Sith management</h4>
|
||||
<ul>
|
||||
|
Reference in New Issue
Block a user