1 {% extends "base.html" %}
4 <script src="/static/js/jquery.fieldselection.js" type="text/javascript" charset="utf-8"></script>
5 <script src="/static/js/jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
6 <script type="text/javascript" charset="utf-8">
7 function addEditorButton(label, fn) {
8 $('<button type="button">' + label + '</button>').click(function(event) {
9 var text = $('#id_text').getSelection().text;
10 $('#id_text').replaceSelection(fn(text));
11 event.preventDefault();
12 }).appendTo('#buttons');
16 $('#id_folders').change(function() {
17 $('#images').load('/images/' + $('#id_folders').val() + '/', function() {
18 $('#images').data('lastScroll', -1000);
22 addEditorButton('utwór', function(text) { return '<utwor>' + text + '</utwor>'; });
23 addEditorButton('akap', function(text) { return '<akap>' + text + '</akap>'; });
25 $('#images').lazyload('.image-box', {threshold: 600});
28 {% endblock extrahead %}
30 {% block breadcrumbs %}<a href="/">Platforma Redakcyjna</a> ❯ plik {{ hash }}{% endblock breadcrumbs %}
32 {% block maincontent %}
33 <div id="tabs"><a href="{% url file_xml hash %}" class="active">Źródło</a><a href="{% url file_html hash %}">HTML</a> <div style="padding: 3px; margin-left: 10px">{{ image_folders_form.folders }}</div><div style="clear: both; height: 0; width: 0"> </div></div>
36 <p>Aby zobaczyć obrazki wybierz folder z obrazkami powyżej.</p>
38 <form action="." method="post" accept-charset="utf-8">
39 <div id="buttons"></div>
41 {{ form.user.errors }}
42 <p>Użytkownik: {{ form.user }}</p>
43 {{ form.commit_message.errors }}
44 <p>Opis zmian: {{ form.commit_message }} <input type="submit" value="Zapisz"/></p>
46 {% endblock maincontent %}