Commit 1d5a3385 authored by Robert's avatar Robert

Added basic help page

parent 4e32b088
......@@ -18,7 +18,7 @@
{% endblock %}
{% endspaceless %}</div>
{% include 'core/_claim.html' %}
{% include 'stadt/_page_meta.html' %}
{% block page_info %}{% endblock %}
</div>
</div>
</div>
......
<form method="post" data-component="publish" action="{{ action }}">
{% csrf_token %}
{% if form.author %}
<div class="disclaimer content-block">
<p>
Deine E-Mail-Adresse wird zusammen mit Deiner Nachricht dauerhaft gespeichert. Du erhältst Benachrichtungen für Antworten auf Deine Nachricht.
</p>
<p>Um die E-Mail-Adresse später zu löschen, <a href="{% url 'account_signup' %}">leg ein Benutzerkonto unter der E-Mail-Adresse an</a> und lösche es anschließend oder <a href="{% url 'create-group-conversation' about_group.pk %}">schreib uns eine Nachricht</a>.
</p>
</div>
{% field form.author %}
{% endif %}
{% field form.subject %}
{% field form.text %}
<button class="btn btn-primary" data-publish-submit>
Nachricht senden
</button>
</form>
......@@ -25,22 +25,5 @@
{% endblock %}
{% block content %}
<form method="post" data-component="publish">
{% csrf_token %}
{% if form.author %}
<div class="disclaimer content-block">
<p>
Deine E-Mail-Adresse wird zusammen mit Deiner Nachricht dauerhaft gespeichert. Du erhältst Benachrichtungen für Antworten auf Deine Nachricht.
</p>
<p>Um die E-Mail-Adresse später zu löschen, <a href="{% url 'account_signup' %}">leg ein Benutzerkonto unter der E-Mail-Adresse an</a> und lösche es anschließend oder <a href="{% url 'create-group-conversation' about_group.pk %}">schreib uns eine Nachricht</a>.
</p>
</div>
{% field form.author %}
{% endif %}
{% field form.subject %}
{% field form.text %}
<button class="btn btn-primary" data-publish-submit>
Nachricht senden
</button>
</form>
{% include 'conversations/_create_form.html' %}
{% endblock %}
<div class="page-info">
<div class="page-meta">
{{ num_groups }} Gruppen / {{ num_gestalten }} Gestalten / {{ num_contributions }} Beiträge
</div>
<div class="page-help">
<a href="{% url 'help' %}"><i class="sg sg-help"></i></a>
</div>
</div>
<div class="page-meta">
{{ num_groups }} Gruppen / {{ num_gestalten }} Gestalten / {{ num_contributions }} Beiträge
</div>
{% extends 'stadt/stadt.html' %}
{% block title %}Hilfe - {{ block.super }}{% endblock %}
{% block content_header %}
{% if STADTGESTALTEN_SHOW_HEADER %}
<header class="content-section-header">
{% include 'core/_heading.html' with title=about_group.name %}
</header>
{% if intro_text %}
<p>{{ intro_text }}</p>
{% endif %}
{% include 'stadt/_index_header.html' %}
{% endif %}
{% endblock %}
{% block heading_title %}
<h1 class="content-classification">Hilfe</h1>
<span class="decoration-icon sg-question" role="presentation"></span>
{% endblock %}
{% block content %}
{% if about_text %}
<article class="help-content-preview">
<a href="{{ about_text.get_absolute_url }}" class="content-preview-body">
<div class="content-preview-body-content">
<div class="help-content-image">
<img src="{{ about_text.container.image.preview_content.url }}">
</div>
<div class="content-preview-text">
<div class="content-preview-header">
<h3 class="content-title">Über {{ about_group }}</h3>
</div>
<p>Finde heraus, worum es hier geht.</p>
</div>
</div>
</a>
</article>
{% endif %}
{% if tools_text %}
<article class="help-content-preview">
<a href="{{ tools_text.get_absolute_url }}" class="content-preview-body">
<div class="content-preview-body-content">
<div class="help-content-image">
<img src="{{ tools_text.container.image.preview_content.url }}">
</div>
<div class="content-preview-text">
<div class="content-preview-header">
<h3 class="content-title">Werkzeuge im Detail</h3>
</div>
<p>Lies nach, welche Funktionen es gibt.</p>
</div>
</div>
</a>
</article>
{% endif %}
<article class="help-content-preview">
<a href="{% url 'markdown' %}" class="content-preview-body">
<div class="content-preview-body-content">
<div class="help-content-image">
<img src="">
</div>
<div class="content-preview-text">
<div class="content-preview-header">
<h3 class="content-title">Textformatierung</h3>
</div>
<p>So kannst Du Deine Texte gestalten.</p>
</div>
</div>
</a>
</article>
<header class="content-section-header">
{% include 'core/_heading.html' with title='Kontakt' icon='sg-message' %}
</header>
<p>Du findest Dich noch nicht zurecht oder hast Verbesserungsvorschläge? Schreib uns, wir helfen Dir gerne. Wir können auch telefonieren oder vorbeikommen.</p>
{% include 'conversations/_create_form.html' %}
<header class="content-section-header">
{% include 'core/_heading.html' with title='Mehr' icon='sg-more' %}
</header>
<ul>
<li>SG-Gruppe</li>
<li>Impressum</li>
<li>Datenschutz</li>
</ul>
{% endblock %}
......@@ -7,3 +7,7 @@
{% block menu %}
{% include 'stadt/_menu.html' %}
{% endblock %}
{% block page_info %}
{% include 'stadt/_page_info.html' %}
{% endblock %}
from django.urls import path
from django.conf.urls import url
from . import feeds, views
from features.stadt.views import Help
urlpatterns = [
url(
......@@ -18,6 +20,8 @@ urlpatterns = [
feeds.GroupFeed(),
name='group-feed'),
path('stadt/help/', Help.as_view(), name='help'),
url(
r'^stadt/privacy/$',
views.Privacy.as_view(),
......
......@@ -13,6 +13,7 @@ import core
from core.views import PermissionMixin
from features import gestalten, groups
from features.content import views as content
from features.conversations.views import CreateGroupConversation
from features.groups.models import Group
......@@ -49,6 +50,31 @@ class Entity(core.views.PermissionMixin, django.views.generic.View):
return self.view.has_permission()
class Help(CreateGroupConversation):
template_name = 'stadt/help.html'
def get_context_data(self, **kwargs):
intro = self.entity.associations.ordered_user_content(self.request.user) \
.filter(pinned=True).order_by('time_created')
intro_gallery = intro.filter_galleries().filter(public=True).first()
if intro_gallery:
intro = intro.exclude(pk=intro_gallery.pk)
about_text = intro.first()
tools_text = self.entity.associations.ordered_user_content(self.request.user) \
.filter(slug='tools').first()
if about_text:
kwargs['about_text'] = about_text
if tools_text and tools_text != about_text:
kwargs['tools_text'] = tools_text
kwargs['intro_text'] = settings.STADTGESTALTEN_INTRO_TEXT
kwargs['town_name'] = get_current_site(self.request).name.split()[-1]
return super().get_context_data(**kwargs)
def get_object(self):
self.entity = Group.objects.get(id=settings.ABOUT_GROUP_ID)
return self.entity
class Index(content.List):
template_name = 'stadt/index.html'
......
......@@ -76,3 +76,4 @@
@import "components/keystroke";
@import "components/conversation";
@import "components/campaign";
@import "components/help";
.help-content-image {
&:extend(.content-image);
width: 75px;
}
.help-content-preview {
&:extend(.content-preview all);
margin-bottom: 1rem;
}
......@@ -72,6 +72,7 @@
.sg-icon(marker, @fa-var-map-marker);
.sg-icon(dots, @fa-var-ellipsis-h);
.sg-icon(question, @fa-var-question-circle);
.sg-icon(help, @fa-var-question-circle-o);
.sg-icon(settings, @fa-var-cog);
.sg-icon(subscription, @fa-var-rss);
.sg-icon(video, @fa-var-play);
......@@ -100,6 +101,7 @@
.sg-icon(no-results, @fa-var-meh-o);
.sg-icon(facebook, @fa-var-facebook);
.sg-icon(image, @fa-var-image);
.sg-icon(more, @fa-var-ellipsis-h);
// utility icons
.sg-icon(increase, @fa-var-plus);
......
.page-meta {
font-size: 0.85em;
color: @color-text-extralight;
text-align: right;
.on-handhelds({
display: none;
});
}
.page-footer {
&:extend(.decoration-striped);
margin: 4rem 0 0;
......@@ -72,3 +62,27 @@
margin: 0 -15px;
});
}
.page-info {
display: flex;
align-items: center;
text-align: right;
color: @color-text-extralight;
.on-handhelds({
display: none;
});
}
.page-meta {
font-size: 0.85em;
}
.page-help {
font-size: 2em;
margin-left: .75rem;
a {
color: @color-text-extralight;
}
}
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