From: Radek Czajka Date: Tue, 28 Aug 2012 13:17:48 +0000 (+0200) Subject: comment form X-Git-Url: https://git.mdrn.pl/prawokultury.git/commitdiff_plain/5120532d42f2130dd250ec7089d28d9d0fa2b09c comment form --- diff --git a/events/locale/pl/LC_MESSAGES/django.po b/events/locale/pl/LC_MESSAGES/django.po index e758503..c5bf9ce 100644 --- a/events/locale/pl/LC_MESSAGES/django.po +++ b/events/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: prawokultury-events\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-28 11:24+0200\n" +"POT-Creation-Date: 2012-08-28 15:15+0200\n" "PO-Revision-Date: 2012-08-28 11:28+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: FNP \n" @@ -15,7 +15,8 @@ msgstr "" "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" #: models.py:11 msgid "date" @@ -68,4 +69,3 @@ msgstr "Organizator" #: templates/events/snippets/events_box.html:21 msgid "more events" msgstr "więcej wydarzeń" - diff --git a/migdal/locale/pl/LC_MESSAGES/django.mo b/migdal/locale/pl/LC_MESSAGES/django.mo index 83ff231..70fc97d 100644 Binary files a/migdal/locale/pl/LC_MESSAGES/django.mo and b/migdal/locale/pl/LC_MESSAGES/django.mo differ diff --git a/migdal/locale/pl/LC_MESSAGES/django.po b/migdal/locale/pl/LC_MESSAGES/django.po index 4588ee9..617d631 100644 --- a/migdal/locale/pl/LC_MESSAGES/django.po +++ b/migdal/locale/pl/LC_MESSAGES/django.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: django-migdal 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-28 12:37+0200\n" -"PO-Revision-Date: 2012-08-28 12:38+0100\n" -"Last-Translator: Marcin Koziej \n" +"POT-Creation-Date: 2012-08-28 15:15+0200\n" +"PO-Revision-Date: 2012-08-28 15:17+0100\n" +"Last-Translator: Radek Czajka \n" "Language-Team: FNP \n" "Language: Polish\n" "MIME-Version: 1.0\n" @@ -155,44 +155,33 @@ msgstr "dzieki" msgid "search" msgstr "szukaj" -#: templates/comments/migdal/entry/preview.html:19 -msgid "Please correct the error below" -msgid_plural "Please correct the errors below" -msgstr[0] "Proszę poprawić poniższy błąd" -msgstr[1] "Proszę poprawić poniższe błędy" -msgstr[2] "Proszę poprawić poniższe błędy" +#: templates/comments/form.html:3 +msgid "Add comment" +msgstr "Dodaj komentarz" -#: templates/comments/migdal/entry/preview.html:21 -msgid "Preview your comment" -msgstr "Podgląd komentarza" - -#: templates/comments/migdal/entry/preview.html:29 -msgid "and" -msgstr "i" - -#: templates/comments/migdal/entry/preview.html:29 -msgid "Post your comment" -msgstr "Wyślij komentarz" - -#: templates/comments/migdal/entry/preview.html:29 -msgid "or make changes" -msgstr "lub zmień" - -#: templates/comments/migdal/entry/preview.html:45 +#: templates/comments/form.html:24 msgid "Post" msgstr "Wyślij" -#: templates/comments/migdal/entry/preview.html:46 +#: templates/comments/form.html:25 msgid "Preview" msgstr "Podgląd" +#: templates/comments/migdal/entry/list.html:5 +msgid "Comments" +msgstr "Komentarze" + +#: templates/comments/migdal/entry/preview.html:26 +msgid "Preview your comment" +msgstr "Podgląd komentarza" + #: templates/migdal/entry/entry_list.html:22 msgid "Category" msgstr "Kategoria" #: templates/migdal/entry/entry_list.html:55 msgid "Submit a new story, create Culture's Right with us!" -msgstr "Przyślij nowego newsa, twórz Prawo Kultury razem z nami!" +msgstr "Dodaj nowy wpis, twórz Prawo Kultury razem z nami!" #: templates/migdal/entry/entry_short.html:16 #, python-format @@ -208,7 +197,7 @@ msgstr "czytaj więcej" #: templates/migdal/entry/submit.html:7 msgid "Submit new story" -msgstr "Przyślij nowego newsa." +msgstr "Dodaj nowy wpis" #: templates/migdal/entry/submit.html:9 msgid "" @@ -218,14 +207,18 @@ msgid "" "free license." msgstr "" "\n" -"Wysyłając newsa, zgadzasz się najego publikację na warunkach wolnej licencji\n" +"Dodając wpis, zgadzasz się najego publikację na warunkach wolnej licencji\n" "Creative Commons Uznanie autorstwa – Na tych samych warunkach." #: templates/migdal/entry/submit.html:14 msgid "" "Stories are moderated, so please be\n" "patient, you'll be notified when it's published." -msgstr "Newsy są moderowane. Bądź cierpliwy, otrzymasz powiadomienie o jego publikacji." +msgstr "Wpisy są moderowane. Bądź cierpliwy, otrzymasz powiadomienie o jego publikacji." + +#: templates/migdal/entry/submit.html:21 +msgid "Submit" +msgstr "Wyślij" #: templates/migdal/entry/submit_thanks.html:7 msgid "Thanks for submitting" @@ -239,7 +232,7 @@ msgid "" "and comments.\n" msgstr "" "\n" -"Dziękujemy za przysłanie nowego newsa, teraz czeka on na moderację.Jeśli podano adres e-mail, będziemy Cię informowali o zmianach statusui komentarzach\n" +"Dziękujemy za dodanie nowego wpisu, teraz czeka on na moderację.Jeśli podano adres e-mail, będziemy Cię informowali o zmianach statusui komentarzach\n" #: templates/search/search.html:9 msgid "Search results" @@ -269,6 +262,22 @@ msgstr "Wydarzenia" msgid "Positions" msgstr "Stanowiska" +#~ msgid "Please correct the error below" + +#~ msgid_plural "Please correct the errors below" +#~ msgstr[0] "Proszę poprawić poniższy błąd" +#~ msgstr[1] "Proszę poprawić poniższe błędy" +#~ msgstr[2] "Proszę poprawić poniższe błędy" + +#~ msgid "and" +#~ msgstr "i" + +#~ msgid "Post your comment" +#~ msgstr "Wyślij komentarz" + +#~ msgid "or make changes" +#~ msgstr "lub zmień" + #~ msgid "Latest news" #~ msgstr "Ostatnie newsy" diff --git a/migdal/templates/comments/form.html b/migdal/templates/comments/form.html new file mode 100755 index 0000000..341750f --- /dev/null +++ b/migdal/templates/comments/form.html @@ -0,0 +1,29 @@ +{% load comments i18n %} +
+

{% trans "Add comment" %}

+
{% csrf_token %} + {% if next %}{% endif %} + {% for field in form %} + {% if field.is_hidden %} + {{ field }} + {% endif %} + {% endfor %} + + {% for field in form %} + {% if not field.is_hidden %} + + + {% endif %} + {% endfor %} + +
{{ field.label_tag }} + + {% if field.errors %}

{{ field.errors }}

{% endif %} + {{ field }} +
+ + +
+
+
diff --git a/migdal/templates/comments/migdal/entry/list.html b/migdal/templates/comments/migdal/entry/list.html index c01f256..9f7241b 100755 --- a/migdal/templates/comments/migdal/entry/list.html +++ b/migdal/templates/comments/migdal/entry/list.html @@ -1,13 +1,26 @@ +{% load i18n %} {% load gravatar %} {% load markup_tags %} -
+ +

{% trans "Comments" %}

+
{% for comment in comment_list %} -
- - {{ comment.submit_date }} - {{ comment.name }} -
-
-

{{ comment.comment|textile_restricted_pl }}

-
+
+ Avatar +
+
+ {% if comment.url %} + + {% endif %} + {{ comment.name }} + {% if comment.url %} + + {% endif %} +
+
{{ comment.submit_date }}
+
+
{{ comment.comment|textile_restricted_pl }}
+
{% endfor %} -
\ No newline at end of file +
+ \ No newline at end of file diff --git a/migdal/templates/comments/migdal/entry/preview.html b/migdal/templates/comments/migdal/entry/preview.html index c322f9a..6d2b5ff 100755 --- a/migdal/templates/comments/migdal/entry/preview.html +++ b/migdal/templates/comments/migdal/entry/preview.html @@ -1,51 +1,45 @@ {% extends "base.html" %} -{% load i18n %} -{% load comments %} -{% load gravatar %} +{% load comments gravatar i18n %} {% load migdal_tags markup_tags %} +{% block "main_menu" %} + {% main_menu 'object' entry %} +{% endblock "main_menu" %} + + {% block "body" %} -{% entry_begin form.target_object %} +
+
+ +{% entry_begin form.target_object 1 %} +
{{ form.target_object.body }} +
+ +{% if form.target_object.get_type.commentable %} +
+ + {% render_comment_list for form.target_object %} + +

{% trans "Preview your comment" %}

+
+ +
+ Avatar +
+
{{ form.name.value }}
+
+
{{ comment|textile_restricted_pl }}
+
+
-{% render_comment_list for form.target_object %} - - -
{% csrf_token %} - {% if next %}
{% endif %} - {% if form.errors %} -

{% blocktrans count counter=form.errors|length %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}

- {% else %} -

{% trans "Preview your comment" %}

-
- - {{ form.name.value }} -
- -
{{ comment|textile_restricted_pl }}
-

- {% trans "and" %} {% trans "or make changes" %}: -

- {% endif %} - {% for field in form %} - {% if field.is_hidden %} -
{{ field }}
- {% else %} - {% if field.errors %}{{ field.errors }}{% endif %} - - {% endif %} - {% endfor %} -

- - -

-
+ {% include "comments/form.html" %} +
+{% endif %} +
+
{% endblock %} diff --git a/migdal/templates/django_comments_xtd/email_followup_comment.html b/migdal/templates/django_comments_xtd/email_followup_comment.html index 1987906..2e5e858 100644 --- a/migdal/templates/django_comments_xtd/email_followup_comment.html +++ b/migdal/templates/django_comments_xtd/email_followup_comment.html @@ -2,16 +2,11 @@

{{ user_name }},

Pojawił się nowy komentarz w wątku z Twoim udziałem.

-

(There is a new comment following up yours.)

-{% if content_object.published_pl %}{% language 'pl' %} +{% language 'pl' %} „{{ content_object.title }}” -{% endlanguage %}{% endif %} -{% if content_object.published_en %}{% language 'en' %} -
- “{{ content_object.title}}

-{% endlanguage %}{% endif %} +{% endlanguage %}

{{ comment.name }}, {{ comment.submit_date|date:"SHORT_DATE_FORMAT" }}:

diff --git a/migdal/templates/django_comments_xtd/email_followup_comment.txt b/migdal/templates/django_comments_xtd/email_followup_comment.txt index a1ca8f1..834c60e 100755 --- a/migdal/templates/django_comments_xtd/email_followup_comment.txt +++ b/migdal/templates/django_comments_xtd/email_followup_comment.txt @@ -1,12 +1,9 @@ {% load i18n %}{{ user_name }}, Pojawił się nowy komentarz w wątku z Twoim udziałem. -(There is a new comment following up yours.) -{% if content_object.published_pl %}{% language 'pl' %}Polska wersja: „{{ content_object.title }}” - http://{{ site.domain }}{{ content_object.get_absolute_url }}{% endlanguage %}{% endif %} -{% if content_object.published_en %}{% language 'en' %}English version: “{{ content_object.title }}” - http://{{ site.domain }}{{ content_object.get_absolute_url }}{% endlanguage %}{% endif %} +{% language 'pl' %}„{{ content_object.title }}” +http://{{ site.domain }}{{ content_object.get_absolute_url }}{% endlanguage %} {{ comment.name }}, {{ comment.submit_date|date:"SHORT_DATE_FORMAT" }}: diff --git a/migdal/templates/migdal/entry/entry_begin.html b/migdal/templates/migdal/entry/entry_begin.html index 097d29c..9f07e0d 100755 --- a/migdal/templates/migdal/entry/entry_begin.html +++ b/migdal/templates/migdal/entry/entry_begin.html @@ -36,7 +36,7 @@ {% if object.image %} - {{ entry.body }} +
{% if entry.get_type.commentable %} {% render_comment_list for entry %} +
{% entry_comment_form entry %} +
{% endif %} diff --git a/migdal/templates/migdal/entry/submit.html b/migdal/templates/migdal/entry/submit.html index ad3d6f2..cc376d7 100755 --- a/migdal/templates/migdal/entry/submit.html +++ b/migdal/templates/migdal/entry/submit.html @@ -11,14 +11,14 @@ By submitting a story here, you agree to publish it under the terms of the Creative Commons Attribution-Share Alike free license.{% endblocktrans %}

-

{% blocktrans %}Stories are moderated, so please be +

{% blocktrans %}Stories are moderated, so please be patient, you'll be notified when it's published.{% endblocktrans %}

{% csrf_token %} {{ submit_form.as_table }} - +
diff --git a/prawokultury/locale/pl/LC_MESSAGES/django.po b/prawokultury/locale/pl/LC_MESSAGES/django.po index 02a7abd..88bb799 100644 --- a/prawokultury/locale/pl/LC_MESSAGES/django.po +++ b/prawokultury/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: prawokultury\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-08-28 12:13+0200\n" +"POT-Creation-Date: 2012-08-28 15:15+0200\n" "PO-Revision-Date: 2012-08-28 12:13+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: FNP \n" @@ -15,14 +15,14 @@ msgstr "" "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" -#: urls.py:24 +#: urls.py:23 msgid "events" msgstr "wydarzenia" -#: templates/base.html:8 -#: templates/base.html.py:18 +#: templates/base.html:8 templates/base.html.py:18 msgid "Culture's right" msgstr "Prawo kultury" @@ -55,8 +55,14 @@ msgid "Latest comments" msgstr "Ostatnie komentarze" #: templates/base.html:86 -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 "" +"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/prevnext/next.html:13 msgid "next" diff --git a/prawokultury/static/css/entry.css b/prawokultury/static/css/entry.css index d8b835a..6c19bf1 100644 --- a/prawokultury/static/css/entry.css +++ b/prawokultury/static/css/entry.css @@ -16,6 +16,8 @@ font-size: 1.2em; } .entry-wrapped h1 a, .entry-wrapped h2 a { color: #01519a; } + .entry-wrapped h2.section { + margin: 2em 0; } .entry-wrapped .entry-data { font-size: 1.2em; margin-top: 1.4em; @@ -73,3 +75,18 @@ content: url("/static/img/plus.png"); vertical-align: top; margin-right: 1em; } + +.comments { + margin-left: 8em; } + .comments .comment-form { + border-top: 1px solid #494948; } + .comments .comment-data { + font-size: 1.2em; + margin-top: 1.4em; + margin-bottom: 1.4em; } + .comments .comment-data .comment-date { + color: #acacac; } + .comments .comment-data .comment-author { + font-weight: bold; } + .comments .body { + font-size: 1.2em; } diff --git a/prawokultury/static/css/entry.scss b/prawokultury/static/css/entry.scss index 77c2935..e6b5056 100755 --- a/prawokultury/static/css/entry.scss +++ b/prawokultury/static/css/entry.scss @@ -25,6 +25,10 @@ } } + h2.section { + margin: 2em 0; + } + .entry-data { font-size: 1.2em; margin-top: 1.4em; @@ -104,4 +108,29 @@ vertical-align: top; margin-right: 1em; } -} \ No newline at end of file +} + + +.comments { + margin-left: 8em; + + .comment-form { + border-top: 1px solid #494948; + } + + .comment-data { + font-size: 1.2em; + margin-top: 1.4em; + margin-bottom: 1.4em; + .comment-date { + color: #acacac; + } + .comment-author { + font-weight: bold; + } + } + + .body { + font-size: 1.2em; + } +} diff --git a/prawokultury/static/css/forms.css b/prawokultury/static/css/forms.css index 0898882..9b3957d 100644 --- a/prawokultury/static/css/forms.css +++ b/prawokultury/static/css/forms.css @@ -2,7 +2,7 @@ font-size: 1.2em; } .submit-form { - margin-top: 1.3em; } + margin-top: 3em; } .submit-form table { border-spacing: 0 .5em; } .submit-form tr { @@ -10,19 +10,27 @@ .submit-form label { font-size: 1.2em; font-weight: normal; } + .submit-form .errorlist { + color: #e41b13; + font-size: 1.2em; + padding: 0 0 0 1.3em; + margin: 0 0 .5em 0; + list-style: url("/static/img/read-more.png"); } .submit-form input, .submit-form textarea, .submit-form select { font-size: 1.2em; border: 0; - background-color: #fdfdfd; + background-color: white; + color: #363A3B; width: 100%; - margin-bottom: .5em; } + margin-bottom: .5em; + border: 1px solid #EDECE7; } .submit-form th, .submit-form td { text-align: left; font-weight: normal; vertical-align: top; - padding: .5em 0; } + padding: .5em; } .submit-form .helptext { color: #acacac; font-size: 1.1em; } .submit-form .helptext a { - color: black; } + color: #363A3B; } diff --git a/prawokultury/static/css/forms.scss b/prawokultury/static/css/forms.scss index ce7625a..626702e 100755 --- a/prawokultury/static/css/forms.scss +++ b/prawokultury/static/css/forms.scss @@ -3,7 +3,7 @@ } .submit-form { - margin-top: 1.3em; + margin-top: 3em; table { border-spacing: 0 .5em; @@ -18,12 +18,22 @@ font-weight: normal; } + .errorlist { + color: #e41b13; + font-size: 1.2em; + padding: 0 0 0 1.3em; + margin: 0 0 .5em 0; + list-style: url("/static/img/read-more.png"); + } + input, textarea, select { font-size: 1.2em; border: 0; - background-color: #fdfdfd; + background-color: white; + color: #363A3B; width: 100%; margin-bottom: .5em; + border: 1px solid #EDECE7; } @@ -31,14 +41,14 @@ text-align: left; font-weight: normal; vertical-align: top; - padding: .5em 0; + padding: .5em; } .helptext { color: #acacac; font-size: 1.1em; a { - color: black; + color: #363A3B; } } } diff --git a/prawokultury/static/css/sidebar.css b/prawokultury/static/css/sidebar.css index f5baa3d..0bc8a60 100644 --- a/prawokultury/static/css/sidebar.css +++ b/prawokultury/static/css/sidebar.css @@ -8,6 +8,8 @@ font-weight: normal; margin-top: 0; margin-bottom: 1.1em; } + .sidebar-box h3 a { + color: #363A3B; } .sidebar-box .more { text-align: right; } .sidebar-box .event-list { diff --git a/prawokultury/static/css/sidebar.scss b/prawokultury/static/css/sidebar.scss index ecc6416..2ff8674 100755 --- a/prawokultury/static/css/sidebar.scss +++ b/prawokultury/static/css/sidebar.scss @@ -9,6 +9,10 @@ font-weight: normal; margin-top: 0; margin-bottom: 1.1em; + + a { + color: #363A3B; + } } .more { diff --git a/prawokultury/templates/base.html b/prawokultury/templates/base.html index 9977e37..976b56e 100755 --- a/prawokultury/templates/base.html +++ b/prawokultury/templates/base.html @@ -52,7 +52,7 @@