django 1.10
[redakcja.git] / apps / wiki / templates / wiki / bootstrap.html
index afc38dc..4e4e947 100644 (file)
@@ -1,4 +1,4 @@
-{% load staticfiles %}
+{% load static %}
 {% load i18n %}
 
 <!DOCTYPE html>
                 {% endif %}
             </script>
         {% endif %}
-        <script src="{% url 'django.views.i18n.javascript_catalog' %}"></script>
+        <script src="{% url 'javascript_catalog' %}"></script>
         
         {% if DEBUG %}
             <link rel="stylesheet/less" type="text/css" href="{% static 'wiki/editor/src/editor/styles/main.less' %}"/>
             <script type="text/javascript">less = {relativeUrls: true};</script>
             <script src="{% static 'wiki/editor/libs/less-1.3.3.min.js' %}"></script>
             <script src="{% static 'wiki/editor/libs/require.js' %}" data-main="{% static 'wiki/editor/src/editor/entrypoint.js' %}" ></script>
+            <script src="{% static 'wiki/editor/libs/jquery-1.9.1.min.js' %}"></script>
+            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
         {% else %}
             <link href="{% static 'wiki/build/rng.css' %}" rel="stylesheet">
             <script src="{% static 'wiki/build/rng.js' %}"></script>
         {% endif %}
+        <script src="{% static 'js/catalogue/catalogue.js' %}"></script> {# for tutorial #}
     </head>
     <body>
         <script type="text/javascript">
@@ -69,8 +72,8 @@
                     title: '{% trans 'Informations about lesson' %}',
                     properties: [
                         {name: 'version', label: '{% trans 'Version' %}'},
-                        {name: 'stage', label: '{% trans 'Stage' %}'},
-                        {name: 'assignment', label: '{% trans 'Assignment' %}'},
+                        {name: 'stage_name', label: '{% trans 'Stage' %}'},
+                        {name: 'assignment', label: '{% trans 'Assignment' %}'}
                     ]
                 },
 
                     ],
 
                     [
-                        {actionName: 'core.emphasis', actionConfig: {label: 'emphasis'}},
-                        {actionName: 'core.cite', actionConfig: {label: 'cite'}},
-                        {actionName: 'core.link'}
+                        {actionName: 'core.emphasis', actionConfig: {label: '{% trans "emphasis" %}'}},
+                        {actionName: 'core.cite', actionConfig: {label: '{% trans "cite" %}'}},
+                        {actionName: 'core.link', actionConfig: {label: '{% trans "link" %}'}}
                     ],
                     
                     //['core.template'],
 
-                    ['core.showMetadataEditor'],
+                    ['core.showMetadataEditor']
                     /*[
                         'core.insertOrderExercise',
                         'core.insertChoiceSingleExercise',
                     return '{{MEDIA_URL}}uploads/{{ pk }}/' + attachmentName;
                 },
                 documentUrl: function(id, version) {
-                    var url = '{% url 'wiki_editor' pk %}'
+                    var url = '{% url 'wiki_editor' pk %}';
                     if(version) {
                         url = url + '?version=' + version;
                     }
                     return url;
                 },
                 documentPreviewUrl: function(id) { return '/documents/{{ pk }}/rev' + id + '/preview/' },
-                documentPreviewMainUrl: function(id) { return '/documents/{{ pk }}/preview/' },
+                documentPreviewMainUrl: function() { return '/documents/{{ pk }}/preview/' },
 
                 documentSaveForm: {
                     fields: [
                             {% for value, text in forms.text_save.stage.field.choices %}
                                 {value:'{{value|default:''}}', text:'{{text}}'} {% if not forloop.last %}, {% endif %}
                             {% endfor %}
-                        ], description: '{{forms.text_save.stage.help_text}}'},
+                        ], description: '{{forms.text_save.stage.help_text}}'}
                     ],
                     content_field_name: '{{forms.text_save.text.html_name}}',
                     version_field_name: '{{forms.text_save.parent_revision.html_name}}'
                     fields: [
                     ],
                     revision_field_name: '{{forms.text_publish.revision.html_name}}'
-                }
+                },
 
+                tutorial: [
+                    {name: 'editor', text: '{% trans "Edit your document text." %}'},
+                    {name: 'sourceEditor', text: '{% trans "View the xml code of your document." %}'},
+                    {name: 'history', text: '{% trans "Here you can view the change history." %}'},
+                    {name: 'switchToHeader', text: '{% trans "Place the mouse cursor at the end of the line after which you want to add a new header, and press Enter. Click “header” to switch the new paragraph into a header." %}'},
+                    {name: 'switchToParagraph', text: '{% trans "Use this option to switch a header to a paragraph." %}'},
+                    {name: 'switchToImage', text: '{% trans "Add graphics to your document. Click “image” to make a frame, then click this frame to insert an image file (JPG, PNG, GIF, SVG)." %}'},
+                    {name: 'switchToVideo', text: '{% trans "Add a video material to your document to make it more attractive. Paste the http link from a YouTube channel." %}'},
+                    {name: 'toggleBulletList', text: '{% trans "Select this option to create a bullet list. Press Enter to add another item. To end the list, place the cursor at the end of the last item, and press Enter twice." %}'},
+                    {name: 'toggleEnumList', text: '{% trans "Create numbered lists. To end the list, set the cursor at the end of the last item, and press Enter twice." %}'},
+                    {name: 'emphasis', text: '{% trans "Emphasize some text by using boldface. To turn it off, click the specific word and then click “emphasis”." %}'},
+                    {name: 'cite', text: '{% trans "Select some text and click “cite” to make it italic. To turn it off, set the cursor on the specific word then click “cite” again." %}'},
+                    {name: 'link', text: '{% trans "Paste the link and select it, or select text and click “link” to add a hyperlink or to link additional materials (ODT, DOC, PDF)." %}'},
+                    {name: 'showMetadataEditor', text: '{% trans "Here you can review and edit metadata. In “Attachments” you can add or change the cover of your document." %}'},
+                    {name: 'preview', text: '{% trans "Review your document before publication." %}'},
+                    {name: 'attachments', text: '{% trans "Here you can add other important materials to this document (audio files, JPG, PNG, ODT, PDF etc.)" %}'},
+                    {name: 'draft', text: '{% trans "Select this option if you do not like your unsaved changes. Warning! Dropped changes will be lost and they cannot be restored." %}'},
+                    {name: 'comment', text: '{% trans "If you work on a document with a group, you can leave comments on each line of the document. Your comment will appear as a “bubble” on the left." %}'},
+                    {name: 'save', text: '{% trans "Click “Save” to save all the changes in your document. Remember to select the appropriate stage of the work on the document (Draft, Comments, Comments review, Proofreading, Publication)." %}'},
+                    {name: 'mainpage', text: '{% trans "Click on the MIL/PEER logo to open the home page in a new window." %}'},
+                    {name: 'exit', text: '{% trans "“Exit” will take you to the main page." %}'}
+                ]
             };
 
             {% if can_pubmark %}
                 Editor.start(config);
             };
 
-
-
-
         </script>
+        <div id="tuton"></div>
         <div id="editor_root"></div>
     </body>
 </html>