From 92fd89419f48638b2181671cdc6c1f42adcbc395 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 14 Jan 2013 16:20:01 +0100 Subject: [PATCH] ask-a-lawyer stuff --- prawokultury/locale/pl/LC_MESSAGES/django.mo | Bin 1831 -> 1832 bytes prawokultury/locale/pl/LC_MESSAGES/django.po | 55 ++++++------ prawokultury/menu_items.py | 9 +- prawokultury/static/css/forms.css | 4 + prawokultury/static/css/forms.scss | 9 ++ prawokultury/urls.py | 2 +- questions/forms.py | 2 + questions/locale/pl/LC_MESSAGES/django.mo | Bin 0 -> 1392 bytes questions/locale/pl/LC_MESSAGES/django.po | 84 ++++++++++++++++++ questions/models.py | 2 + .../templates/questions/answered_mail.html | 21 +++++ .../templates/questions/question_form.html | 29 +++++- 12 files changed, 186 insertions(+), 31 deletions(-) create mode 100644 questions/locale/pl/LC_MESSAGES/django.mo create mode 100644 questions/locale/pl/LC_MESSAGES/django.po create mode 100755 questions/templates/questions/answered_mail.html diff --git a/prawokultury/locale/pl/LC_MESSAGES/django.mo b/prawokultury/locale/pl/LC_MESSAGES/django.mo index fc93ca50da58dbb8d3ea0e64ef308e215651cfb7..b33fca91f5cd38e8259148751ad1a44a72f24dd7 100644 GIT binary patch delta 576 zcmY+=ze_?<6u|NGQnS>otS}_Osihvg*DpvKOUJCGB_hd3y#fV)LW_SvW6&B6wTg>F zG)I#`Lqj;!(h}}XeUCkY4)4CtJC}FQJ@?*5@1o6K%zr7wG-Hl&&qy-%4PHbShw&Ll z@f8F3jvf5Oal9T9nZ*|Be@__27cc+72>BOI;5SmYDPf;Tkck*BVgj{b7Iou2^y7i& z5o)0m)aGg!BG1s3Zn%S*A7U5Ja0)jlmcSf_bslHfUmASqf(y?p93#I$9%=E?hB`Qp zj~K^3>bfA^YlAUlFNvehCz1XJq4OFezsRI#K~ExEb*EUZNX9K!s;RtNkZjE@IPISCW~?romTlTADSIt#tuI)%WrcFv q=B`tBD{iT1Zsw~_I<;ik|Nd+DeaA*va^-WUQ7RPOv$h*}Fn$0X;6Hx= delta 575 zcmXZYze@u#6u|LZf2gfmZHrZ;LR?(5&>vKxqLYe)SP@)YokesJ+ypmAzwhWHFP|iLm%K|WbQ5ZRM0^*Dh>~&gj+`Pl3_9Wo`>=yC ze8C6XvmC^dmC3}6RC_}ZJl;SlpL9K~Oh{XAZ!`ju*`0E0Oe!YCUqqr9+*KHTZK zi?Y!kb~*eQgUpxwN=@TBcCm!=GmC68iFq89bsWPw%6I3kO{Fdw46|^JG<8cSh1}x| zKI1t4pnTXz*-}^-IZMS**5gQBZpd>9mfVm(m!M|%3@K0|VA9E9VVU(pu5X|>mW`$Q z2q{H!d+sfO8&ZH;tryCUt=6oX?P$|F&{kRRSE^?2y+FqNQ{ylgnh\n" "Language-Team: FNP \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " -"|| n%100>=20) ? 1 : 2)\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -#: menu_items.py:21 +#: menu_items.py:15 msgid "Publications" msgstr "Publikacje" -#: menu_items.py:23 +#: menu_items.py:17 msgid "Events" msgstr "Wydarzenia" -#: menu_items.py:27 +#: menu_items.py:23 msgid "Positions" msgstr "Stanowiska" -#: menu_items.py:32 -msgid "First aid in copyright" -msgstr "Pierwsza pomoc w prawie autorskim" +#: menu_items.py:26 +msgid "First aid" +msgstr "Pierwsza pomoc" -#: urls.py:31 +#: menu_items.py:35 +msgid "Guide" +msgstr "Przewodnik" + +#: urls.py:41 msgid "events" msgstr "wydarzenia" @@ -50,7 +53,8 @@ msgstr "publikacje" msgid "info" msgstr "info" -#: templates/404.html:5 templates/404.html.py:10 +#: templates/404.html:5 +#: templates/404.html.py:10 msgid "Page not found" msgstr "Strona nie znaleziona" @@ -58,8 +62,11 @@ msgstr "Strona nie znaleziona" msgid "The page you were looking for doesn't exist." msgstr "Strona, której szukasz, nie istnieje." -#: templates/base.html:8 templates/base.html.py:14 templates/base.html:15 -#: templates/base.html.py:26 templates/base.html:75 +#: templates/base.html:8 +#: templates/base.html.py:14 +#: templates/base.html:15 +#: templates/base.html.py:26 +#: templates/base.html:78 msgid "Right to Culture" msgstr "Prawo kultury" @@ -87,19 +94,16 @@ msgstr "Szukaj" msgid "Upcoming events" msgstr "Nadchodzące wydarzenia" -#: templates/base.html:79 +#: templates/base.html:82 msgid "Latest comments" msgstr "Ostatnie komentarze" -#: templates/base.html:107 -msgid "" -"If not explicitly stated otherwise, all texts are licensed under the Creative Commons " -"Attribution-Share Alike free license." -msgstr "" -"Jeśli nie oznaczono inaczej, wszystkie teksty są objęte wolną licencją Creative " -"Commons Uznanie autorstwa – Na tych samych warunkach." +#: templates/base.html:110 +msgid "If not explicitly stated otherwise, all texts are licensed under the Creative Commons Attribution-Share Alike free license." +msgstr "Jeśli nie oznaczono inaczej, wszystkie teksty są objęte wolną licencją Creative Commons Uznanie autorstwa – Na tych samych warunkach." + +#~ msgid "First aid in copyright" +#~ msgstr "Pierwsza pomoc w prawie autorskim" #~ msgid "Page not found." #~ msgstr "Strona nie znaleziona." @@ -125,9 +129,6 @@ msgstr "" #~ msgid "About us" #~ msgstr "O nas" -#~ msgid "First aid" -#~ msgstr "Pierwsza pomoc" - #~ msgid "Categories" #~ msgstr "Kategorie" diff --git a/prawokultury/menu_items.py b/prawokultury/menu_items.py index f780c48..8f5d806 100644 --- a/prawokultury/menu_items.py +++ b/prawokultury/menu_items.py @@ -23,7 +23,14 @@ ITEMS.append(ObjectMenuItem( title=_('Positions') )) +ITEMS.append(MenuItem(reverse_lazy('questions_form'), _('First aid'), + more_urls=( + reverse_lazy('questions'), + #reverse_lazy('questions_question'), + reverse_lazy('questions_thanks'), + ))) + ITEMS.append(ObjectMenuItem( obj_get=lambda:Entry.published_objects.get(slug_pl='pierwsza-pomoc'), - title=_('First aid in copyright') + title=_('Guide') )) diff --git a/prawokultury/static/css/forms.css b/prawokultury/static/css/forms.css index 9b3957d..4acb30f 100644 --- a/prawokultury/static/css/forms.css +++ b/prawokultury/static/css/forms.css @@ -34,3 +34,7 @@ font-size: 1.1em; } .submit-form .helptext a { color: #363A3B; } + .submit-form .required label { + font-weight: bold; } + .submit-form .required label:before { + content: '* '; } diff --git a/prawokultury/static/css/forms.scss b/prawokultury/static/css/forms.scss index 626702e..9539415 100644 --- a/prawokultury/static/css/forms.scss +++ b/prawokultury/static/css/forms.scss @@ -51,4 +51,13 @@ color: #363A3B; } } + + .required { + label { + font-weight: bold; + } + label:before { + content: '* '; + } + } } diff --git a/prawokultury/urls.py b/prawokultury/urls.py index b0a1f08..4c957e5 100644 --- a/prawokultury/urls.py +++ b/prawokultury/urls.py @@ -40,7 +40,7 @@ if 'django_cas' in settings.INSTALLED_APPS: urlpatterns += i18n_patterns('', url(string_concat(r'^', _('events'), r'/'), include('events.urls')), url(r'^comments/', include('django_comments_xtd.urls')), - url(r'^prawnik/', include('questions.urls')), + url(r'^pierwsza-pomoc/', include('questions.urls')), ) + migdal_urlpatterns if settings.DEBUG: diff --git a/questions/forms.py b/questions/forms.py index 3a80db1..02c37c5 100755 --- a/questions/forms.py +++ b/questions/forms.py @@ -2,6 +2,8 @@ from django.forms import ModelForm from .models import Question class QuestionForm(ModelForm): + required_css_class = 'required' + class Meta: model = Question fields = ['email', 'question'] diff --git a/questions/locale/pl/LC_MESSAGES/django.mo b/questions/locale/pl/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..43ab53d212001865010c6b37be690f064e397c06 GIT binary patch literal 1392 zcmZva&2Ah;5XU=^@UcK32nmEZ6o-U-^<>6zL|A*1n8l7P*0JSmBEgCFOnbMzv)w~? zk0&$Ai3?A_0Rcx|0&zi##f3XJo`5Si4*Yv}?8Q=A+xx4ksj8`}slVPn`yIo13-<%u zA93Fe@)`W$JOQtPHTWU;GswZ;!I!{)z*oS3!PmfZFU<7|U_XBoQzPQeKL2@LuF0N(-sZ231B@|`(1&wn1g0R6pI zzuM}{VDQ^$`4D^=`d2N-AYRXqjzOHw2blHvVi4LBVnQ8n92;7OUc!7rkKu$FgucT& z(Gp|*u}mlA4Q0v|xu{8KS4k@~`nr_PE29ZNr@V|7zE0|l{8+ZmA-r_bMrqF>5n{ViNrEfUg=T9=C5iYvlD@YXQC*qIfOAC3q3*pN@yF6S^xLJKwf^U8_t)w1`tHNc z?FXG*Ss3g2mK&*ze_D)_@;KqiG9|aVw?4iWCvgl% zzAFz^NdA1kPv(9D;XEH&j3pP|*e>mgOirlZh=YlsRVy-sCsmZr4EMCDOxj?uqAxRFJxQBgWCuhW4%`XN_T)LtMPg, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-01-14 15:57+0100\n" +"PO-Revision-Date: 2013-01-14 15:59+0100\n" +"Last-Translator: Radek Czajka \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" + +#: models.py:11 +msgid "contact e-mail" +msgstr "e-mail kontaktowy" + +#: models.py:12 +#: models.py:29 +msgid "question" +msgstr "pytanie" + +#: models.py:13 +msgid "created at" +msgstr "utworzone" + +#: models.py:14 +msgid "changed at" +msgstr "zmienione" + +#: models.py:15 +msgid "approved" +msgstr "potwierdzone" + +#: models.py:16 +msgid "edited question" +msgstr "zmienione pytanie" + +#: models.py:17 +msgid "Leave empty if question doesn't need editing." +msgstr "Zostaw puste, jeśli pytanie nie wymaga zmian." + +#: models.py:18 +msgid "answer" +msgstr "odpowiedź" + +#: models.py:19 +msgid "Use Textile syntax." +msgstr "" + +#: models.py:20 +msgid "answered" +msgstr "udzielono odpowiedzi" + +#: models.py:21 +msgid "Check to send the answer to user." +msgstr "Zaznacz, by wysłać odpowiedź użytkownikowi." + +#: models.py:22 +msgid "answered at" +msgstr "udzielono odpowiedzi" + +#: models.py:23 +msgid "published" +msgstr "opublikowane" + +#: models.py:24 +msgid "Check to display answered question on site." +msgstr "Zaznaczy, by odpowiedź ukazała się na stronie." + +#: models.py:25 +msgid "published at" +msgstr "opublikowane" + +#: models.py:30 +msgid "questions" +msgstr "pytania" + diff --git a/questions/models.py b/questions/models.py index 94c6e1d..bc7d960 100644 --- a/questions/models.py +++ b/questions/models.py @@ -26,6 +26,8 @@ class Question(models.Model): class Meta: ordering = ['-created_at'] + verbose_name = _('question') + verbose_name_plural = _('questions') def __unicode__(self): return self.edited_question or self.question diff --git a/questions/templates/questions/answered_mail.html b/questions/templates/questions/answered_mail.html new file mode 100755 index 0000000..fa3f57a --- /dev/null +++ b/questions/templates/questions/answered_mail.html @@ -0,0 +1,21 @@ +{% load i18n %}{% language 'pl' %} +

{{ question.created_at }} zadałeś/zadałaś pytanie:

+ +
{{ question.question }}
+ +

Odpowiedź:

+ +
{{ question.answer }}
+ +{% if question.published %} +

Pytanie wraz z odpowiedzią można znaleźć na stronie: +http://{{ site.domain }}{{ question.get_absolute_url }} +

+{% endif %} + +

Dziękujemy!

+ +

-- +
{{ site }} +
{% endlanguage %} +

\ No newline at end of file diff --git a/questions/templates/questions/question_form.html b/questions/templates/questions/question_form.html index 40b5341..e6d956b 100755 --- a/questions/templates/questions/question_form.html +++ b/questions/templates/questions/question_form.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load url from future %} {% block "titleextra" %}Pierwsza pomoc w prawie autorskim: pytanie do prawnika :: {% endblock %} {% block "body" %} @@ -6,14 +7,38 @@
-
+

Jeżeli masz pytanie dotyczące prawa autorskiego, na które nie znalazłeś odpowiedzi +w naszym przewodniku, +możesz je nam zadać za pomocą poniższego formularza +lub telefonicznie pod nr [***] we wtorki w godzinach [***]. +Wybrane pytania (w razie potrzeby odpowiednio przeformułowane) oraz +odpowiedzi na te pytania będą publikowane na stronie PrawoKultury.pl. Możesz +zostawić swoje dane kontaktowe (adres e-mail), jeżeli chcesz, żebyśmy +skontaktowali się z Tobą w przypadku wątpliwości co do Twojego pytania. +Dane kontaktowe nie będą publikowane.

+ +

Możemy nie być w stanie odpowiedzieć na wszystkie pytania, a w przypadku +podobnych pytań możemy odsyłać do wcześniejszych odpowiedzi. +Odpowiedzi na pytania nie należy traktować jak porad prawnych. Jeżeli +poszukujesz porady prawnej skontaktuj się z prawnikiem.

+ +

Administratorem danych osobowych przetwarzanych w związku z +funkcjonowaniem tego serwisu jest Fundacja Nowoczesna Polska [pełne +dane]. Podanie danych osobowych jest dobrowolne. Dane są przetwarzane w +zakresie niezbędnym do prowadzenia serwisu. Osobom, których dane są +zbierane, przysługuje prawo dostępu do treści swoich danych oraz ich +poprawiania.

+ +
+ + {% csrf_token %} {{ form.as_table }}
- + {% endblock %} \ No newline at end of file -- 2.20.1