view MoinMoin/templates/usersettings.html @ 1013:57f6267eb050

title display: add some more, make it more consistent
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 29 Oct 2011 18:41:42 -0200
parents 82261b274b68
children ee71ed6e97c6 959fc2a35823
line wrap: on
line source
{% extends theme("layout.html") %}
{% import "forms.html" as forms %}

{% block item %}
{% if part == 'main' %}
<h1>{{ _("User Settings") }}</h1>
<ul>
    <li><a href="{{ url_for('frontend.usersettings', part='personal') }}">{{ _("Personal Settings") }}</a></li>
    <li><a href="{{ url_for('frontend.usersettings', part='password') }}">{{ _("Change password") }}</a></li>
    <li><a href="{{ url_for('frontend.usersettings', part='notification') }}">{{ _("Notification Settings") }}</a></li>
    <li><a href="{{ url_for('frontend.usersettings', part='ui') }}">{{ _("Wiki Appearance Settings") }}</a></li>
    <li><a href="{{ url_for('frontend.usersettings', part='navigation') }}">{{ _("Navigation Settings") }}</a></li>
    <li><a href="{{ url_for('frontend.usersettings', part='options') }}">{{ _("Options") }}</a></li>
</ul>

{% elif part == 'personal' %}
<h1>{{ _("Personal Settings") }}</h1>
<div class="moin-form">
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings', part=part)) }}
  {{ forms.render_errors(form) }}
  <dl>
    {{ forms.render_field(gen, form['name'], 'text') }}
    {{ forms.render_field(gen, form['aliasname'], 'text') }}
    {{ forms.render_field(gen, form['openid'], 'url') }}
    {{ forms.render_select(gen, form['timezone']) }}
    {{ forms.render_select(gen, form['locale']) }}
  </dl>
  {{ gen.input(form['submit'], type='submit') }}
{{ gen.form.close() }}
</div>

{% elif part == 'password' %}
<h1>{{ _("Change Password") }}</h1>
<div class="moin-form">
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings', part=part)) }}
  {{ forms.render_errors(form) }}
  <dl>
    {{ forms.render_field(gen, form['password_current'], 'password') }}
    {{ forms.render_field(gen, form['password1'], 'password') }}
    {{ forms.render_field(gen, form['password2'], 'password') }}
  </dl>
  {{ gen.input(form['submit'], type='submit') }}
{{ gen.form.close() }}
</div>

{% elif part == 'notification' %}
<h1>{{ _("Notification Settings") }}</h1>
<div class="moin-form">
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings', part=part)) }}
  {{ forms.render_errors(form) }}
  <dl>
    {{ forms.render_field(gen, form['email'], 'email') }}
  </dl>
  {{ gen.input(form['submit'], type='submit') }}
{{ gen.form.close() }}
</div>

{% elif part == 'ui' %}
<h1>{{ _("Wiki Appearance Settings") }}</h1>
<div class="moin-form">
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings', part=part)) }}
  {{ forms.render_errors(form) }}
  <dl>
    {{ forms.render_select(gen, form['theme_name']) }}
    {{ forms.render_field(gen, form['css_url'], 'url') }}
    {{ forms.render_field(gen, form['edit_rows'], 'text') }}
    {{ forms.render_field(gen, form['results_per_page'], 'number') }}
  </dl>
  {{ gen.input(form['submit'], type='submit') }}
{{ gen.form.close() }}
</div>

{% elif part == 'navigation' %}
<h1>{{ _("Navigation Settings") }}</h1>
<div class="moin-form">
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings', part=part)) }}
  {{ forms.render_errors(form) }}
  <dl>
    {# TODO: find a good way to handle quicklinks #}
  </dl>
  {{ gen.input(form['submit'], type='submit') }}
{{ gen.form.close() }}
</div>

{% elif part == 'options' %}
<h1>{{ _("Options") }}</h1>
<div class="moin-form">
{{ gen.form.open(form, method="post", action=url_for('frontend.usersettings', part=part)) }}
  {{ forms.render_errors(form) }}
  <dl>
    {{ forms.render_field(gen, form['mailto_author'], 'checkbox') }}
    {{ forms.render_field(gen, form['edit_on_doubleclick'], 'checkbox') }}
    {{ forms.render_field(gen, form['show_comments'], 'checkbox') }}
    {{ forms.render_field(gen, form['disabled'], 'checkbox') }}
  </dl>
  {{ gen.input(form['submit'], type='submit') }}
{{ gen.form.close() }}
</div>
{% endif %}
{% endblock %}