From 9c5b169cbb83c816ae1a211a9539ba174d99f992 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 21 Mar 2014 16:29:24 +0100 Subject: [PATCH] Editor update: ui and functionality tweaks - dropping a draft - document summary view - turnign off node pane and node family tree --- apps/wiki/locale/pl/LC_MESSAGES/django.mo | Bin 3912 -> 4071 bytes apps/wiki/locale/pl/LC_MESSAGES/django.po | 17 ++++++--- apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo | Bin 2232 -> 2449 bytes apps/wiki/locale/pl/LC_MESSAGES/djangojs.po | 37 ++++++++++++++------ apps/wiki/static/wiki/editor | 2 +- apps/wiki/templates/wiki/bootstrap.html | 8 +++++ apps/wiki/views.py | 8 +++-- 7 files changed, 53 insertions(+), 19 deletions(-) diff --git a/apps/wiki/locale/pl/LC_MESSAGES/django.mo b/apps/wiki/locale/pl/LC_MESSAGES/django.mo index cc5b3a5952621ee1ec25def79329a87d8f1c528b..3690ba50029a591415039c6f036835d70d393bda 100644 GIT binary patch delta 1676 zcmYk+U2Ka{9LMqVP`0VPSiPIB#x};*bt_}@va&{IH;8bBluT2mMJr*E6c=_k$r8bK zBO)O-5@~j0k#ONPhD7Xwg~ZJyZst;AiSMsF6({{apXWT!({ujkJpcBUccMJ~wbXUZ z(85F+(Kf@F2zI$R&?aXYsEIyU$1#uo5A@Nb>5H;`=>cJWL)7MLpOU8?QOqIRvN3Ey@HE|gA++lk^ib^1fA=HDjp%VRqdj321J0xiPSIAnmauxNxepCXtP~Urq z%W>Gv{?F&+BNtQyKTyTuCT$H+hT5`f)Q&WvifR|~F~{unBx(UyP&LwvD&{+=1fHQ1 zeTjbjfT{sg$o?y{`5c(rRG?l(9ctp8s00sS9d@Cf8$cFo?&2bRgp6rkqb3|fEnpn= z{Rw;j4{GHFRHPEFPIICa`%zzLwRWIZyx-oBp|-Bu_Al9fAFA4Kq7oiNy|NKhLQhe} zIf_*{ff}cXhqWW=1)S)D7rAFDk&g*l+pvNDK2)MTsFmM94RG7`2T>~@MkO?2`=hAw zKcW))jFd|D*=qg%bIoT@wEfC7*YuvY6Dmjzq+QZLZNv`Z|F(jTR;xre5L<~{=N}Qn5rlX+p_lEE+%A8Bb+~W*u}E9ZQ@!Iep6)Ig&V=@^y74lZkj{ zcHU`cW-1cRr1JMVCBfSI#@dE}FA!{Q46dyYWX1}%I&*fP={|odmW;#`8IL>ac-rIH f(T*PP^d%VQ#L?ri%=x+Z99K9MIhFAht#r$7W delta 1509 zcmYM!O-NKx7{>8))n+DV)U-*{bWAJ9%4WaD8Q&9)kt+y~pJC89e;3k|wbrq-<+gUg=bMOx`KM~C~8W_a2FPkSv9lv`keJGs^bq>hF`2dv7Pn`D)Dv>dT$SM z%4EYt)Dq?fLJh%ym+GA%xnjF;oI6RDx+t;xSZ0H;_loIBLr8 zq57LbCH6AH{3ocqw>LUG#o$aC)?f{C$s|!7^`bJ*pg%HueF!z;94gT~YNQ3!{g18F zsDZw)*B4wWnzBWEV#&6Dp?38OD&tDFv=V7TZN3Dy;8E1`In)e{+O~`Q%pDGTzF>WX z9kidJ5_G>((TIPeUQo>4YDZ8bu0|zNZ`%n}hn=W|QplF@XA4Xx(MlXtgVOU4|JcZ} zpJ*er94w*hzr2q|7s0#yY2A(X`{VE66zxOAVM6;u32Y~n@Lobwstu;1^-lP;wL@mD z`o9+UYplOE)N1LbqQBf~(U)o~v7gvSXl-{ADw;n1Et`lPgw|Pw74r)d>MxaMNgp81 zsy=83h&{wMqCp)di6TPlqA5=ktEHEU)>(g3lg?&yBNs=8bJ=TNFmT@S#)4VLTMi94 ccZW+WoDT0)X`kawgfBT>wCsuF&6dZVzkOJ5B>(^b 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#z=v3zr0K5wa*Q zE)qM4lc2j2&<@nMq8Pxw{=-@bZ;aTj*9J)A%<7N#j#y{N0 zJ~|%aAU;I}c!jJ+kg8`*etPY~^TR0R@;6Ae;X!4Hx3W|VY242|wt3p-5K6>8CnulI6{%z;K5g=ix% zWxSv0;jqXkaeYzJV^h+?^f0wUrM~83a=B|R^pQKi&dis~>!wUNG6^HQ)UD(a`+c0Q3fefiRlnu|Lm-nkU4O#IH%2Ae3c6f|Z=mMv( zf*tsS@;f)H=*NAO!dJ+~%#ar}kaki|kwY+p(>Fs-gy~ABmic2T+)m0B$o*EsOGEBY z79=58Ba5v@7Y*5^EL=`e7A*ghYWRxhH7n)5+B>Z-5jVCn8%4K$!4)12NBv`w$Oy170IX;{X5v 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 \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: -- 2.20.1