bug report form
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 1 Jun 2010 10:05:45 +0000 (12:05 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 1 Jun 2010 10:05:45 +0000 (12:05 +0200)
39 files changed:
apps/suggest/__init__.py [new file with mode: 0644]
apps/suggest/admin.py [new file with mode: 0644]
apps/suggest/forms.py [new file with mode: 0644]
apps/suggest/locale/de/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/locale/en/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/locale/es/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/locale/fr/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/locale/lt/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/locale/pl/LC_MESSAGES/django.mo [new file with mode: 0644]
apps/suggest/locale/pl/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/locale/ru/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/locale/uk/LC_MESSAGES/django.po [new file with mode: 0644]
apps/suggest/migrations/0001_initial.py [new file with mode: 0644]
apps/suggest/migrations/__init__.py [new file with mode: 0644]
apps/suggest/models.py [new file with mode: 0644]
apps/suggest/templates/suggest.html [new file with mode: 0644]
apps/suggest/urls.py [new file with mode: 0644]
apps/suggest/views.py [new file with mode: 0644]
wolnelektury/locale/de/LC_MESSAGES/django.mo
wolnelektury/locale/de/LC_MESSAGES/django.po
wolnelektury/locale/en/LC_MESSAGES/django.mo
wolnelektury/locale/en/LC_MESSAGES/django.po
wolnelektury/locale/es/LC_MESSAGES/django.mo
wolnelektury/locale/es/LC_MESSAGES/django.po
wolnelektury/locale/fr/LC_MESSAGES/django.mo
wolnelektury/locale/fr/LC_MESSAGES/django.po
wolnelektury/locale/lt/LC_MESSAGES/django.mo
wolnelektury/locale/lt/LC_MESSAGES/django.po
wolnelektury/locale/pl/LC_MESSAGES/django.mo
wolnelektury/locale/pl/LC_MESSAGES/django.po
wolnelektury/locale/ru/LC_MESSAGES/django.mo
wolnelektury/locale/ru/LC_MESSAGES/django.po
wolnelektury/locale/uk/LC_MESSAGES/django.mo
wolnelektury/locale/uk/LC_MESSAGES/django.po
wolnelektury/settings.py
wolnelektury/static/css/master.css
wolnelektury/static/js/catalogue.js
wolnelektury/templates/base.html
wolnelektury/urls.py

diff --git a/apps/suggest/__init__.py b/apps/suggest/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/apps/suggest/admin.py b/apps/suggest/admin.py
new file mode 100644 (file)
index 0000000..b8743df
--- /dev/null
@@ -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 (file)
index 0000000..fed55f6
--- /dev/null
@@ -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 (file)
index 0000000..d4d2985
--- /dev/null
@@ -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 (file)
index 0000000..d4d2985
--- /dev/null
@@ -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 (file)
index 0000000..d4d2985
--- /dev/null
@@ -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 (file)
index 0000000..d4d2985
--- /dev/null
@@ -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 (file)
index 0000000..d4d2985
--- /dev/null
@@ -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 (file)
index 0000000..cee6f93
Binary files /dev/null and b/apps/suggest/locale/pl/LC_MESSAGES/django.mo differ
diff --git a/apps/suggest/locale/pl/LC_MESSAGES/django.po b/apps/suggest/locale/pl/LC_MESSAGES/django.po
new file mode 100644 (file)
index 0000000..ef570c8
--- /dev/null
@@ -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 (file)
index 0000000..d4d2985
--- /dev/null
@@ -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 (file)
index 0000000..d4d2985
--- /dev/null
@@ -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 (file)
index 0000000..dca73ea
--- /dev/null
@@ -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 (file)
index 0000000..e69de29
diff --git a/apps/suggest/models.py b/apps/suggest/models.py
new file mode 100644 (file)
index 0000000..f690bc8
--- /dev/null
@@ -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 (file)
index 0000000..a2d9d72
--- /dev/null
@@ -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 (file)
index 0000000..44d606e
--- /dev/null
@@ -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 (file)
index 0000000..cd733a8
--- /dev/null
@@ -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))
index 55259ba..bcaab30 100644 (file)
Binary files a/wolnelektury/locale/de/LC_MESSAGES/django.mo and b/wolnelektury/locale/de/LC_MESSAGES/django.mo differ
index bc5d3d5..ab85ecb 100644 (file)
@@ -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
index 55259ba..bcaab30 100644 (file)
Binary files a/wolnelektury/locale/en/LC_MESSAGES/django.mo and b/wolnelektury/locale/en/LC_MESSAGES/django.mo differ
index bc5d3d5..ab85ecb 100644 (file)
@@ -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
index 55259ba..bcaab30 100644 (file)
Binary files a/wolnelektury/locale/es/LC_MESSAGES/django.mo and b/wolnelektury/locale/es/LC_MESSAGES/django.mo differ
index bc5d3d5..ab85ecb 100644 (file)
@@ -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
index 55259ba..bcaab30 100644 (file)
Binary files a/wolnelektury/locale/fr/LC_MESSAGES/django.mo and b/wolnelektury/locale/fr/LC_MESSAGES/django.mo differ
index bc5d3d5..ab85ecb 100644 (file)
@@ -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
index 55259ba..bcaab30 100644 (file)
Binary files a/wolnelektury/locale/lt/LC_MESSAGES/django.mo and b/wolnelektury/locale/lt/LC_MESSAGES/django.mo differ
index bc5d3d5..ab85ecb 100644 (file)
@@ -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
index bb03298..64a7d32 100644 (file)
Binary files a/wolnelektury/locale/pl/LC_MESSAGES/django.mo and b/wolnelektury/locale/pl/LC_MESSAGES/django.mo differ
index 05eb66f..2818539 100644 (file)
@@ -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
index 55259ba..bcaab30 100644 (file)
Binary files a/wolnelektury/locale/ru/LC_MESSAGES/django.mo and b/wolnelektury/locale/ru/LC_MESSAGES/django.mo differ
index bc5d3d5..ab85ecb 100644 (file)
@@ -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
index 55259ba..bcaab30 100644 (file)
Binary files a/wolnelektury/locale/uk/LC_MESSAGES/django.mo and b/wolnelektury/locale/uk/LC_MESSAGES/django.mo differ
index bc5d3d5..ab85ecb 100644 (file)
@@ -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
index 94388a5..66f2f6c 100644 (file)
@@ -130,6 +130,7 @@ INSTALLED_APPS = [
     'api',
     'rosetta',
     'infopages',
+    'suggest',
 ]
 
 CACHE_BACKEND = 'locmem:///?max_entries=3000'
index a0e5e3c..06c5e34 100644 (file)
@@ -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 = */
 /* ======================== */
index 7a7709d..9358851 100644 (file)
@@ -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'}); },
index f0eb274..ddec560 100644 (file)
                         {% 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">
                 <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.");
index 0628b15..5101355 100644 (file)
@@ -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',