From d05a1d784f2f0dbad6839c672cae8226d1b0fa9d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 30 Nov 2011 16:24:21 +0100 Subject: [PATCH] publishable in save dialog --- apps/wiki/forms.py | 5 +++ apps/wiki/locale/pl/LC_MESSAGES/django.mo | Bin 3550 -> 3648 bytes apps/wiki/locale/pl/LC_MESSAGES/django.po | 33 ++++++++++-------- .../wiki/templates/wiki/document_details.html | 4 ++- apps/wiki/templates/wiki/save_dialog.html | 9 +++++ .../templates/wiki/tabs/history_view.html | 2 ++ apps/wiki/views.py | 4 +++ 7 files changed, 42 insertions(+), 15 deletions(-) diff --git a/apps/wiki/forms.py b/apps/wiki/forms.py index 394b823b..3ef3ed14 100644 --- a/apps/wiki/forms.py +++ b/apps/wiki/forms.py @@ -59,6 +59,11 @@ class DocumentTextSaveForm(forms.Form): help_text=_(u"If you completed a life cycle stage, select it."), ) + publishable = forms.BooleanField(required=False, initial=False, + label=_('Publishable'), + help_text=_(u"Mark this revision as publishable.") + ) + def __init__(self, *args, **kwargs): user = kwargs.pop('user') r = super(DocumentTextSaveForm, self).__init__(*args, **kwargs) diff --git a/apps/wiki/locale/pl/LC_MESSAGES/django.mo b/apps/wiki/locale/pl/LC_MESSAGES/django.mo index 96287ca27c145d90f1ca22a9ff164ba77b6f5a36..d886dcecd0cc8b1f59469d0a1177d016c2f413fa 100644 GIT binary patch delta 1452 zcmYk+OGs2v9LMqFIGUzuKC*n})oM($@s*EEqsOL<5E98nMdJe_jAvgx##@PgS(VFpBGt5cV9P@ z!$cmD>@ubm|Hg8ooQN|f2~T1?wqXjMv-NBzUM1e#GR-DBsKE)P%iEHpJ_L%wh zjT;TnMDMZ-!_dTkgy8HZdy%We~XQ;G$WmIBkQT<@;mN@WMJj_4!w*SNDb8oC##g~F*|WU!FV<%e_mN`ExH)F{-BMCXFF ILOd4y0~@el3IG5A diff --git a/apps/wiki/locale/pl/LC_MESSAGES/django.po b/apps/wiki/locale/pl/LC_MESSAGES/django.po index eb51b71b..0182abed 100644 --- a/apps/wiki/locale/pl/LC_MESSAGES/django.po +++ b/apps/wiki/locale/pl/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: Platforma Redakcyjna\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-25 14:14+0100\n" -"PO-Revision-Date: 2011-11-25 14:15+0100\n" +"POT-Creation-Date: 2011-11-30 16:07+0100\n" +"PO-Revision-Date: 2011-11-30 16:08+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: Fundacja Nowoczesna Polska \n" "Language: \n" @@ -17,32 +17,33 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #: forms.py:19 -#: views.py:274 +#: forms.py:63 +#: views.py:279 msgid "Publishable" msgstr "Gotowe do publikacji" #: forms.py:38 -#: forms.py:84 +#: forms.py:89 msgid "Author" msgstr "Autor" #: forms.py:39 -#: forms.py:85 +#: forms.py:90 msgid "Your name" msgstr "Imię i nazwisko" #: forms.py:44 -#: forms.py:90 +#: forms.py:95 msgid "Author's email" msgstr "E-mail autora" #: forms.py:45 -#: forms.py:91 +#: forms.py:96 msgid "Your email address, so we can show a gravatar :)" msgstr "Adres e-mail, żebyśmy mogli pokazać gravatar :)" #: forms.py:51 -#: forms.py:97 +#: forms.py:102 msgid "Your comments" msgstr "Twój komentarz" @@ -58,7 +59,11 @@ msgstr "Ukończono" msgid "If you completed a life cycle stage, select it." msgstr "Jeśli został ukończony etap prac, wskaż go." -#: forms.py:98 +#: forms.py:64 +msgid "Mark this revision as publishable." +msgstr "Oznacz tę wersję jako gotową do publikacji." + +#: forms.py:103 msgid "Describe the reason for reverting." msgstr "Opisz powód przywrócenia." @@ -74,11 +79,11 @@ msgstr "motyw" msgid "themes" msgstr "motywy" -#: views.py:294 +#: views.py:299 msgid "Revision marked" msgstr "Wersja oznaczona" -#: views.py:296 +#: views.py:301 msgid "Nothing changed" msgstr "Nic nie uległo zmianie" @@ -164,15 +169,15 @@ msgstr "Galeria" msgid "Compare versions" msgstr "Porównaj wersje" -#: templates/wiki/tabs/history_view.html:7 +#: templates/wiki/tabs/history_view.html:8 msgid "Mark for publishing" msgstr "Oznacz do publikacji" -#: templates/wiki/tabs/history_view.html:9 +#: templates/wiki/tabs/history_view.html:11 msgid "Revert document" msgstr "Przywróć wersję" -#: templates/wiki/tabs/history_view.html:12 +#: templates/wiki/tabs/history_view.html:14 msgid "View version" msgstr "Zobacz wersję" diff --git a/apps/wiki/templates/wiki/document_details.html b/apps/wiki/templates/wiki/document_details.html index d95603f6..db003d2c 100644 --- a/apps/wiki/templates/wiki/document_details.html +++ b/apps/wiki/templates/wiki/document_details.html @@ -43,5 +43,7 @@ {% include "wiki/save_dialog.html" %} {% include "wiki/revert_dialog.html" %} {% include "wiki/tag_dialog.html" %} - {% include "wiki/pubmark_dialog.html" %} + {% if can_pubmark %} + {% include "wiki/pubmark_dialog.html" %} + {% endif %} {% endblock %} diff --git a/apps/wiki/templates/wiki/save_dialog.html b/apps/wiki/templates/wiki/save_dialog.html index c34eb9ec..31c5b014 100644 --- a/apps/wiki/templates/wiki/save_dialog.html +++ b/apps/wiki/templates/wiki/save_dialog.html @@ -33,6 +33,15 @@ {{ forms.text_save.stage_completed.help_text }}

+ {% if can_pubmark %} +

+ {{ forms.text_save.publishable.label_tag }}: + {{ forms.text_save.publishable }} + {{ forms.text_save.publishable.help_text }} + +

+ {% endif %} + {% endif %} diff --git a/apps/wiki/templates/wiki/tabs/history_view.html b/apps/wiki/templates/wiki/tabs/history_view.html index c363cef4..0d662a7f 100644 --- a/apps/wiki/templates/wiki/tabs/history_view.html +++ b/apps/wiki/templates/wiki/tabs/history_view.html @@ -3,8 +3,10 @@
+ {% if can_pubmark %} + {% endif %}