From: Aleksander Łukasz Date: Fri, 21 Mar 2014 15:29:24 +0000 (+0100) Subject: Editor update: ui and functionality tweaks X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/9c5b169cbb83c816ae1a211a9539ba174d99f992?hp=6c75a4ca1fd668180e251e55293b5aa7b9bb749d Editor update: ui and functionality tweaks - dropping a draft - document summary view - turnign off node pane and node family tree --- diff --git a/apps/wiki/locale/pl/LC_MESSAGES/django.mo b/apps/wiki/locale/pl/LC_MESSAGES/django.mo index cc5b3a59..3690ba50 100644 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 a6797240..04df573e 100644 --- a/apps/wiki/locale/pl/LC_MESSAGES/django.po +++ b/apps/wiki/locale/pl/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Platforma Redakcyjna\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-07-10 16:58+0200\n" +"POT-Creation-Date: 2014-03-21 14:34+0100\n" "PO-Revision-Date: 2013-07-10 16:58+0100\n" "Last-Translator: Radek Czajka \n" "Language-Team: Fundacja Nowoczesna Polska \n" "Language-Team: LANGUAGE \n" @@ -96,21 +96,23 @@ msgstr "Czy na pewno chcesz zakończyć pracę?" msgid "Document contains unsaved changes!" msgstr "Dokument zawiera niezapisane zmiany" -#: static/wiki/editor/src/editor/modules/data/data.js:116 +#: static/wiki/editor/src/editor/modules/data/data.js:137 msgid "Local draft of a document exists" msgstr "Istnieje kopia lokalna dokumentu" -#: static/wiki/editor/src/editor/modules/data/data.js:117 +#: static/wiki/editor/src/editor/modules/data/data.js:138 msgid "" "Unsaved local draft of this version of the document exists in your browser. " "Do you want to load it instead?" -msgstr "Twoja przeglądarka posiada niezapisaną jeszcze na serwerze lokalną kopię tej wersji dokumentu. Czy chcesz jej teraz użyć?" +msgstr "" +"Twoja przeglądarka posiada niezapisaną jeszcze na serwerze lokalną kopię tej " +"wersji dokumentu. Czy chcesz jej teraz użyć?" -#: static/wiki/editor/src/editor/modules/data/data.js:118 +#: static/wiki/editor/src/editor/modules/data/data.js:139 msgid "Yes, restore local draft" msgstr "Tak, chcę użyć lokalną kopię" -#: static/wiki/editor/src/editor/modules/data/data.js:119 +#: static/wiki/editor/src/editor/modules/data/data.js:140 msgid "No, use version loaded from the server" msgstr "Nie, chcę załadować wersję z serwera" @@ -122,18 +124,31 @@ msgstr "Zatwierdź" msgid "Cancel" msgstr "Anuluj" -#: static/wiki/editor/src/editor/modules/rng/rng.js:104 +#: static/wiki/editor/src/editor/modules/mainBar/mainBar.js:15 +msgid "anonymous" +msgstr "anonim" + +#: static/wiki/editor/src/editor/modules/rng/rng.js:119 msgid "Saving document" msgstr "Zapisywanie dokumentu" -#: static/wiki/editor/src/editor/modules/rng/rng.js:105 +#: static/wiki/editor/src/editor/modules/rng/rng.js:120 msgid "Saving local copy" msgstr "Zapisywanie kopii lokalnej" -#: static/wiki/editor/src/editor/modules/rng/rng.js:113 +#: static/wiki/editor/src/editor/modules/rng/rng.js:128 msgid "Document saved" msgstr "Dokument zapisany" -#: static/wiki/editor/src/editor/modules/rng/rng.js:114 +#: static/wiki/editor/src/editor/modules/rng/rng.js:129 msgid "Local copy saved" -msgstr "Kopia lokalna zapisana" +msgstr "Wersja robocza zapisana" + +msgid "Draft Saved" +msgstr "Zapisana wersja robocza" + +msgid "no draft exists" +msgstr "brak wersji roboczej" + +msgid "drop a working draft" +msgstr "porzuć wersję roboczą" diff --git a/apps/wiki/static/wiki/editor b/apps/wiki/static/wiki/editor index c45af498..9a86d389 160000 --- a/apps/wiki/static/wiki/editor +++ b/apps/wiki/static/wiki/editor @@ -1 +1 @@ -Subproject commit c45af498f0da72fb2cb9d2a50d1aa3f7429ecd25 +Subproject commit 9a86d3896e80d26848248760feb159dedd75de35 diff --git a/apps/wiki/templates/wiki/bootstrap.html b/apps/wiki/templates/wiki/bootstrap.html index 88d59d76..9abc4ee7 100644 --- a/apps/wiki/templates/wiki/bootstrap.html +++ b/apps/wiki/templates/wiki/bootstrap.html @@ -85,6 +85,14 @@ 'date', 'audience' ], + + documentSummaryView: { + title: '{% trans 'Informations about lesson' %}', + properties: [ + {name: 'stage', label: '{% trans 'Stage' %}'}, + {name: 'assignment', label: '{% trans 'Assignment' %}'} + ] + }, documentSaveUrl: function(id) { return '/editor/text/' + id + '/'; }, documentHistoryUrl: function(id) { return '/editor/history/' + id + '/'}, diff --git a/apps/wiki/views.py b/apps/wiki/views.py index bd9e2c57..c75bf3a6 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -87,7 +87,9 @@ def editor(request, slug, chunk=None, template_name='wiki/bootstrap.html'): 'document_id': chunk.id, 'title': chunk.book.title, 'history': get_history(chunk), - 'version': chunk.revision() + 'version': chunk.revision(), + 'stage': chunk.stage.name if chunk.stage else None, + 'assignment': chunk.user.username if chunk.user else None }), 'serialized_templates': simplejson.dumps([ {'id': t.id, 'name': t.name, 'content': t.content} for t in Template.objects.filter(is_partial=True) @@ -167,8 +169,9 @@ def text(request, chunk_id): revision = doc.revision() return JSONResponse({ 'text': doc.materialize() if parent_revision != revision else None, - 'meta': {}, 'version': revision, + 'stage': doc.stage.name if doc.stage else None, + 'assignment': doc.user.username if doc.user else None }) else: return JSONFormInvalid(form) @@ -217,7 +220,6 @@ def revert(request, chunk_id): return JSONResponse({ 'document': doc.materialize() if before != doc.revision() else None, - 'meta': {}, 'version': doc.revision(), }) else: