--- /dev/null
+# -*- 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)
--- /dev/null
+# -*- 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)
--- /dev/null
+# 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 ""
--- /dev/null
+# 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 ""
--- /dev/null
+# 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 ""
--- /dev/null
+# 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 ""
--- /dev/null
+# 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 ""
--- /dev/null
+# 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"
--- /dev/null
+# 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 ""
--- /dev/null
+# 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 ""
--- /dev/null
+# 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']
--- /dev/null
+# -*- 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
--- /dev/null
+{% 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
--- /dev/null
+# -*- 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'),
+)
+
--- /dev/null
+# -*- 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))
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"
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."
"\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 "
"\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
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
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"
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."
"\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 "
"\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
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
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"
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."
"\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 "
"\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
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
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"
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."
"\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 "
"\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
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
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"
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."
"\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 "
"\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
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
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"
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."
"\">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 "
"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
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
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"
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."
"\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 "
"\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
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
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"
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."
"\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 "
"\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
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
'api',
'rosetta',
'infopages',
+ 'suggest',
]
CACHE_BACKEND = 'locmem:///?max_entries=3000'
.cuteform .error {
color: #BF3024;
+ display: block;
}
/* ================ */
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 = */
/* ======================== */
});
}
});
+
+ $('#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'}); },
{% 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.");
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',