From: Aleksander Łukasz Date: Wed, 7 May 2014 08:17:01 +0000 (+0200) Subject: Editor: improved links X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/2cd5a971d3cf9708b43a523a339212cb9220cef3?ds=inline;hp=90b7a77d4ab51722fe3a774b5fd5b6ab8490e868 Editor: improved links --- diff --git a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo index 90c808b4..1d165c91 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 7a2acd6a..2fefc73e 100644 --- a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po +++ b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.po @@ -376,3 +376,12 @@ msgstr "Wstaw template %s" msgid "Switch to" msgstr "Zamień na" + +msgid "change" +msgstr "zmień" + +msgid "remove" +msgstr "usuń" + +msgid "Remove link" +msgstr "Usuń link" \ No newline at end of file diff --git a/apps/wiki/static/wiki/editor b/apps/wiki/static/wiki/editor index 7868dda5..d6011e09 160000 --- a/apps/wiki/static/wiki/editor +++ b/apps/wiki/static/wiki/editor @@ -1 +1 @@ -Subproject commit 7868dda583569339a88ef875d50fd88f85241547 +Subproject commit d6011e09fc76ad45e40d2930d0af160797fc9daa diff --git a/apps/wiki/templates/wiki/bootstrap.html b/apps/wiki/templates/wiki/bootstrap.html index d0fe48a1..c5be80de 100644 --- a/apps/wiki/templates/wiki/bootstrap.html +++ b/apps/wiki/templates/wiki/bootstrap.html @@ -287,6 +287,9 @@ documentHistoryUrl: function(id) { return '/editor/history/' + id + '/'}, documentDiffUrl: function(id) { return '/editor/diff/' + id + '/'; }, documentRestoreUrl: function(id) { return '/editor/revert/' + id + '/'}, + documentAttachmentUrl: function(attachmentName) { + return '{{MEDIA_URL}}{{IMAGE_DIR}}{{slug}}/' + attachmentName; + }, documentSaveForm: { fields: [ diff --git a/apps/wiki/views.py b/apps/wiki/views.py index c75bf3a6..827a4838 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -100,6 +100,7 @@ def editor(request, slug, chunk=None, template_name='wiki/bootstrap.html'): }, 'tags': list(save_form.fields['stage_completed'].choices), 'can_pubmark': request.user.has_perm('catalogue.can_pubmark'), + 'slug': chunk.book.slug }) diff --git a/redakcja/context_processors.py b/redakcja/context_processors.py index 1c268cd6..aec6df71 100644 --- a/redakcja/context_processors.py +++ b/redakcja/context_processors.py @@ -15,6 +15,7 @@ def settings(request): return { 'MEDIA_URL': settings.MEDIA_URL, 'STATIC_URL': settings.STATIC_URL, + 'IMAGE_DIR': settings.IMAGE_DIR, 'DEBUG': settings.DEBUG, 'RAVEN_CONFIG': getattr(settings, 'RAVEN_CONFIG'), 'APP_VERSION': VERSION,