fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3257903
)
publishable in save dialog
author
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 30 Nov 2011 15:24:21 +0000
(16:24 +0100)
committer
Radek Czajka
<radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 30 Nov 2011 15:24:21 +0000
(16:24 +0100)
apps/wiki/forms.py
patch
|
blob
|
history
apps/wiki/locale/pl/LC_MESSAGES/django.mo
patch
|
blob
|
history
apps/wiki/locale/pl/LC_MESSAGES/django.po
patch
|
blob
|
history
apps/wiki/templates/wiki/document_details.html
patch
|
blob
|
history
apps/wiki/templates/wiki/save_dialog.html
patch
|
blob
|
history
apps/wiki/templates/wiki/tabs/history_view.html
patch
|
blob
|
history
apps/wiki/views.py
patch
|
blob
|
history
diff --git
a/apps/wiki/forms.py
b/apps/wiki/forms.py
index
394b823
..
3ef3ed1
100644
(file)
--- 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."),
)
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)
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
96287ca
..
d886dce
100644
(file)
Binary files a/apps/wiki/locale/pl/LC_MESSAGES/django.mo and b/apps/wiki/locale/pl/LC_MESSAGES/django.mo differ
diff --git
a/apps/wiki/locale/pl/LC_MESSAGES/django.po
b/apps/wiki/locale/pl/LC_MESSAGES/django.po
index
eb51b71
..
0182abe
100644
(file)
--- 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"
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"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org.pl>\n"
"Language: \n"
@@
-17,32
+17,33
@@
msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:19
"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
msgid "Publishable"
msgstr "Gotowe do publikacji"
#: forms.py:38
-#: forms.py:8
4
+#: forms.py:8
9
msgid "Author"
msgstr "Autor"
#: forms.py:39
msgid "Author"
msgstr "Autor"
#: forms.py:39
-#: forms.py:
85
+#: forms.py:
90
msgid "Your name"
msgstr "Imię i nazwisko"
#: forms.py:44
msgid "Your name"
msgstr "Imię i nazwisko"
#: forms.py:44
-#: forms.py:9
0
+#: forms.py:9
5
msgid "Author's email"
msgstr "E-mail autora"
#: forms.py:45
msgid "Author's email"
msgstr "E-mail autora"
#: forms.py:45
-#: forms.py:9
1
+#: forms.py:9
6
msgid "Your email address, so we can show a gravatar :)"
msgstr "Adres e-mail, żebyśmy mogli pokazać gravatar :)"
#: forms.py:51
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 "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."
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 "Describe the reason for reverting."
msgstr "Opisz powód przywrócenia."
@@
-74,11
+79,11
@@
msgstr "motyw"
msgid "themes"
msgstr "motywy"
msgid "themes"
msgstr "motywy"
-#: views.py:29
4
+#: views.py:29
9
msgid "Revision marked"
msgstr "Wersja oznaczona"
msgid "Revision marked"
msgstr "Wersja oznaczona"
-#: views.py:
296
+#: views.py:
301
msgid "Nothing changed"
msgstr "Nic nie uległo zmianie"
msgid "Nothing changed"
msgstr "Nic nie uległo zmianie"
@@
-164,15
+169,15
@@
msgstr "Galeria"
msgid "Compare versions"
msgstr "Porównaj wersje"
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"
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ę"
msgid "Revert document"
msgstr "Przywróć wersję"
-#: templates/wiki/tabs/history_view.html:1
2
+#: templates/wiki/tabs/history_view.html:1
4
msgid "View version"
msgstr "Zobacz wersję"
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
d95603f
..
db003d2
100644
(file)
--- 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/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 %}
{% endblock %}
diff --git
a/apps/wiki/templates/wiki/save_dialog.html
b/apps/wiki/templates/wiki/save_dialog.html
index
c34eb9e
..
31c5b01
100644
(file)
--- a/
apps/wiki/templates/wiki/save_dialog.html
+++ b/
apps/wiki/templates/wiki/save_dialog.html
@@
-33,6
+33,15
@@
<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>
<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 %}
{% endif %}
diff --git
a/apps/wiki/templates/wiki/tabs/history_view.html
b/apps/wiki/templates/wiki/tabs/history_view.html
index
c363cef
..
0d662a7
100644
(file)
--- a/
apps/wiki/templates/wiki/tabs/history_view.html
+++ b/
apps/wiki/templates/wiki/tabs/history_view.html
@@
-3,8
+3,10
@@
<div class="toolbar">
<button type="button" id="make-diff-button"
data-enabled-when="2" disabled="disabled">{% trans "Compare versions" %}</button>
<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>
<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"
<button type="button" id="doc-revert-button"
data-enabled-when="1" disabled="disabled">{% trans "Revert document" %}</button>
<button id="open-preview-button" disabled="disabled"
diff --git
a/apps/wiki/views.py
b/apps/wiki/views.py
index
f58e03a
..
0356d50
100644
(file)
--- a/
apps/wiki/views.py
+++ b/
apps/wiki/views.py
@@
-69,6
+69,7
@@
def editor(request, slug, chunk=None, template_name='wiki/document_details.html'
"text_revert": forms.DocumentTextRevertForm(prefix="textrevert"),
"pubmark": forms.DocumentPubmarkForm(prefix="pubmark"),
},
"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,
})
'REDMINE_URL': settings.REDMINE_URL,
})
@@
-125,6
+126,8
@@
def text(request, chunk_id):
parent = None
stage = form.cleaned_data['stage_completed']
tags = [stage] if stage else []
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,
doc.commit(author=author,
text=text,
parent=parent,
@@
-132,6
+135,7
@@
def text(request, chunk_id):
tags=tags,
author_name=form.cleaned_data['author_name'],
author_email=form.cleaned_data['author_email'],
tags=tags,
author_name=form.cleaned_data['author_name'],
author_email=form.cleaned_data['author_email'],
+ publishable=publishable,
)
revision = doc.revision()
return JSONResponse({
)
revision = doc.revision()
return JSONResponse({