Commit 8cf1ad82 authored by Claude Paroz's avatar Claude Paroz

Add access to help page for vertimus action help (refs #650562)

parent c97b8e4c
......@@ -22,8 +22,9 @@ from django.conf import settings
from django.contrib.auth import login, authenticate, logout
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render
from django.template.loader import get_template, TemplateDoesNotExist
from django.utils.translation import ugettext as _
from people.models import Person
......@@ -119,3 +120,11 @@ def activate_account(request, key):
person.activate()
messages.success(request, _("Your account has been activated."))
return site_login(request)
def help(request, topic):
template = 'help/%s.html' % topic
try:
t = get_template(template)
except TemplateDoesNotExist:
raise Http404
return render(request, template, {})
This diff is collapsed.
......@@ -2,6 +2,10 @@ body {
direction: rtl;
}
.float_right {
float:left;
}
.stats th {
text-align: right;
padding-right: 2px;
......
......@@ -133,3 +133,6 @@ h1 {
width: 33.3%
}
.float_right {
float:right;
}
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans "Help" %}{% endblock %}
{% block content %}
<div class="mainpage">
<p>
{% trans "The figure below describes the various states and actions available during the translation process of a module." %}
</p>
<img src="{{ MEDIA_URL }}img/workflow-translation.png">
</div>
{% endblock %}
......@@ -180,6 +180,9 @@ $(document).ready(function() {
{% endif %}
{% if level == 0 %}
<div class="float_right">
<a href="{% url help 'vertimus_workflow' %}"><img src="{{ MEDIA_URL }}img/help.png" alt="help icon"></a>
</div>
<h2>{% trans "New Action" %}</h2>
{% if action_form %}
......
......@@ -18,6 +18,10 @@ urlpatterns = patterns('',
regex = r'^register/$',
view = 'common.views.site_register',
name = 'register'),
url(
regex = r'^help/(?P<topic>\w+)/$',
view = 'common.views.help',
name = 'help'),
url(
regex = r'^register/success$',
view = TemplateView.as_view(template_name="registration/register_success.html"),
......
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