Adjusted new template for participant app. Added new generic form.
This commit is contained in:
parent
8da28310f7
commit
7c90206b3f
@ -1,30 +0,0 @@
|
|||||||
{% extends "base.html" %}
|
|
||||||
|
|
||||||
{% load tags %}
|
|
||||||
{% load i18n %}
|
|
||||||
{% load staticfiles %}
|
|
||||||
|
|
||||||
{% block submenu %}
|
|
||||||
{% url user_overview as url_users %}
|
|
||||||
{% url user_new as url_usernew %}
|
|
||||||
{% url user_group_overview as url_usergroups %}
|
|
||||||
{% url user_import as url_userimport %}
|
|
||||||
<h4 class="sectiontitle">{% trans "Participants" %}</h4>
|
|
||||||
<ul>
|
|
||||||
{% if perms.participant.can_see_participant %}
|
|
||||||
<li class="{% if request.path == url_users %}selected{% endif %}"><a href="{% url user_overview %}">{% trans "All participants" %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if perms.participant.can_manage_participant %}
|
|
||||||
<li class="{% active request url_usernew %}"><a href="{% url user_new %}">{% trans "New participant" %}</a></li>
|
|
||||||
<li class="{% if request.path == url_usergroups %}selected{% endif %}"><a href="{% url user_group_overview %}">{% trans "All user groups" %}</a></li>
|
|
||||||
<li class="{% active request '/participant/group/new' %}"><a href="{% url user_group_new %}">{% trans "New user group" %}</a></li>
|
|
||||||
<li class="{% if request.path == url_userimport %}selected{% endif %}"><a href="{% url user_import %}"> {% trans 'Import participants' %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if perms.participant.can_see_participant %}
|
|
||||||
<li><a href="{% url user_print %}"><img src="{% static 'images/icons/pdf.png' %}"> {% trans 'List of participants as PDF' %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if perms.participant.can_manage_participant %}
|
|
||||||
<li><a href="{% url print_passwords %}"><img src="{% static 'images/icons/pdf.png' %}"> {% trans 'First time passwords as PDF' %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
@ -7,16 +7,12 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "Participant settings" %}</h1>
|
<h1>{% trans "Participant settings" %}</h1>
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{% include "form.html" %}
|
||||||
<p>
|
<p>
|
||||||
<button class="button" type="submit">
|
{% include "formbuttons_save.html" %}
|
||||||
<span class="icon ok">{% trans 'Save' %}</span>
|
<a href='{% url config_application %}' class="btn">
|
||||||
</button>
|
{% trans 'Cancel' %}
|
||||||
<a href='{% url config_application %}'>
|
</a>
|
||||||
<button class="button" type="button" onclick="window.location='{% url config_application %}'">
|
</p>
|
||||||
<span class="icon cancel">{% trans 'Cancel' %}</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends "participant/base_participant.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
@ -11,33 +11,30 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if edit_user %}
|
<h1>
|
||||||
<h1>{% trans "Edit participant" %}</h1>
|
{% if edit_user %}
|
||||||
{% else %}
|
{% trans "Edit participant" %}
|
||||||
<h1>{% trans "New participant" %}</h1>
|
{% else %}
|
||||||
{% endif %}
|
{% trans "New participant" %}
|
||||||
|
{% endif %}
|
||||||
|
<small class="pull-right">
|
||||||
|
<a href="{% url user_overview %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
|
||||||
|
</small>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{% include "form.html" %}
|
||||||
{% if edit_user %}
|
{% if edit_user %}
|
||||||
<p>
|
<p>
|
||||||
<a href="{% url user_reset_password edit_user.id %}">{% trans 'Reset to First Password' %}</a>
|
<a href="{% url user_reset_password edit_user.id %}">{% trans 'Reset to First Password' %}</a>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p>
|
<p>
|
||||||
<button class="button" type="submit">
|
{% include "formbuttons_saveapply.html" %}
|
||||||
<span class="icon ok">{% trans 'Save' %}</span>
|
<a href='{% url user_overview %}' class="btn">
|
||||||
</button>
|
{% trans 'Cancel' %}
|
||||||
<button class="button" type="submit" name="apply">
|
</a>
|
||||||
<span class="icon apply">{% trans 'Apply' %}</span>
|
|
||||||
</button>
|
|
||||||
<a href='{% url user_overview %}'>
|
|
||||||
<button class="button" type="button" onclick="window.location='{% url user_overview %}'">
|
|
||||||
<span class="icon cancel">{% trans 'Cancel' %}</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</p>
|
</p>
|
||||||
<small>* {% trans "required" %}</small>
|
<small>* {% trans "required" %}</small>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends "participant/base_participant.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
@ -12,25 +12,23 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<h1>
|
||||||
{% if group %}
|
{% if group %}
|
||||||
<h1>{% trans "Edit user group" %}</h1>
|
{% trans "Edit user group" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>{% trans "New user group" %}</h1>
|
{% trans "New user group" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<small class="pull-right">
|
||||||
|
<a href="{% url user_group_overview %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
|
||||||
|
</small>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{% include "form.html" %}
|
||||||
<p>
|
<p>
|
||||||
<button class="button" type="submit">
|
{% include "formbuttons_saveapply.html" %}
|
||||||
<span class="icon ok">{% trans 'Save' %}</span>
|
<a href='{% url user_group_overview %}' class="btn">
|
||||||
</button>
|
{% trans 'Cancel' %}
|
||||||
<button class="button" type="submit" name="apply">
|
|
||||||
<span class="icon apply">{% trans 'Apply' %}</span>
|
|
||||||
</button>
|
|
||||||
<a href='{% url user_group_overview %}'>
|
|
||||||
<button class="button" type="button" onclick="window.location='{% url user_group_overview %}'">
|
|
||||||
<span class="icon cancel">{% trans 'Cancel' %}</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<small>* {% trans "required" %}</small>
|
<small>* {% trans "required" %}</small>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends "participant/base_participant.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
@ -6,8 +6,14 @@
|
|||||||
{% block title %}{{ block.super }} – {% trans "User groups" %}{% endblock %}
|
{% block title %}{{ block.super }} – {% trans "User groups" %}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "User groups" %}</h1>
|
<h1>{% trans "User groups" %}
|
||||||
<table>
|
<small class="pull-right">
|
||||||
|
<a href="{% url user_group_new %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'New user group' %}"><i class="icon-plus"></i> {% trans "New" %}</a>
|
||||||
|
<a href="{% url user_overview %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Participants" %}</a>
|
||||||
|
</small>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<table class="table table-striped table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "User Group" %}</th>
|
<th>{% trans "User Group" %}</th>
|
||||||
<th>{% trans "Actions" %}</th>
|
<th>{% trans "Actions" %}</th>
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
{% extends "participant/base_participant.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}{{ block.super }} – {% trans "Import participants" %} {% endblock %}
|
{% block title %}{{ block.super }} – {% trans "Import participants" %} {% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans 'Import participants' %}</h1>
|
<h1>
|
||||||
|
{% trans 'Import participants' %}
|
||||||
|
<small class="pull-right">
|
||||||
|
<a href="{% url user_overview %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
|
||||||
|
</small>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<p>{% trans 'Select a CSV file to import participants!' %}</p>
|
<p>{% trans 'Select a CSV file to import participants!' %}</p>
|
||||||
|
|
||||||
<p>{% trans 'Required comma separated values: <code>{first_name, last_name, gender, group, type, committee, comment}</code>' %}
|
<p>{% trans 'Required comma separated values: <code>{first_name, last_name, gender, group, type, committee, comment}</code>' %}
|
||||||
@ -17,15 +23,13 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form enctype="multipart/form-data" action="" method="post">{% csrf_token %}
|
<form enctype="multipart/form-data" action="" method="post">{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{% include "form.html" %}
|
||||||
<p>
|
<p>
|
||||||
<button class="button" type="submit">
|
<button class="btn btn-primary" type="submit">
|
||||||
<span class="icon import">{% trans 'Import' %}</span>
|
<span class="icon import">{% trans 'Import' %}</span>
|
||||||
</button>
|
</button>
|
||||||
<a href="{% url user_overview%}">
|
<a href="{% url user_overview%}" class="btn">
|
||||||
<button class="button" type="button" onclick="window.location='{% url user_overview %}'">
|
{% trans 'Cancel' %}
|
||||||
<span class="icon cancel">{% trans 'Cancel' %}</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<small>* {% trans "required" %}</small>
|
<small>* {% trans "required" %}</small>
|
||||||
|
@ -1,17 +1,8 @@
|
|||||||
{% extends "participant/base_participant.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
|
|
||||||
{% block mainmenu %}
|
|
||||||
<ul>
|
|
||||||
<li class="selected"><a href="{% url user_login %}" title="">{% trans "Login" %}</a></li>
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block submenu %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "Login" %}</h1>
|
<h1>{% trans "Login" %}</h1>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends "participant/base_participant.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
@ -7,7 +7,7 @@
|
|||||||
{% block title %}{{ block.super }} – {% trans "Participants" %}{% endblock %}
|
{% block title %}{{ block.super }} – {% trans "Participants" %}{% endblock %}
|
||||||
|
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{% if perms.agenda.can_manage_agenda %}
|
{% if perms.participant.can_manage_participant %}
|
||||||
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/participant.css' %}" />
|
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/participant.css' %}" />
|
||||||
<script type="text/javascript" src="{% static 'javascript/participant.js' %}"></script>
|
<script type="text/javascript" src="{% static 'javascript/participant.js' %}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -15,75 +15,111 @@
|
|||||||
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "Participants" %}</h1>
|
<h1>{% trans "Participants" %}
|
||||||
|
<small class="pull-right">
|
||||||
|
<div class="btn-toolbar">
|
||||||
|
{% if perms.participant.can_manage_participant %}
|
||||||
|
<a href="{% url user_new %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'New participant' %}"><i class="icon-plus"></i> {% trans "New" %}</a>
|
||||||
|
<a href="{% url user_group_overview %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'All user groups' %}"><i class="icon-user"></i> {% trans "User groups" %}</a>
|
||||||
|
<a href="{% url user_import %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Import participants' %}"><i class="icon-share-alt"></i> {% trans 'Import' %}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.participant.can_see_participant and perms.participant.can_manage_participant %}
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<a href="#" data-toggle="dropdown" class="btn btn-mini dropdown-toggle">
|
||||||
|
<i class="icon-print"></i> Print as PDF
|
||||||
|
<span class="caret"></span>
|
||||||
|
</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
{% url user_settings as url_usersettings %}
|
||||||
|
<li><a href="{% url user_print %}"><i class="icon-list"></i> {% trans 'List of participants' %}</a></li>
|
||||||
|
<li><a href="{% url print_passwords %}"><i class="icon-th-large"></i> {% trans 'First time passwords' %}</a></li>
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
<a href="{% url user_login %}" class="btn">{% trans "Login" %}</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
{% if perms.participant.can_see_participant %}
|
||||||
|
<a href="{% url user_print %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Print list of participants as PDF' %}"><i class="icon-print"></i> PDF</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if perms.participant.can_manage_participant %}
|
||||||
|
<a href="{% url print_passwords %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Print first time passwords as PDF' %}"><i class="icon-print"></i> PDF</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</small>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<p>
|
<form action="" name="filter" method="get">
|
||||||
<form action="" name="filter" method="get">
|
{% trans "Filter" %}:
|
||||||
{% trans "Filter" %}:
|
<div class="control-group">
|
||||||
<select class="default-input" name="gender" onchange="document.forms['filter'].submit()">
|
<select class="span2" name="gender" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {% trans "Gender" %} --</option>
|
<option value="---">-- {% trans "Gender" %} --</option>
|
||||||
<option value="male"{% if 'male' in sortfilter.gender %} selected{% endif %}>{% trans "Male" %}</option>
|
<option value="male"{% if 'male' in sortfilter.gender %} selected{% endif %}>{% trans "Male" %}</option>
|
||||||
<option value="female"{% if 'female' in sortfilter.gender %} selected{% endif %}>{% trans "Female" %}</option>
|
<option value="female"{% if 'female' in sortfilter.gender %} selected{% endif %}>{% trans "Female" %}</option>
|
||||||
<option value=""{% if '' in sortfilter.gender %} selected{% endif %}>{% trans "Not specified" %}</option>
|
<option value=""{% if '' in sortfilter.gender %} selected{% endif %}>{% trans "Not specified" %}</option>
|
||||||
</select>
|
</select>
|
||||||
<select class="default-input" name="category" onchange="document.forms['filter'].submit()">
|
<select class="span2" name="category" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {% trans "Category" %} --</option>
|
<option value="---">-- {% trans "Category" %} --</option>
|
||||||
{% for category in categories %}
|
{% for category in categories %}
|
||||||
<option value="{{ category }}"{% if category in sortfilter.category %} selected{% endif %}>
|
<option value="{{ category }}"{% if category in sortfilter.category %} selected{% endif %}>
|
||||||
{{ category }}</option>
|
{{ category }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<select class="default-input" name="type" onchange="document.forms['filter'].submit()">
|
<select class="span2" name="type" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {% trans "Type" %} --</option>
|
<option value="---">-- {% trans "Type" %} --</option>
|
||||||
<option value="delegate"{% if 'delegate' in sortfilter.type %} selected{% endif %}>{% trans "Delegate" %}</option>
|
<option value="delegate"{% if 'delegate' in sortfilter.type %} selected{% endif %}>{% trans "Delegate" %}</option>
|
||||||
<option value="observer"{% if 'observer' in sortfilter.type %} selected{% endif %}>{% trans "Observer" %}</option>
|
<option value="observer"{% if 'observer' in sortfilter.type %} selected{% endif %}>{% trans "Observer" %}</option>
|
||||||
<option value="staff"{% if 'staff' in sortfilter.type %} selected{% endif %}>{% trans "Staff" %}</option>
|
<option value="staff"{% if 'staff' in sortfilter.type %} selected{% endif %}>{% trans "Staff" %}</option>
|
||||||
<option value="guest"{% if 'guest' in sortfilter.type %} selected{% endif %}>{% trans "Guest" %}</option>
|
<option value="guest"{% if 'guest' in sortfilter.type %} selected{% endif %}>{% trans "Guest" %}</option>
|
||||||
<option value=""{% if '' in sortfilter.type %} selected{% endif %}>{% trans "Not specified" %}</option>
|
<option value=""{% if '' in sortfilter.type %} selected{% endif %}>{% trans "Not specified" %}</option>
|
||||||
</select>
|
</select>
|
||||||
<select class="default-input" name="committee" onchange="document.forms['filter'].submit()">
|
<select class="span2" name="committee" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {% trans "Committee" %} --</option>
|
<option value="---">-- {% trans "Committee" %} --</option>
|
||||||
{% for committee in committees %}
|
{% for committee in committees %}
|
||||||
<option value="{{ committee }}"{% if committee in sortfilter.committee %} selected{% endif %}>
|
<option value="{{ committee }}"{% if committee in sortfilter.committee %} selected{% endif %}>
|
||||||
{{ committee }}</option>
|
{{ committee }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<select class="default-input" name="status" onchange="document.forms['filter'].submit()">
|
<select class="span2" name="status" onchange="document.forms['filter'].submit()">
|
||||||
<option value="---">-- {% trans "Status" %} --</option>
|
<option value="---">-- {% trans "Status" %} --</option>
|
||||||
<option value="1"{% if '1' in sortfilter.status %} selected{% endif %}>{% trans "Active" %}</option>
|
<option value="1"{% if '1' in sortfilter.status %} selected{% endif %}>{% trans "Active" %}</option>
|
||||||
<option value="0"{% if '0' in sortfilter.status %} selected{% endif %}>{% trans "Inactive" %}</option>
|
<option value="0"{% if '0' in sortfilter.status %} selected{% endif %}>{% trans "Inactive" %}</option>
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</div>
|
||||||
</p>
|
</form>
|
||||||
|
<small><i>
|
||||||
{% if users.count == allusers %}
|
{% if users.count == allusers %}
|
||||||
{{ users.count }}
|
{{ users.count }}
|
||||||
{% blocktrans count counter=users.count %}participant{% plural %}participants{% endblocktrans %}
|
{% blocktrans count counter=users.count %}participant{% plural %}participants{% endblocktrans %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ users.count }} {% trans "of" %} {{ allusers }} {% trans "Participants" %} (= {{ percent }} %)
|
{{ users.count }} {% trans "of" %} {{ allusers }} {% trans "Participants" %} (= {{ percent }} %)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</i></small>
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<th><a href="?sort=first_name&reverse={% if 'first_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "First Name" %}</a></th>
|
<th><a href="?sort=first_name&reverse={% if 'first_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "First Name" %}</a></th>
|
||||||
<th><a href="?sort=last_name&reverse={% if 'last_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Last Name" %}</a></th>
|
<th><a href="?sort=last_name&reverse={% if 'last_name' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Last Name" %}</a></th>
|
||||||
<th><a href="?sort=group&reverse={% if 'category' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Category" %}</a></th>
|
<th class="optional"><a href="?sort=group&reverse={% if 'category' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Category" %}</a></th>
|
||||||
<th><a href="?sort=type&reverse={% if 'type' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Type" %}</a></th>
|
<th class="optional"><a href="?sort=type&reverse={% if 'type' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Type" %}</a></th>
|
||||||
<th><a href="?sort=committee&reverse={% if 'committee' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Committee" %}</a></th>
|
<th class="optional"><a href="?sort=committee&reverse={% if 'committee' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Committee" %}</a></th>
|
||||||
{% if perms.participant.can_manage_participant %}
|
{% if perms.participant.can_manage_participant %}
|
||||||
<th><a href="?sort=comment&reverse={% if 'comment' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Comment" %}</a></th>
|
<th class="optional"><a href="?sort=comment&reverse={% if 'comment' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Comment" %}</a></th>
|
||||||
<th><a href="?sort=last_login&reverse={% if 'last_login' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Last Login" %}</a></th>
|
<th class="optional"><a href="?sort=last_login&reverse={% if 'last_login' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Last Login" %}</a></th>
|
||||||
<th>{% trans "Actions" %}</th>
|
<th style="width: 1px;">{% trans "Actions" %}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% for user in users %}
|
{% for user in users %}
|
||||||
<tr class="{% cycle '' 'odd' %}">
|
<tr class="{% cycle '' 'odd' %}">
|
||||||
<td>{{ user.first_name }}</td>
|
<td>{{ user.first_name }}</td>
|
||||||
<td>{{ user.last_name }}</td>
|
<td>{{ user.last_name }}</td>
|
||||||
<td>{{ user.category }}</td>
|
<td class="optional">{{ user.category }}</td>
|
||||||
<td>{{ user.get_type_display }}</td>
|
<td class="optional">{{ user.get_type_display }}</td>
|
||||||
<td>{{ user.committee }}</td>
|
<td class="optional">{{ user.committee }}</td>
|
||||||
{% if perms.participant.can_manage_participant %}
|
{% if perms.participant.can_manage_participant %}
|
||||||
<td>{{ user.comment|first_line }}</td>
|
<td class="optional">{{ user.comment|first_line }}</td>
|
||||||
<td>
|
<td class="optional">
|
||||||
{% if user.last_login > user.date_joined %}
|
{% if user.last_login > user.date_joined %}
|
||||||
{{ user.last_login }}
|
{{ user.last_login }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -4,28 +4,11 @@
|
|||||||
|
|
||||||
{% block title %}{{ block.super }} – {% trans "Password Settings" %}{% endblock %}
|
{% block title %}{{ block.super }} – {% trans "Password Settings" %}{% endblock %}
|
||||||
|
|
||||||
{% block submenu %}
|
|
||||||
<h4 class="sectiontitle">{% trans "User Settings" %}</h4>
|
|
||||||
<ul>
|
|
||||||
<li><a href="{% url user_settings %}">{% trans "Personal Settings" %}</a></li>
|
|
||||||
<li class="selected"><a href="{% url password_change %}">{% trans "Password Settings" %}</a></li>
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "Password Settings" %}</h1>
|
<h1>{% trans "Password Settings" %}</h1>
|
||||||
|
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{% include "form.html" %}
|
||||||
|
{% include "formbuttons_save.html" %}
|
||||||
<button class="button" type="submit">
|
|
||||||
<span class="icon ok">{% trans 'Save' %}</span>
|
|
||||||
</button>
|
|
||||||
<a href=''>
|
|
||||||
<button class="button" type="button">
|
|
||||||
<span class="icon cancel">{% trans 'Cancel' %}</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</form>
|
</form>
|
||||||
<p></p>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -4,27 +4,11 @@
|
|||||||
|
|
||||||
{% block title %}{{ block.super }} – {% trans "Personal Settings" %}{% endblock %}
|
{% block title %}{{ block.super }} – {% trans "Personal Settings" %}{% endblock %}
|
||||||
|
|
||||||
{% block submenu %}
|
|
||||||
<h4 class="sectiontitle">{% trans "User Settings" %}</h4>
|
|
||||||
<ul>
|
|
||||||
<li class="selected"><a href="{% url user_settings %}">{% trans "Personal Settings" %}</a></li>
|
|
||||||
<li><a href="{% url password_change %}">{% trans "Password Settings" %}</a></li>
|
|
||||||
</ul>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>{% trans "Personal Settings" %}</h1>
|
<h1>{% trans "Personal Settings" %}</h1>
|
||||||
|
|
||||||
<form action="" method="post">{% csrf_token %}
|
<form action="" method="post">{% csrf_token %}
|
||||||
{{ form_user.as_p }}
|
{% include "form.html" %}
|
||||||
|
{% include "formbuttons_save.html" %}
|
||||||
<button class="button" type="submit">
|
|
||||||
<span class="icon ok">{% trans 'Save' %}</span>
|
|
||||||
</button>
|
|
||||||
<a href=''>
|
|
||||||
<button class="button" type="button">
|
|
||||||
<span class="icon cancel">{% trans 'Cancel' %}</span>
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -451,17 +451,17 @@ def user_settings(request):
|
|||||||
Edit own user account.
|
Edit own user account.
|
||||||
"""
|
"""
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form_user = UsersettingsForm(request.POST, instance=request.user)
|
form = UsersettingsForm(request.POST, instance=request.user)
|
||||||
if form_user.is_valid():
|
if form.is_valid():
|
||||||
form_user.save()
|
form.save()
|
||||||
messages.success(request, _('User settings successfully saved.'))
|
messages.success(request, _('User settings successfully saved.'))
|
||||||
else:
|
else:
|
||||||
messages.error(request, _('Please check the form for errors.'))
|
messages.error(request, _('Please check the form for errors.'))
|
||||||
else:
|
else:
|
||||||
form_user = UsersettingsForm(instance=request.user)
|
form = UsersettingsForm(instance=request.user)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'form_user': form_user,
|
'form': form,
|
||||||
'edituser': request.user,
|
'edituser': request.user,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,10 +49,11 @@ a:hover {
|
|||||||
|
|
||||||
/* show optional column */
|
/* show optional column */
|
||||||
.optional {
|
.optional {
|
||||||
display: block;
|
display: auto;
|
||||||
|
}
|
||||||
|
.help-inline {
|
||||||
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Left Menu */
|
/* Left Menu */
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
<li><a href="{% url user_logout %}"><i class="icon-off"></i> {% trans "Logout" %}</a></li>
|
<li><a href="{% url user_logout %}"><i class="icon-off"></i> {% trans "Logout" %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url user_login %}">{% trans "Login" %}</a>
|
<a href="{% url user_login %}" class="btn">{% trans "Login" %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div> <!--/#header-->
|
</div> <!--/#header-->
|
||||||
|
12
openslides/templates/form.html
Normal file
12
openslides/templates/form.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% for field in form %}
|
||||||
|
<div class="control-group{% if field.errors %} error{% endif%}">
|
||||||
|
<label for="id_{{ field.name }}">{{ field.label }}{% if field.field.required %}<span class="required">*</span>{% endif %}:</label>
|
||||||
|
{{ field }}
|
||||||
|
{% if field.errors %}
|
||||||
|
<span class="help-inline">{{ field.errors }}</span>
|
||||||
|
{% endif %}
|
||||||
|
{% if field.help_text %}
|
||||||
|
<span class="help-inline">{{ field.help_text }}</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
5
openslides/templates/formbuttons_save.html
Normal file
5
openslides/templates/formbuttons_save.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
<button class="btn btn-primary" type="submit">
|
||||||
|
{% trans 'Save' %}
|
||||||
|
</button>
|
8
openslides/templates/formbuttons_saveapply.html
Normal file
8
openslides/templates/formbuttons_saveapply.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
<button class="btn btn-primary" type="submit">
|
||||||
|
{% trans 'Save' %}
|
||||||
|
</button>
|
||||||
|
<button class="btn" type="submit" name="apply">
|
||||||
|
{% trans 'Apply' %}
|
||||||
|
</button>
|
Loading…
Reference in New Issue
Block a user