Lines 1-19
Link Here
|
1 |
[% USE raw %] |
1 |
[% USE raw %] |
2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
|
|
3 |
[% USE Koha %] |
3 |
[% USE KohaDates %] |
4 |
[% USE KohaDates %] |
4 |
[% USE Branches %] |
5 |
[% USE Branches %] |
5 |
[% SET footerjs = 1 %] |
6 |
[% SET footerjs = 1 %] |
6 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
[% INCLUDE 'doc-head-open.inc' %] |
7 |
[% Asset.css("lib/codemirror/codemirror.css") | $raw %] |
|
|
8 |
<style> |
9 |
.CodeMirror { |
10 |
resize: vertical; |
11 |
} |
12 |
</style> |
13 |
<title>Koha › Tools › News</title> |
8 |
<title>Koha › Tools › News</title> |
14 |
[% INCLUDE 'doc-head-close.inc' %] |
9 |
[% INCLUDE 'doc-head-close.inc' %] |
15 |
[% IF ( opac_news_count ) %] |
10 |
[% IF ( opac_news_count ) %] |
16 |
[% END %] |
11 |
[% END %] |
|
|
12 |
[% IF Koha.Preference('NewsToolEditor') == 'codemirror' %] |
13 |
[% Asset.css("lib/codemirror/codemirror.css") | $raw %] |
14 |
[% Asset.css("lib/codemirror/lint.min.css") | $raw %] |
15 |
<style> |
16 |
.CodeMirror { |
17 |
resize: vertical; |
18 |
} |
19 |
</style> |
20 |
[% END %] |
17 |
</head> |
21 |
</head> |
18 |
|
22 |
|
19 |
<body id="tools_koha-news" class="tools"> |
23 |
<body id="tools_koha-news" class="tools"> |
Lines 208-219
Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
Link Here
|
208 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
212 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
209 |
[% END %] |
213 |
[% END %] |
210 |
</div> <!-- /.row --> |
214 |
</div> <!-- /.row --> |
|
|
215 |
</div> <!-- /.main.container-fluid --> |
216 |
|
211 |
|
217 |
|
212 |
[% MACRO jsinclude BLOCK %] |
218 |
[% MACRO jsinclude BLOCK %] |
213 |
[% INCLUDE 'calendar.inc' %] |
219 |
[% INCLUDE 'calendar.inc' %] |
214 |
[% Asset.js("js/tools-menu.js") | $raw %] |
220 |
[% Asset.js("js/tools-menu.js") | $raw %] |
215 |
[% Asset.js("lib/d3c3/d3.min.js") | $raw %] |
|
|
216 |
[% Asset.js("lib/d3c3/c3.min.js") | $raw %] |
217 |
[% IF ( opac_news_count ) %] |
221 |
[% IF ( opac_news_count ) %] |
218 |
[% INCLUDE 'datatables.inc' %] |
222 |
[% INCLUDE 'datatables.inc' %] |
219 |
<script> |
223 |
<script> |
Lines 300-334
Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]</div>
Link Here
|
300 |
}); |
304 |
}); |
301 |
</script> |
305 |
</script> |
302 |
[% END %] |
306 |
[% END %] |
303 |
[% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %] |
307 |
[% IF Koha.Preference('NewsToolEditor') == 'codemirror' %] |
304 |
[% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %] |
308 |
[% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %] |
305 |
[% INCLUDE 'str/tinymce_i18n.inc' %] |
309 |
[% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %] |
306 |
<script> |
310 |
[% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %] |
307 |
[% IF Koha.Preference('NewsToolEditor') == 'codemirror' %] |
311 |
[% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %] |
308 |
var editor = CodeMirror.fromTextArea(document.getElementById('content'), { |
312 |
[% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %] |
309 |
lineNumbers: true, |
313 |
<script> |
310 |
mode: "text/html", |
314 |
var editor = CodeMirror.fromTextArea(document.getElementById('content'), { |
311 |
lineWrapping: true |
315 |
lineNumbers: true, |
312 |
}); |
316 |
lineWrapping: true, |
313 |
[% ELSE %] |
317 |
lint: true, |
314 |
tinyMCE.init({ |
318 |
mode: "text/html", |
315 |
verify_html: false, |
319 |
gutters: ["CodeMirror-lint-markers"], |
316 |
force_br_newlines : false, |
320 |
viewportMargin: Infinity, |
317 |
force_p_newlines : false, |
321 |
}); |
318 |
forced_root_block : '', |
322 |
</script> |
319 |
branding : false, |
323 |
[% ELSE %] |
320 |
relative_urls : false, |
324 |
[% INCLUDE 'str/tinymce_i18n.inc' %] |
321 |
content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", |
325 |
[% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %] |
322 |
menubar : "file edit view insert format tools table", |
326 |
<script> |
323 |
mode : "specific_textareas", |
327 |
tinyMCE.init({ |
324 |
plugins : "autoresize table hr link image charmap lists code emoticons", |
328 |
verify_html: false, |
325 |
toolbar : [ |
329 |
force_br_newlines : false, |
326 |
"formatselect | bold italic | cut copy paste | alignleft aligncenter alignright | outdent indent | image link unlink anchor cleanup hr", |
330 |
force_p_newlines : false, |
327 |
"table | bullist numlist | undo redo | removeformat | emoticons charmap | forecolor backcolor | code visualaid help" |
331 |
forced_root_block : '', |
328 |
], |
332 |
branding : false, |
329 |
}); |
333 |
relative_urls : false, |
330 |
[% END %] |
334 |
content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", |
331 |
</script> |
335 |
menubar : "file edit view insert format tools table", |
|
|
336 |
mode : "specific_textareas", |
337 |
plugins : "autoresize table hr link image charmap lists code emoticons", |
338 |
toolbar : [ |
339 |
"formatselect | bold italic | cut copy paste | alignleft aligncenter alignright | outdent indent | image link unlink anchor cleanup hr", |
340 |
"table | bullist numlist | undo redo | removeformat | emoticons charmap | forecolor backcolor | code visualaid help" |
341 |
], |
342 |
}); |
343 |
</script> |
344 |
[% END # /IF NewsToolEditor %] |
332 |
[% END %] |
345 |
[% END %] |
333 |
|
346 |
|
334 |
[% BLOCK lang_locations %] |
347 |
[% BLOCK lang_locations %] |
335 |
- |
|
|