Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/windirstat.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Schneider <oliver@assarbad.net>2018-11-12 01:18:54 +0300
committerOliver Schneider <oliver@assarbad.net>2018-11-12 01:18:54 +0300
commitee6a7067d4b06f20805f071272f2739c03da1683 (patch)
tree00b66f43865b6bf837b4734b22fac1fc29d9b4db
parentde7823b099f231955b173598f1f8406f97b3ba80 (diff)
Preparing for the new contact form backend
-rw-r--r--.hgignore2
-rw-r--r--web/GNUmakefile4
-rw-r--r--web/templates/contact.html.j2.tmpl107
-rw-r--r--web/templates/include/automenu.inc69
4 files changed, 111 insertions, 71 deletions
diff --git a/.hgignore b/.hgignore
index 188e003..37effa1 100644
--- a/.hgignore
+++ b/.hgignore
@@ -14,6 +14,8 @@ Backup *
sandbox/luaconf/Debug/**
sandbox/luaconf/Release/**
web/*.html
+web/*.html.j2
+web/templates/include/automenu.inc
web/software/cushionstarlets.php
src/*
Visual Lint/*
diff --git a/web/GNUmakefile b/web/GNUmakefile
index 4b04127..5016a60 100644
--- a/web/GNUmakefile
+++ b/web/GNUmakefile
@@ -7,7 +7,7 @@ STYLESHEET:=templates/include/styles.css
all: $(HTMLPAGES)
-$(AUTOMENU): $(TEMPLATES)
+$(AUTOMENU): $(filter-out %.j2.tmpl,$(TEMPLATES))
(echo "[%\npages = ["; for i in $^; do FNAME="$${i##*/}"; echo " {\n fname = '$${FNAME%.tmpl}'"; grep -E '^\s+(description|norder|uuid|title) = ' $$i; echo " }\n"; done; echo "\n]\n%]";) > $@
%: templates/%.tmpl $(AUTOMENU) $(TMPLINCLS) $(STYLESHEET)
@@ -18,5 +18,5 @@ clean:
rm -f $(HTMLPAGES) $(AUTOMENU)
rebuild: clean all
-.PHONY: all clean rebuild
+.PHONY: all clean rebuild $(AUTOMENU)
.NOTPARALLEL: clean rebuild
diff --git a/web/templates/contact.html.j2.tmpl b/web/templates/contact.html.j2.tmpl
new file mode 100644
index 0000000..d2f7bf9
--- /dev/null
+++ b/web/templates/contact.html.j2.tmpl
@@ -0,0 +1,107 @@
+[% WRAPPER 'html-body.tt'
+ title = 'Contact'
+ description = 'Contact the team or a team member'
+ uuid = '6dcfe529-89ef-44f1-903c-2614d8d56432'
+ norder = '-1'
+%]
+[%- PROCESS 'constants.tt' -%]
+{%if form.get %}
+<p>All the fields have to be filled in ...</p>
+<p><strong>NB:</strong> As a matter of courtesy you should consider adding your name (or even a pseudonym) in the message to us. You know our names as well. Besides, it makes it easier to address you in a response. Thanks.</p>
+<form action="{% form.uri %}" method="post" accept-charset="utf-8">
+<table width="100%" summary="Mailform">
+<colgroup>
+ <col width="30%" />
+ <col width="70%" />
+</colgroup>
+<tr>
+ <td>
+ <b>Who should receive the message?:</b>
+ </td>
+ <td>
+ <select name="{% form.recipient %}">
+ <option value="developers" selected="selected">Developers</option>
+ [%- FOREACH key IN gpg_keys.sort('name') -%]<option value="[%- key.name | lower -%]">[%- key.name -%]</option>[%- END -%]
+ <option value="team">The whole team</option>
+ </select>
+ </td>
+ </tr>
+<tr>
+ <td>
+ <b>Your email address (max. 100 chars):</b>
+ </td>
+ <td>
+ <input type="text" name="{% form.sender %}" maxlength="100" class="feld_" />
+ </td>
+ </tr>
+<tr>
+ <td>
+ <b>Subject (max. 100 chars):</b>
+ </td>
+ <td>
+ <input type="hidden" name="{% form.hidden %}" value="{% form.hidden_value %}" />
+ <input type="text" name="{% form.subject %}" maxlength="100" class="feld_" />
+ </td>
+ </tr>
+<tr>
+ <td colspan="2">
+ <b>Here goes your text:</b><br />
+ <textarea name="{% form.message %}" rows="15" cols="60" class="feld3"></textarea>
+ </td>
+ </tr>
+<tr>
+ <td colspan="2" style="text-align:center; ">
+ <input type="submit" value="{% form.send %}" class="btn" />
+ </td>
+ </tr>
+</table>
+</form>
+<h3>Report an issue or defect ("bug")?</h3>
+<p>
+Please use <a class="wdslnk" href="[%- tracker_url -%]">the issue tracker over on Bitbucket</a> or for
+security-related reports use a PGP-encrypted email. See below for public keys available.
+</p>
+<h3>Email from your own client?</h3>
+<p>
+If you prefer to send an email, i.e. not use this contact form, you can use the lowercase form of the team
+member's first name and append the at sign and then <tt>windirstat.net</tt> to it to get the email address
+of that team member (i.e. <tt>&lt;name&gt;@windirstat.net</tt>).
+If you can't remember the names, use the dropdown box above to receive a clue ;)
+</p>
+<h3>Using PGP to encrypt communication or to verify emails we send out</h3>
+<p>
+You can use the following <a class="wdslnk" href="https://en.wikipedia.org/wiki/Pretty_Good_Privacy">PGP</a>
+public keys to encrypt <em>to</em>. The keys will be available from commonly used key servers such as
+pgp.mit.edu or subkeys.pgp.net. Please use the traditional ASCII armor in your first communication to
+establish whether PGP/MIME can be used in future communication.
+</p>
+<ul>
+[%- FOREACH key IN gpg_keys.sort('name') -%]
+[%- IF key.id -%]
+<li><strong>[%- key.name -%]:</strong><br />&nbsp;&nbsp;PGP key ID: <a class="wdslnk" href="[%- key.id | format(gpg_search_fmt) -%]">[%- key.id -%]</a>,<br />&nbsp;&nbsp;&nbsp;&nbsp;key fingerprint: <tt>[%- key.fingerprint -%]</tt></li>
+[%- END -%]
+[%- END -%]
+</ul>
+{% else %}
+{% if post.success %}
+<header><h1><span lang="en">Success</span> / <span lang="de">Erfolg</span></h1></header>
+<section lang="en">
+ <h2>Your email was sent successfully (delivery may still fail, though)</h2>
+</section>
+<section lang="de">
+ <h2>Ihre Email wurde erfolgreich verschickt (die Zustellung kann dennoch fehlschlagen)</h2>
+</section>
+<article><pre>\n{% post.message %}\n</pre></article>
+{% else %}
+<header><h1><span lang="en">Error</span> / <span lang="de">Fehler</span> {% post.status %}</h1></header>
+<section lang="en">
+ <h2>An error occurred when processing your request.</h2>
+ <p>Status code {% post.status %}: {% post.status_description %}</p>
+</section>
+<section lang="de">
+ <h2>Während der Verarbeitung Ihrer Anfrage kam es zu einem Fehler.</h2>
+ <p>Statuscode {% post.status %}: <span lang="en">{% post.status_description %}</span> (Beschreibung auf Englisch)</p>
+</section>
+{% endif %}
+{% endif %}
+[% END %]
diff --git a/web/templates/include/automenu.inc b/web/templates/include/automenu.inc
deleted file mode 100644
index 4ac1526..0000000
--- a/web/templates/include/automenu.inc
+++ /dev/null
@@ -1,69 +0,0 @@
-[%
-pages = [
- {
- fname = 'background.html'
- title = 'Background'
- description = 'Background and history'
- uuid = '07c225cb-e2db-49da-b1d5-c33588c8ffbb'
- norder = '4000'
- }
-
- {
- fname = 'contact.html'
- title = 'Contact'
- description = 'Contact the team or a team member'
- uuid = 'a57cd25d-42ee-4e3a-aa24-f42b9548dbdd'
- norder = '9989'
- }
-
- {
- fname = 'download.html'
- title = 'Downloads, permalinks'
- description = 'Permalinks to downloads and other content'
- uuid = '8dccb375-74a0-4fde-a733-0019572b0646'
- norder = '1000'
- }
-
- {
- fname = 'index.html'
- title = 'Home'
- description = 'Windows Directory Statistics'
- uuid = '92e5b3ac-10ac-418e-97f9-8156b67c1d57'
- norder = '0000'
- }
-
- {
- fname = 'logo.html'
- title = 'Logos'
- description = 'Logos / icons'
- uuid = '51f50289-c61f-4cf7-ac07-fd236f442f39'
- norder = '9999'
- }
-
- {
- fname = 'permalink.html'
- title = 'Permanent Links'
- description = 'Permalinks to downloads and other content'
- uuid = '24719a1c-e784-454d-9a05-4bbf82e53cb5'
- norder = '3000'
- }
-
- {
- fname = 'translations.html'
- title = 'Translation Project'
- description = 'Translations of WinDirStat'
- uuid = '5da70447-d5f0-4895-8377-88f4a1ac8b3e'
- norder = '6000'
- }
-
- {
- fname = 'unicode.html'
- title = 'Notes on Unicode'
- description = 'Notes on Unicode - Why is Unicode relevant?'
- uuid = '18f81132-3a23-474c-9b64-ff066752cc21'
- norder = '7000'
- }
-
-
-]
-%]