class BookAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ['title']}
+ search_fields = ['title']
admin.site.register(models.Book, BookAdmin)
tabs.append(Tab('create', _('Add'), reverse("catalogue_create_missing")))
tabs.append(Tab('upload', _('Upload'), reverse("catalogue_upload")))
- if user.is_staff:
- tabs.append(Tab('admin', _('Admin'), reverse("admin:index")))
-
return {"tabs": tabs, "active_tab": active}
msgstr ""
"Project-Id-Version: Platforma Redakcyjna\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-21 15:52+0200\n"
-"PO-Revision-Date: 2011-10-21 15:52+0100\n"
+"POT-Creation-Date: 2011-11-25 14:14+0100\n"
+"PO-Revision-Date: 2011-11-25 14:15+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:255
+#: views.py:274
msgid "Publishable"
msgstr "Gotowe do publikacji"
msgid "themes"
msgstr "motywy"
-#: views.py:273
+#: views.py:294
msgid "Revision marked"
msgstr "Wersja oznaczona"
-#: views.py:275
+#: views.py:296
msgid "Nothing changed"
msgstr "Nic nie uległo zmianie"
msgid "Title"
msgstr "Tytuł"
-#: templates/wiki/tabs/summary_view.html:14
+#: templates/wiki/tabs/summary_view.html:13
+msgid "Go to the book's page"
+msgstr "Przejdź do strony książki"
+
+#: templates/wiki/tabs/summary_view.html:16
msgid "Document ID"
msgstr "ID dokumentu"
-#: templates/wiki/tabs/summary_view.html:18
+#: templates/wiki/tabs/summary_view.html:20
msgid "Current version"
msgstr "Aktualna wersja"
-#: templates/wiki/tabs/summary_view.html:21
+#: templates/wiki/tabs/summary_view.html:23
msgid "Last edited by"
msgstr "Ostatnio edytowane przez"
-#: templates/wiki/tabs/summary_view.html:25
+#: templates/wiki/tabs/summary_view.html:27
msgid "Link to gallery"
msgstr "Link do galerii"
-#: templates/wiki/tabs/summary_view.html:30
+#: templates/wiki/tabs/summary_view.html:32
msgid "Characters in document"
msgstr "Znaków w dokumencie"
-#: templates/wiki/tabs/summary_view.html:31
+#: templates/wiki/tabs/summary_view.html:33
msgid "pages"
-msgstr "stron"
+msgstr "stron maszynopisu"
-#: templates/wiki/tabs/summary_view.html:31
+#: templates/wiki/tabs/summary_view.html:33
msgid "untagged"
msgstr "nieotagowane"
-#: templates/wiki/tabs/summary_view.html:34
-msgid "Publish"
-msgstr "Opublikuj"
-
#: templates/wiki/tabs/summary_view_item.html:3
msgid "Summary"
msgstr "Podsumowanie"
msgid "Visual editor"
msgstr "Edytor wizualny"
+#~ msgid "Publish"
+#~ msgstr "Opublikuj"
+
#~ msgid "ZIP file"
#~ msgstr "Plik ZIP"
<span data-ui-editable="true" data-edit-target="meta.displayTitle"
>{{ chunk.pretty_name }}</span>
</h2>
+ <p><a href="{{ chunk.book.get_absolute_url }}">{% trans "Go to the book's page" %}</a>
+ </p>
<p>
<label>{% trans "Document ID" %}:</label>
<span>{{ chunk.book.slug }}/{{ chunk.slug }}</span>
<label>{% trans "Characters in document" %}:</label>
<span id="charcount"></span> (<span id="charcount_pages"></span> {% trans "pages" %}<span id="charcount_untagged">, {% trans "untagged" %}</span>)
</p>
-
- <p><button type="button" id="publish_button">{% trans "Publish" %}</button></p>
</div>
</div>
(function($){
function SummaryPerspective(options) {
- var old_callback = options.callback;
- var self = this;
-
- options.callback = function(){
- $('#publish_button').click(function() {
- $.blockUI({message: "Oczekiwanie na odpowiedź serwera..."});
- self.doc.publish({
- success: function(doc, data) {
- $.blockUI({message: "Udało się.", timeout: 2000});
- },
- failure: function(doc, message) {
- $.blockUI({
- message: message,
- timeout: 5000
- });
- }
-
- });
- });
-
- old_callback.call(this);
- };
-
$.wiki.Perspective.call(this, options);
};
});
};
- WikiDocument.prototype.publish = function(params) {
- params = $.extend({}, noops, params);
- var self = this;
- $.ajax({
- url: reverse("ajax_publish", self.id),
- type: "POST",
- dataType: "json",
- success: function(data) {
- params.success(self, data);
- },
- error: function(xhr) {
- if (xhr.status == 403 || xhr.status == 401) {
- params.failure(self, "Nie masz uprawnień lub nie jesteś zalogowany.");
- }
- else {
- try {
- params.failure(self, xhr.responseText);
- }
- catch (e) {
- params.failure(self, "Nie udało się - błąd serwera.");
- };
- };
-
- }
- });
- };
-
WikiDocument.prototype.pubmark = function(params) {
params = $.extend({}, noops, params);
var self = this;
{% if user.is_authenticated %}
<span class="user_name">{{ user.username }}</span> |
+
+{% if user.is_staff %}
+ <a href="{% url admin:index %}">{% trans "Admin" %}</a> |
+{% endif %}
+
<a href='{% url logout %}{% if logout_to %}?next={{ logout_to }}{% endif %}'>{% trans "Log Out" %}</a>
{% else %}
{% url login as login_url %}