From 98e12313596c58738fc7e3eeaccfde202b91ef2a Mon Sep 17 00:00:00 2001 From: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl> Date: Tue, 1 Jun 2010 12:05:45 +0200 Subject: [PATCH] bug report form --- apps/suggest/__init__.py | 0 apps/suggest/admin.py | 12 +++ apps/suggest/forms.py | 12 +++ apps/suggest/locale/de/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/locale/en/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/locale/es/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/locale/fr/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/locale/lt/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/locale/pl/LC_MESSAGES/django.mo | Bin 0 -> 984 bytes apps/suggest/locale/pl/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/locale/ru/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/locale/uk/LC_MESSAGES/django.po | 77 ++++++++++++++++++ apps/suggest/migrations/0001_initial.py | 81 +++++++++++++++++++ apps/suggest/migrations/__init__.py | 0 apps/suggest/models.py | 25 ++++++ apps/suggest/templates/suggest.html | 11 +++ apps/suggest/urls.py | 14 ++++ apps/suggest/views.py | 37 +++++++++ wolnelektury/locale/de/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/de/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/locale/en/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/en/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/locale/es/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/es/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/locale/fr/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/fr/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/locale/lt/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/lt/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/locale/pl/LC_MESSAGES/django.mo | Bin 15784 -> 15784 bytes wolnelektury/locale/pl/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/locale/ru/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/ru/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/locale/uk/LC_MESSAGES/django.mo | Bin 367 -> 367 bytes wolnelektury/locale/uk/LC_MESSAGES/django.po | 29 ++++--- wolnelektury/settings.py | 1 + wolnelektury/static/css/master.css | 32 ++++++++ wolnelektury/static/js/catalogue.js | 33 ++++++++ wolnelektury/templates/base.html | 10 ++- wolnelektury/urls.py | 1 + 39 files changed, 1020 insertions(+), 97 deletions(-) create mode 100644 apps/suggest/__init__.py create mode 100644 apps/suggest/admin.py create mode 100644 apps/suggest/forms.py create mode 100644 apps/suggest/locale/de/LC_MESSAGES/django.po create mode 100644 apps/suggest/locale/en/LC_MESSAGES/django.po create mode 100644 apps/suggest/locale/es/LC_MESSAGES/django.po create mode 100644 apps/suggest/locale/fr/LC_MESSAGES/django.po create mode 100644 apps/suggest/locale/lt/LC_MESSAGES/django.po create mode 100644 apps/suggest/locale/pl/LC_MESSAGES/django.mo create mode 100644 apps/suggest/locale/pl/LC_MESSAGES/django.po create mode 100644 apps/suggest/locale/ru/LC_MESSAGES/django.po create mode 100644 apps/suggest/locale/uk/LC_MESSAGES/django.po create mode 100644 apps/suggest/migrations/0001_initial.py create mode 100644 apps/suggest/migrations/__init__.py create mode 100644 apps/suggest/models.py create mode 100644 apps/suggest/templates/suggest.html create mode 100644 apps/suggest/urls.py create mode 100644 apps/suggest/views.py diff --git a/apps/suggest/__init__.py b/apps/suggest/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/suggest/admin.py b/apps/suggest/admin.py new file mode 100644 index 000000000..b8743dfe4 --- /dev/null +++ b/apps/suggest/admin.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.contrib import admin + +from suggest.models import Suggestion + +class SuggestionAdmin(admin.ModelAdmin): + list_display = ('title', 'user', 'author', 'email', 'created_at') + +admin.site.register(Suggestion, SuggestionAdmin) diff --git a/apps/suggest/forms.py b/apps/suggest/forms.py new file mode 100644 index 000000000..fed55f6f5 --- /dev/null +++ b/apps/suggest/forms.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django import forms +from django.utils.translation import ugettext_lazy as _ + +class SuggestForm(forms.Form): + author = forms.CharField(label=_('Author'), max_length=50, required=False) + email = forms.EmailField(label=_('E-mail'), required=False) + title = forms.CharField(label=_('Title'), max_length=120, required=True) + description = forms.CharField(label=_('Description'), widget=forms.Textarea, required=True) diff --git a/apps/suggest/locale/de/LC_MESSAGES/django.po b/apps/suggest/locale/de/LC_MESSAGES/django.po new file mode 100644 index 000000000..d4d2985bb --- /dev/null +++ b/apps/suggest/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:9 +msgid "Author" +msgstr "" + +#: forms.py:10 +msgid "E-mail" +msgstr "" + +#: forms.py:11 +msgid "Title" +msgstr "" + +#: forms.py:12 +msgid "Description" +msgstr "" + +#: models.py:10 +msgid "author" +msgstr "" + +#: models.py:11 +msgid "e-mail" +msgstr "" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "description" +msgstr "" + +#: models.py:14 +msgid "creation date" +msgstr "" + +#: models.py:15 +msgid "IP address" +msgstr "" + +#: models.py:20 +msgid "suggestion" +msgstr "" + +#: models.py:21 +msgid "suggestions" +msgstr "" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "" + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "" diff --git a/apps/suggest/locale/en/LC_MESSAGES/django.po b/apps/suggest/locale/en/LC_MESSAGES/django.po new file mode 100644 index 000000000..d4d2985bb --- /dev/null +++ b/apps/suggest/locale/en/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:9 +msgid "Author" +msgstr "" + +#: forms.py:10 +msgid "E-mail" +msgstr "" + +#: forms.py:11 +msgid "Title" +msgstr "" + +#: forms.py:12 +msgid "Description" +msgstr "" + +#: models.py:10 +msgid "author" +msgstr "" + +#: models.py:11 +msgid "e-mail" +msgstr "" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "description" +msgstr "" + +#: models.py:14 +msgid "creation date" +msgstr "" + +#: models.py:15 +msgid "IP address" +msgstr "" + +#: models.py:20 +msgid "suggestion" +msgstr "" + +#: models.py:21 +msgid "suggestions" +msgstr "" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "" + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "" diff --git a/apps/suggest/locale/es/LC_MESSAGES/django.po b/apps/suggest/locale/es/LC_MESSAGES/django.po new file mode 100644 index 000000000..d4d2985bb --- /dev/null +++ b/apps/suggest/locale/es/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:9 +msgid "Author" +msgstr "" + +#: forms.py:10 +msgid "E-mail" +msgstr "" + +#: forms.py:11 +msgid "Title" +msgstr "" + +#: forms.py:12 +msgid "Description" +msgstr "" + +#: models.py:10 +msgid "author" +msgstr "" + +#: models.py:11 +msgid "e-mail" +msgstr "" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "description" +msgstr "" + +#: models.py:14 +msgid "creation date" +msgstr "" + +#: models.py:15 +msgid "IP address" +msgstr "" + +#: models.py:20 +msgid "suggestion" +msgstr "" + +#: models.py:21 +msgid "suggestions" +msgstr "" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "" + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "" diff --git a/apps/suggest/locale/fr/LC_MESSAGES/django.po b/apps/suggest/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 000000000..d4d2985bb --- /dev/null +++ b/apps/suggest/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:9 +msgid "Author" +msgstr "" + +#: forms.py:10 +msgid "E-mail" +msgstr "" + +#: forms.py:11 +msgid "Title" +msgstr "" + +#: forms.py:12 +msgid "Description" +msgstr "" + +#: models.py:10 +msgid "author" +msgstr "" + +#: models.py:11 +msgid "e-mail" +msgstr "" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "description" +msgstr "" + +#: models.py:14 +msgid "creation date" +msgstr "" + +#: models.py:15 +msgid "IP address" +msgstr "" + +#: models.py:20 +msgid "suggestion" +msgstr "" + +#: models.py:21 +msgid "suggestions" +msgstr "" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "" + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "" diff --git a/apps/suggest/locale/lt/LC_MESSAGES/django.po b/apps/suggest/locale/lt/LC_MESSAGES/django.po new file mode 100644 index 000000000..d4d2985bb --- /dev/null +++ b/apps/suggest/locale/lt/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:9 +msgid "Author" +msgstr "" + +#: forms.py:10 +msgid "E-mail" +msgstr "" + +#: forms.py:11 +msgid "Title" +msgstr "" + +#: forms.py:12 +msgid "Description" +msgstr "" + +#: models.py:10 +msgid "author" +msgstr "" + +#: models.py:11 +msgid "e-mail" +msgstr "" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "description" +msgstr "" + +#: models.py:14 +msgid "creation date" +msgstr "" + +#: models.py:15 +msgid "IP address" +msgstr "" + +#: models.py:20 +msgid "suggestion" +msgstr "" + +#: models.py:21 +msgid "suggestions" +msgstr "" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "" + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "" diff --git a/apps/suggest/locale/pl/LC_MESSAGES/django.mo b/apps/suggest/locale/pl/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..cee6f93a8c0fc885486f4cffcca3368df53cec59 GIT binary patch literal 984 zcmZva&ui2`6vs!bA`wyaCauiDTbY<`=?~H$blYyr;<jDdv=+g`Y%)!=O*6~P#JcNk zK|Fa=L8=$MdlA8#9=hPci~a%rEq-S=x;+>eK6&%L@B3cD`+ald6~S`@XB6kH4bDBI z7YMnGcnrJ>-YsGebP&&gx4~s_415Gy-Ba)q_#CwLFTiWy%Od~2xc>-RpU=hpH_+Do z0QYfz74i5*LPl_30<GUPcm-Sl?c8hN9WVrMfnCt*UW3-}9e5r509v0<Mg9wDeZCg_ zUfll#NjW!%Qjt}mLzT2lA~RB9$2>_%wN7~yDWNsl7A>g^<+PE<R4S_TI2O7uE>b64 zQ!O%sR2ZV<AWze_OLjySQPr;|L1I!t_@G~?1h@4x;zp3@Tz4_(ey+vvRTI-UsVmtO zp<&gC?Fpsf<I{S1<$ig+LiZ}$JJqdCXD}Gs&~Xy6<vi9bkUn+lTLD`snzL0j_vwUJ z@|ZWxyb>*y{K=_tZ^H8+WZU9#V$J`rn{jGf8x|;@>69C(d^)dqB#zv$!<$EZDYn1S z4dwA7lv$kfSg=6wW1rT_o9nxF*!fy*DNS6d;zehpx=|T^PRaG06`2|QQx>#a7}JO+ z=3Xo1Nj68rL$0(i3%kJ@n;q)xC<j8ZN*2l}$zq?*HWK6P{~J<7Y*+UaQ4=FcrX*|( zr=C0IPC9lQunb$RME~6aZa08d>*QhF>&o6KZS=Zl&mx-U4Z8+*3(npQlDZ?ZM9_}Z zhC@qF+Pc@}nQ+O2cJDMznzUm*1~L+~P2TI;eLzQS0jIe+k;-~-BJBjjO|V@!DcT8Q H2Bm)hIo$_x literal 0 HcmV?d00001 diff --git a/apps/suggest/locale/pl/LC_MESSAGES/django.po b/apps/suggest/locale/pl/LC_MESSAGES/django.po new file mode 100644 index 000000000..ef570c86c --- /dev/null +++ b/apps/suggest/locale/pl/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: 2010-06-01 11:37\n" +"Last-Translator: <radek.czajka@gmail.com>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Translated-Using: django-rosetta 0.5.3\n" + +#: forms.py:9 +msgid "Author" +msgstr "Autor" + +#: forms.py:10 +msgid "E-mail" +msgstr "E-mail" + +#: forms.py:11 +msgid "Title" +msgstr "TytuÅ" + +#: forms.py:12 +msgid "Description" +msgstr "Opis" + +#: models.py:10 +msgid "author" +msgstr "autor" + +#: models.py:11 +msgid "e-mail" +msgstr "e-mail" + +#: models.py:12 +msgid "title" +msgstr "tytuÅ" + +#: models.py:13 +msgid "description" +msgstr "opis" + +#: models.py:14 +msgid "creation date" +msgstr "data utworzenia" + +#: models.py:15 +msgid "IP address" +msgstr "adres IP" + +#: models.py:20 +msgid "suggestion" +msgstr "sugestia" + +#: models.py:21 +msgid "suggestions" +msgstr "sugestie" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "ZgÅoszenie zostaÅo wysÅane." + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "ZgÅoÅ bÅÄ d lub sugestiÄ" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "WyÅlij zgÅoszenie" diff --git a/apps/suggest/locale/ru/LC_MESSAGES/django.po b/apps/suggest/locale/ru/LC_MESSAGES/django.po new file mode 100644 index 000000000..d4d2985bb --- /dev/null +++ b/apps/suggest/locale/ru/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:9 +msgid "Author" +msgstr "" + +#: forms.py:10 +msgid "E-mail" +msgstr "" + +#: forms.py:11 +msgid "Title" +msgstr "" + +#: forms.py:12 +msgid "Description" +msgstr "" + +#: models.py:10 +msgid "author" +msgstr "" + +#: models.py:11 +msgid "e-mail" +msgstr "" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "description" +msgstr "" + +#: models.py:14 +msgid "creation date" +msgstr "" + +#: models.py:15 +msgid "IP address" +msgstr "" + +#: models.py:20 +msgid "suggestion" +msgstr "" + +#: models.py:21 +msgid "suggestions" +msgstr "" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "" + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "" diff --git a/apps/suggest/locale/uk/LC_MESSAGES/django.po b/apps/suggest/locale/uk/LC_MESSAGES/django.po new file mode 100644 index 000000000..d4d2985bb --- /dev/null +++ b/apps/suggest/locale/uk/LC_MESSAGES/django.po @@ -0,0 +1,77 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-06-01 11:35+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: forms.py:9 +msgid "Author" +msgstr "" + +#: forms.py:10 +msgid "E-mail" +msgstr "" + +#: forms.py:11 +msgid "Title" +msgstr "" + +#: forms.py:12 +msgid "Description" +msgstr "" + +#: models.py:10 +msgid "author" +msgstr "" + +#: models.py:11 +msgid "e-mail" +msgstr "" + +#: models.py:12 +msgid "title" +msgstr "" + +#: models.py:13 +msgid "description" +msgstr "" + +#: models.py:14 +msgid "creation date" +msgstr "" + +#: models.py:15 +msgid "IP address" +msgstr "" + +#: models.py:20 +msgid "suggestion" +msgstr "" + +#: models.py:21 +msgid "suggestions" +msgstr "" + +#: views.py:33 +msgid "Report was sent successfully." +msgstr "" + +#: templates/suggest.html:2 +msgid "Report a bug or suggestion" +msgstr "" + +#: templates/suggest.html:9 +msgid "Send report" +msgstr "" diff --git a/apps/suggest/migrations/0001_initial.py b/apps/suggest/migrations/0001_initial.py new file mode 100644 index 000000000..dca73ea0e --- /dev/null +++ b/apps/suggest/migrations/0001_initial.py @@ -0,0 +1,81 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding model 'Suggestion' + db.create_table('suggest_suggestion', ( + ('description', self.gf('django.db.models.fields.TextField')(blank=True)), + ('title', self.gf('django.db.models.fields.CharField')(max_length=120)), + ('ip', self.gf('django.db.models.fields.IPAddressField')(max_length=15)), + ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), + ('author', self.gf('django.db.models.fields.CharField')(max_length=120, blank=True)), + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)), + ('email', self.gf('django.db.models.fields.EmailField')(max_length=75, blank=True)), + )) + db.send_create_signal('suggest', ['Suggestion']) + + + def backwards(self, orm): + + # Deleting model 'Suggestion' + db.delete_table('suggest_suggestion') + + + models = { + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + }, + 'suggest.suggestion': { + 'Meta': {'object_name': 'Suggestion'}, + 'author': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}), + 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), + 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}) + } + } + + complete_apps = ['suggest'] diff --git a/apps/suggest/migrations/__init__.py b/apps/suggest/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/apps/suggest/models.py b/apps/suggest/models.py new file mode 100644 index 000000000..f690bc831 --- /dev/null +++ b/apps/suggest/models.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.db import models +from django.contrib.auth.models import User +from django.utils.translation import ugettext_lazy as _ + +class Suggestion(models.Model): + author = models.CharField(_('author'), blank=True, max_length=120) + email = models.EmailField(_('e-mail'), blank=True) + title = models.CharField(_('title'), max_length=120) + description = models.TextField(_('description'), blank=True) + created_at = models.DateTimeField(_('creation date'), auto_now=True) + ip = models.IPAddressField(_('IP address')) + user = models.ForeignKey(User, blank=True, null=True) + + class Meta: + ordering = ('-created_at',) + verbose_name = _('suggestion') + verbose_name_plural = _('suggestions') + + def __unicode__(self): + return self.title + \ No newline at end of file diff --git a/apps/suggest/templates/suggest.html b/apps/suggest/templates/suggest.html new file mode 100644 index 000000000..a2d9d726e --- /dev/null +++ b/apps/suggest/templates/suggest.html @@ -0,0 +1,11 @@ +{% load i18n %} +<h2>{% trans "Report a bug or suggestion" %}</h2> +<form id='suggest-form' action="{% url suggest.views.report %}" method="post" accept-charset="utf-8" class="cuteform"> +<ol> + <li><label for="{{ form.author.id }}">{{ form.author.label }}</label> {{ form.author }}</li> + <li><label for="{{ form.email.id }}">{{ form.email.label }}</label> {{ form.email }}</li> + <li><label for="{{ form.title.id }}">{{ form.title.label }}</label> {{ form.title }}</li> + <li><label for="{{ form.description.id }}">{{ form.description.label }}</label> {{ form.description }}</li> + <li><input type="submit" value="{% trans "Send report" %}"/></li> +</ol> +</form> \ No newline at end of file diff --git a/apps/suggest/urls.py b/apps/suggest/urls.py new file mode 100644 index 000000000..44d606e6b --- /dev/null +++ b/apps/suggest/urls.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.conf.urls.defaults import * +from django.views.generic.simple import direct_to_template +from suggest.forms import SuggestForm + +urlpatterns = patterns('', + url(r'^$', 'django.views.generic.simple.direct_to_template', + {'template': 'suggest.html', 'extra_context': {'form': SuggestForm }}, name='suggest'), + url(r'^wyslij/$', 'suggest.views.report', name='report'), +) + diff --git a/apps/suggest/views.py b/apps/suggest/views.py new file mode 100644 index 000000000..cd733a840 --- /dev/null +++ b/apps/suggest/views.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# +from django.http import HttpResponse, HttpResponseRedirect +from django.views.decorators import cache +from django.views.decorators.http import require_POST +from django.utils.translation import ugettext as _ + +from suggest import forms +from suggest.models import Suggestion + +# FIXME - shouldn't be in catalogue +from catalogue.views import LazyEncoder + + +#@require_POST +@cache.never_cache +def report(request): + suggest_form = forms.SuggestForm(request.POST) + if suggest_form.is_valid(): + author = suggest_form.cleaned_data['author'] + email = suggest_form.cleaned_data['email'] + title = suggest_form.cleaned_data['title'] + description = suggest_form.cleaned_data['description'] + + suggestion = Suggestion(author=author, email=email, title=title, + description=description, ip=request.META['REMOTE_ADDR']) + if request.user.is_authenticated(): + suggestion.user = request.user + suggestion.save() + + response_data = {'success': True, 'message': _('Report was sent successfully.')} + else: + response_data = {'success': False, 'errors': suggest_form.errors} + print LazyEncoder(ensure_ascii=False).encode(response_data) + return HttpResponse(LazyEncoder(ensure_ascii=False).encode(response_data)) diff --git a/wolnelektury/locale/de/LC_MESSAGES/django.mo b/wolnelektury/locale/de/LC_MESSAGES/django.mo index 55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4..bcaab30602c3667b1659bb8ee932f32ab0e44f0e 100644 GIT binary patch delta 20 bcmaFQ^qy%#FPE9FfuVw-ft9K8#OXHxNm~Z- delta 20 bcmaFQ^qy%#FPEvVk*R{AiItJ%#OXHxNwEg~ diff --git a/wolnelektury/locale/de/LC_MESSAGES/django.po b/wolnelektury/locale/de/LC_MESSAGES/django.po index bc5d3d53b..ab85ecb03 100644 --- a/wolnelektury/locale/de/LC_MESSAGES/django.po +++ b/wolnelektury/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -100,32 +100,36 @@ msgstr "" msgid "Administration" msgstr "" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -136,7 +140,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -146,7 +150,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -157,7 +161,8 @@ msgstr "" msgid "Close" msgstr "" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/locale/en/LC_MESSAGES/django.mo b/wolnelektury/locale/en/LC_MESSAGES/django.mo index 55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4..bcaab30602c3667b1659bb8ee932f32ab0e44f0e 100644 GIT binary patch delta 20 bcmaFQ^qy%#FPE9FfuVw-ft9K8#OXHxNm~Z- delta 20 bcmaFQ^qy%#FPEvVk*R{AiItJ%#OXHxNwEg~ diff --git a/wolnelektury/locale/en/LC_MESSAGES/django.po b/wolnelektury/locale/en/LC_MESSAGES/django.po index bc5d3d53b..ab85ecb03 100644 --- a/wolnelektury/locale/en/LC_MESSAGES/django.po +++ b/wolnelektury/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -100,32 +100,36 @@ msgstr "" msgid "Administration" msgstr "" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -136,7 +140,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -146,7 +150,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -157,7 +161,8 @@ msgstr "" msgid "Close" msgstr "" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/locale/es/LC_MESSAGES/django.mo b/wolnelektury/locale/es/LC_MESSAGES/django.mo index 55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4..bcaab30602c3667b1659bb8ee932f32ab0e44f0e 100644 GIT binary patch delta 20 bcmaFQ^qy%#FPE9FfuVw-ft9K8#OXHxNm~Z- delta 20 bcmaFQ^qy%#FPEvVk*R{AiItJ%#OXHxNwEg~ diff --git a/wolnelektury/locale/es/LC_MESSAGES/django.po b/wolnelektury/locale/es/LC_MESSAGES/django.po index bc5d3d53b..ab85ecb03 100644 --- a/wolnelektury/locale/es/LC_MESSAGES/django.po +++ b/wolnelektury/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -100,32 +100,36 @@ msgstr "" msgid "Administration" msgstr "" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -136,7 +140,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -146,7 +150,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -157,7 +161,8 @@ msgstr "" msgid "Close" msgstr "" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/locale/fr/LC_MESSAGES/django.mo b/wolnelektury/locale/fr/LC_MESSAGES/django.mo index 55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4..bcaab30602c3667b1659bb8ee932f32ab0e44f0e 100644 GIT binary patch delta 20 bcmaFQ^qy%#FPE9FfuVw-ft9K8#OXHxNm~Z- delta 20 bcmaFQ^qy%#FPEvVk*R{AiItJ%#OXHxNwEg~ diff --git a/wolnelektury/locale/fr/LC_MESSAGES/django.po b/wolnelektury/locale/fr/LC_MESSAGES/django.po index bc5d3d53b..ab85ecb03 100644 --- a/wolnelektury/locale/fr/LC_MESSAGES/django.po +++ b/wolnelektury/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -100,32 +100,36 @@ msgstr "" msgid "Administration" msgstr "" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -136,7 +140,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -146,7 +150,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -157,7 +161,8 @@ msgstr "" msgid "Close" msgstr "" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/locale/lt/LC_MESSAGES/django.mo b/wolnelektury/locale/lt/LC_MESSAGES/django.mo index 55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4..bcaab30602c3667b1659bb8ee932f32ab0e44f0e 100644 GIT binary patch delta 20 bcmaFQ^qy%#FPE9FfuVw-ft9K8#OXHxNm~Z- delta 20 bcmaFQ^qy%#FPEvVk*R{AiItJ%#OXHxNwEg~ diff --git a/wolnelektury/locale/lt/LC_MESSAGES/django.po b/wolnelektury/locale/lt/LC_MESSAGES/django.po index bc5d3d53b..ab85ecb03 100644 --- a/wolnelektury/locale/lt/LC_MESSAGES/django.po +++ b/wolnelektury/locale/lt/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -100,32 +100,36 @@ msgstr "" msgid "Administration" msgstr "" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -136,7 +140,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -146,7 +150,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -157,7 +161,8 @@ msgstr "" msgid "Close" msgstr "" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/locale/pl/LC_MESSAGES/django.mo b/wolnelektury/locale/pl/LC_MESSAGES/django.mo index bb032989a03fd83e519e949c1b1223ae67654c50..64a7d32fa0423dd58d4f5ab3512fbb29c7d3a57a 100644 GIT binary patch delta 23 fcmZ2cy`p-<GG#6^T?0b}Ljx;Q<INkCe@FrVX;27A delta 18 acmZ2cy`p-<GUdtVlsOqKH*Zk>AqfCeVhA1p diff --git a/wolnelektury/locale/pl/LC_MESSAGES/django.po b/wolnelektury/locale/pl/LC_MESSAGES/django.po index 05eb66f76..2818539e1 100644 --- a/wolnelektury/locale/pl/LC_MESSAGES/django.po +++ b/wolnelektury/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: 2010-05-25 14:27\n" "Last-Translator: <radoslaw.czajka@nowoczesnapolska.org.pl>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -110,32 +110,36 @@ msgstr "Twoje póÅki" msgid "Administration" msgstr "Administracja" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "Wyloguj" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "Zaloguj siÄ" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "ZaÅóż konto" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "Wybierz jÄzyk interfejsu:" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "Wybierz jÄzyk" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -152,7 +156,7 @@ msgstr "" "\">BibliotekÄ NarodowÄ </a> z egzemplarzy pochodzÄ cych ze zbiorów BN.\n" "Hosting <a href=\"http://eo.pl/\">EO Networks</a>. " -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -166,7 +170,7 @@ msgstr "" "125, tel/fax: (22) 621-30-17, e-mail: <a href=\"mailto:" "fundacja@nowoczesnapolska.org.pl\">fundacja@nowoczesnapolska.org.pl</a>" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -177,7 +181,8 @@ msgstr "" msgid "Close" msgstr "Zamknij" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/locale/ru/LC_MESSAGES/django.mo b/wolnelektury/locale/ru/LC_MESSAGES/django.mo index 55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4..bcaab30602c3667b1659bb8ee932f32ab0e44f0e 100644 GIT binary patch delta 20 bcmaFQ^qy%#FPE9FfuVw-ft9K8#OXHxNm~Z- delta 20 bcmaFQ^qy%#FPEvVk*R{AiItJ%#OXHxNwEg~ diff --git a/wolnelektury/locale/ru/LC_MESSAGES/django.po b/wolnelektury/locale/ru/LC_MESSAGES/django.po index bc5d3d53b..ab85ecb03 100644 --- a/wolnelektury/locale/ru/LC_MESSAGES/django.po +++ b/wolnelektury/locale/ru/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -100,32 +100,36 @@ msgstr "" msgid "Administration" msgstr "" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -136,7 +140,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -146,7 +150,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -157,7 +161,8 @@ msgstr "" msgid "Close" msgstr "" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/locale/uk/LC_MESSAGES/django.mo b/wolnelektury/locale/uk/LC_MESSAGES/django.mo index 55259ba7fc0ec6bb1cedac94a21c56345ba9b2c4..bcaab30602c3667b1659bb8ee932f32ab0e44f0e 100644 GIT binary patch delta 20 bcmaFQ^qy%#FPE9FfuVw-ft9K8#OXHxNm~Z- delta 20 bcmaFQ^qy%#FPEvVk*R{AiItJ%#OXHxNwEg~ diff --git a/wolnelektury/locale/uk/LC_MESSAGES/django.po b/wolnelektury/locale/uk/LC_MESSAGES/django.po index bc5d3d53b..ab85ecb03 100644 --- a/wolnelektury/locale/uk/LC_MESSAGES/django.po +++ b/wolnelektury/locale/uk/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-25 14:29+0200\n" +"POT-Creation-Date: 2010-06-01 10:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -100,32 +100,36 @@ msgstr "" msgid "Administration" msgstr "" -#: templates/base.html:38 +#: templates/base.html:38 templates/base.html.py:42 +msgid "Report a bug" +msgstr "" + +#: templates/base.html:39 msgid "Logout" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:91 -#: templates/base.html.py:95 templates/auth/login.html:4 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:93 +#: templates/base.html.py:97 templates/auth/login.html:4 #: templates/auth/login.html.py:7 templates/auth/login.html:12 #: templates/auth/login.html.py:15 msgid "Sign in" msgstr "" -#: templates/base.html:41 templates/base.html.py:87 templates/base.html:95 -#: templates/base.html.py:99 templates/auth/login.html:7 +#: templates/base.html:43 templates/base.html.py:89 templates/base.html:97 +#: templates/base.html.py:101 templates/auth/login.html:7 #: templates/auth/login.html.py:21 templates/auth/login.html:23 msgid "Register" msgstr "" -#: templates/base.html:51 +#: templates/base.html:53 msgid "Choose your interface language: " msgstr "" -#: templates/base.html:56 +#: templates/base.html:58 msgid "Choose language" msgstr "" -#: templates/base.html:68 +#: templates/base.html:70 msgid "" "\n" "\t\t\t\tWolne Lektury is a project lead by <a href=\"http://nowoczesnapolska." @@ -136,7 +140,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:75 +#: templates/base.html:77 msgid "" "\n" "\t\t\t\tModern Poland Foundation, 00-514 Warsaw, ul. MarszaÅkowska 84/92 " @@ -146,7 +150,7 @@ msgid "" "\t\t\t\t" msgstr "" -#: templates/base.html:84 templates/base.html.py:105 +#: templates/base.html:86 templates/base.html.py:107 templates/base.html:113 #: templates/catalogue/book_detail.html:129 #: templates/catalogue/book_fragments.html:33 #: templates/catalogue/book_stub_detail.html:31 @@ -157,7 +161,8 @@ msgstr "" msgid "Close" msgstr "" -#: templates/base.html:107 templates/catalogue/book_detail.html:131 +#: templates/base.html:109 templates/base.html.py:115 +#: templates/catalogue/book_detail.html:131 #: templates/catalogue/book_fragments.html:35 #: templates/catalogue/book_stub_detail.html:33 #: templates/catalogue/search_multiple_hits.html:25 diff --git a/wolnelektury/settings.py b/wolnelektury/settings.py index 94388a5f4..66f2f6ce3 100644 --- a/wolnelektury/settings.py +++ b/wolnelektury/settings.py @@ -130,6 +130,7 @@ INSTALLED_APPS = [ 'api', 'rosetta', 'infopages', + 'suggest', ] CACHE_BACKEND = 'locmem:///?max_entries=3000' diff --git a/wolnelektury/static/css/master.css b/wolnelektury/static/css/master.css index a0e5e3c22..06c5e3447 100644 --- a/wolnelektury/static/css/master.css +++ b/wolnelektury/static/css/master.css @@ -580,6 +580,7 @@ div.shown-tags p, div.all-tags p { .cuteform .error { color: #BF3024; + display: block; } /* ================ */ @@ -689,6 +690,37 @@ div.shown-tags p, div.all-tags p { text-decoration: none; } +#suggest-window { + position: absolute; + display: none; + width: 35em; + background-color: transparent; + margin-top: -0.5em; + margin-left: 1em; +} + +#suggest-window div.header { + background-color: #FFF; + border-right: 0.3em solid #DDD; + width: 4em; + right: 0; + left: auto; + padding: 0.5em 1em 0.5em 1em; + float: right; + text-align: center; +} + +#suggest-window div.target { + clear: both; + background-color: #FFF; + border-right: 0.3em solid #DDD; + border-bottom: 0.3em solid #DDD; + padding: 1em; +} +#suggest-form textarea { + width: 30em; +} + /* ======================== */ /* = Alphabetic book list = */ /* ======================== */ diff --git a/wolnelektury/static/js/catalogue.js b/wolnelektury/static/js/catalogue.js index 7a7709de1..93588517b 100644 --- a/wolnelektury/static/js/catalogue.js +++ b/wolnelektury/static/js/catalogue.js @@ -270,6 +270,39 @@ function serverTime() { }); } }); + + $('#suggest-window').jqm({ + ajax: '@href', + target: $('#suggest-window div.target')[0], + overlay: 60, + trigger: '#suggest-link', + onShow: function(hash) { + var offset = $(hash.t).offset(); + hash.w.css({position: 'absolute', left: offset.left - hash.w.width() + $(hash.t).width(), top: offset.top}); + $('div.header', hash.w).css({width: $(hash.t).width()}); + hash.w.show(); + }, + onLoad: function(hash) { + $('form', hash.w).ajaxForm({ + dataType: 'json', + target: $('#suggest-window div.target'), + success: function(response) { + if (response.success) { + $('#suggest-window div.target').text(response.message); + setTimeout(function() { $('#suggest-window').jqmHide() }, 1000) + } + else { + $('#suggest-form .error').remove(); + $.each(response.errors, function(id, errors) { + $('#suggest-form #id_' + id).before('<span class="error">' + errors[0] + '</span>'); + }); + $('#suggest-form input[type=submit]').removeAttr('disabled'); + return false; + } + } + }); + } + }); $('#books-list .book').hover( function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); }, diff --git a/wolnelektury/templates/base.html b/wolnelektury/templates/base.html index f0eb274d7..ddec560b4 100644 --- a/wolnelektury/templates/base.html +++ b/wolnelektury/templates/base.html @@ -35,10 +35,12 @@ {% if user.is_staff %} | <a href="/admin/">{% trans "Administration" %}</a> {% endif %} + | <a href="{% url suggest %}" id="suggest-link">{% trans "Report a bug" %}</a> | <a href="{% url logout %}?next={{ request.get_full_path }}">{% trans "Logout" %}</a> </p> {% else %} - <p><a href="{% url login %}" class="login-register-link">{% trans "Sign in" %} / {% trans "Register" %}</a></p> + <p><a href="{% url suggest %}" id="suggest-link">{% trans "Report a bug" %}</a> + | <a href="{% url login %}" class="login-register-link">{% trans "Sign in" %} / {% trans "Register" %}</a></p> {% endif %} </div> <div class="social-links" style="float:right"> @@ -107,6 +109,12 @@ <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p> </div> </div> + <div id="suggest-window"> + <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div> + <div class="target"> + <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p> + </div> + </div> {% endblock bodycontent %} <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); diff --git a/wolnelektury/urls.py b/wolnelektury/urls.py index 0628b1568..5101355ef 100644 --- a/wolnelektury/urls.py +++ b/wolnelektury/urls.py @@ -20,6 +20,7 @@ infopages = { urlpatterns = patterns('', url(r'^katalog/', include('catalogue.urls')), url(r'^materialy/', include('lessons.urls')), + url(r'^sugestia/', include('suggest.urls')), # Static pages url(r'^wolontariat/$', 'django.views.generic.list_detail.object_detail', -- 2.20.1