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)
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 <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org.pl>\n"
"Language: \n"
"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"
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."
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"
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ę"
{% 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 %}
<span class="help_text">{{ forms.text_save.stage_completed.help_text }}</span>
<span data-ui-error-for="{{ forms.text_save.stage_completed.name }}"> </span>
</p>
+ {% if can_pubmark %}
+ <p>
+ {{ forms.text_save.publishable.label_tag }}:
+ {{ forms.text_save.publishable }}
+ <span class="help_text">{{ forms.text_save.publishable.help_text }}</span>
+ <span data-ui-error-for="{{ forms.text_save.publishable.name }}"> </span>
+ </p>
+ {% endif %}
+
{% endif %}
<div class="toolbar">
<button type="button" id="make-diff-button"
data-enabled-when="2" disabled="disabled">{% trans "Compare versions" %}</button>
+ {% if can_pubmark %}
<button type="button" id="pubmark-changeset-button"
data-enabled-when="1" disabled="disabled">{% trans "Mark for publishing" %}</button>
+ {% endif %}
<button type="button" id="doc-revert-button"
data-enabled-when="1" disabled="disabled">{% trans "Revert document" %}</button>
<button id="open-preview-button" disabled="disabled"
"text_revert": forms.DocumentTextRevertForm(prefix="textrevert"),
"pubmark": forms.DocumentPubmarkForm(prefix="pubmark"),
},
+ 'can_pubmark': request.user.has_perm('catalogue.can_pubmark'),
'REDMINE_URL': settings.REDMINE_URL,
})
parent = None
stage = form.cleaned_data['stage_completed']
tags = [stage] if stage else []
+ publishable = (form.cleaned_data['publishable'] and
+ request.user.has_perm('catalogue.can_pubmark'))
doc.commit(author=author,
text=text,
parent=parent,
tags=tags,
author_name=form.cleaned_data['author_name'],
author_email=form.cleaned_data['author_email'],
+ publishable=publishable,
)
revision = doc.revision()
return JSONResponse({