aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-12-14 11:55:52 +0100
committerMario Vavti <mario@mariovavti.com>2016-12-14 11:55:52 +0100
commit028935a318e5848542faa551f3d39bbe8b365447 (patch)
treebb9d6b47318393c94093d838364cd9f81d16cc22 /view
parent62353191e8759263d6279822d369ac1ae22f0a5f (diff)
downloadvolse-hubzilla-028935a318e5848542faa551f3d39bbe8b365447.tar.gz
volse-hubzilla-028935a318e5848542faa551f3d39bbe8b365447.tar.bz2
volse-hubzilla-028935a318e5848542faa551f3d39bbe8b365447.zip
wiki: do not show revert buttons if we do not have write perms and minor cleanup
Diffstat (limited to 'view')
-rw-r--r--view/tpl/generic_modal.tpl4
-rw-r--r--view/tpl/wiki.tpl7
-rw-r--r--view/tpl/wiki_page_history.tpl3
3 files changed, 7 insertions, 7 deletions
diff --git a/view/tpl/generic_modal.tpl b/view/tpl/generic_modal.tpl
index 3f7326e71..2bbea42b3 100644
--- a/view/tpl/generic_modal.tpl
+++ b/view/tpl/generic_modal.tpl
@@ -8,8 +8,10 @@
<div class="modal-body" id="generic-modal-body-{{$id}}"></div>
<div class="modal-footer">
<button id="generic-modal-cancel-{{$id}}" type="button" class="btn btn-default" data-dismiss="modal">{{$cancel}}</button>
+ {{if $ok}}
<button id="generic-modal-ok-{{$id}}" type="button" class="btn btn-primary">{{$ok}}</button>
+ {{/if}}
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
-</div><!-- /.modal --> \ No newline at end of file
+</div><!-- /.modal -->
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index a84209b37..4638e4758 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -41,7 +41,7 @@
</div>
</form>
</div>
- <div id="wiki-content-container" class="section-content-wrapper" {{if $hideEditor}}style="display: none;"{{/if}}>
+ <div id="wiki-content-container" class="section-content-wrapper">
<ul class="nav nav-tabs" id="wiki-nav-tabs">
<li id="edit-pane-tab"><a data-toggle="tab" href="#edit-pane">{{$editOrSourceLabel}}</a></li>
<li class="active"><a data-toggle="tab" href="#preview-pane" id="wiki-get-preview">View</a></li>
@@ -225,11 +225,6 @@
if (data.success) {
$('#wiki_page_list_container').html(data.pages);
$('#wiki_page_list_container').show();
- {{if $showNewPageButton}}
- $('#new-page-button').show();
- {{else}}
- $('#new-page-button').hide();
- {{/if}}
} else {
alert('Error fetching page list!');
window.console.log('Error fetching page list!');
diff --git a/view/tpl/wiki_page_history.tpl b/view/tpl/wiki_page_history.tpl
index 9a313f767..ca16e8333 100644
--- a/view/tpl/wiki_page_history.tpl
+++ b/view/tpl/wiki_page_history.tpl
@@ -1,6 +1,7 @@
<style>
.diff {
width:100%;
+ word-break: break-all;
}
.diff td{
@@ -44,8 +45,10 @@
<table id="rev-{{$commit.hash}}" onclick="$('#details-{{$commit.hash}}').show()" width="100%">
<tr><td width="10%">Date</td><td width="70%">{{$commit.date}}</td>
<td rowspan="3" width="20%" align="right">
+ {{if $permsWrite}}
<button id="revert-{{$commit.hash}}" class="btn btn-danger btn-xs" onclick="wiki_revert_page('{{$commit.hash}}')">Revert</button>
<br><br>
+ {{/if}}
<button id="compare-{{$commit.hash}}" class="btn btn-warning btn-xs" onclick="wiki_compare_page('{{$commit.hash}}')">Compare</button>
</td></tr>
<tr><td>Name</td><td>{{$commit.name}} &lt;{{$commit.email}}&gt;</td></tr>