aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/wiki.tpl5
-rw-r--r--view/tpl/wikilist.tpl4
2 files changed, 6 insertions, 3 deletions
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index cf4144357..7d698b493 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -184,7 +184,9 @@
function (data) {
if (data.success) {
$('#wiki-preview').html(data.html);
+ {{if !$mimeType || $mimeType == 'text/markdown'}}
$("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
+ {{/if}}
$('#page-tools').hide();
} else {
window.console.log('Error previewing page.');
@@ -418,13 +420,12 @@
$(document).ready(function () {
wiki_refresh_page_list();
- $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
-
// This seems obsolete
// Show Edit tab first. Otherwise the Ace editor does not load.
//$("#wiki-nav-tabs li:eq(1) a").tab('show');
{{if !$mimeType || $mimeType == 'text/markdown'}}
+ $("#wiki-toc").toc({content: "#wiki-preview", headings: "h1,h2,h3,h4"});
window.editor.on("input", function() {
if(window.editor.getSession().getUndoManager().isClean()) {
$('#save-page').addClass('disabled');
diff --git a/view/tpl/wikilist.tpl b/view/tpl/wikilist.tpl
index 68aa41e7c..1fb7dbec1 100644
--- a/view/tpl/wikilist.tpl
+++ b/view/tpl/wikilist.tpl
@@ -27,7 +27,8 @@
<div class="section-content-wrapper-np">
<table id="wikis-index">
<tr>
- <th width="98%">{{$name}}</th>
+ <th width="97%">{{$name}}</th>
+ <th width="1%">{{$type}}</th>
<th width="1%" class="wikis-index-tool"></th>
{{if $owner}}
<th width="1%"></th>
@@ -36,6 +37,7 @@
{{foreach $wikis as $wiki}}
<tr class="wikis-index-row">
<td><a href="/wiki/{{$channel}}/{{$wiki.urlName}}/Home" title="{{$view}}"{{if $wiki.active}} class="active"{{/if}}>{{$wiki.title}}</a></td>
+ <td>{{$wiki.mimeType}}</td>
<td class="wiki-index-tool"><i class="fa fa-download fakelink" onclick="wiki_download_wiki('{{$wiki.resource_id}}'); return false;"></i></td>
{{if $owner}}
<td><i class="fa fa-trash-o drop-icons" onclick="wiki_delete_wiki('{{$wiki.title}}', '{{$wiki.resource_id}}'); return false;"></i></td>