Editor: improved links
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 7 May 2014 08:17:01 +0000 (10:17 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 12 Aug 2014 09:47:14 +0000 (11:47 +0200)
apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo
apps/wiki/locale/pl/LC_MESSAGES/djangojs.po
apps/wiki/static/wiki/editor
apps/wiki/templates/wiki/bootstrap.html
apps/wiki/views.py
redakcja/context_processors.py

index 90c808b..1d165c9 100644 (file)
Binary files a/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo and b/apps/wiki/locale/pl/LC_MESSAGES/djangojs.mo differ
index 7a2acd6..2fefc73 100644 (file)
@@ -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
index 7868dda..d6011e0 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7868dda583569339a88ef875d50fd88f85241547
+Subproject commit d6011e09fc76ad45e40d2930d0af160797fc9daa
index d0fe48a..c5be80d 100644 (file)
                 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: [
index c75bf3a..827a483 100644 (file)
@@ -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
     })
 
 
index 1c268cd..aec6df7 100644 (file)
@@ -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,