From: Aleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl> 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 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 <radoslaw.czajka@nowoczesnapolska.org.pl>\n" "Language-Team: Fundacja Nowoczesna Polska <fundacja@nowoczesnapolska.org." @@ -278,6 +278,18 @@ msgstr "Wstaw przypis" msgid "Visual editor" msgstr "Edytor wizualny" +#: templates/wiki/bootstrap.html:95 +msgid "Informations about lesson" +msgstr "Informacje o lekcji" + +#: templates/wiki/bootstrap.html:97 +msgid "Stage" +msgstr "Etap" + +#: templates/wiki/bootstrap.html:98 +msgid "Assignment" +msgstr "Przypisano" + #~ msgid "ZIP file" #~ msgstr "Plik ZIP" @@ -421,9 +433,6 @@ msgstr "Edytor wizualny" #~ msgid "Users" #~ msgstr "Użytkownicy" -#~ msgid "Assigned to me" -#~ msgstr "Przypisane do mnie" - #~ msgid "Unassigned" #~ msgstr "Nie przypisane" diff --git a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo index 4d92aa11..b0b745b9 100644 Binary files a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo and b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo differ diff --git a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po index 3f60ea0a..7538c498 100644 --- a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po +++ b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-02-28 15:04+0100\n" +"POT-Creation-Date: 2014-03-21 14:43+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\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: