diff options
author | zotlabs <mike@macgirvin.com> | 2017-01-17 23:39:28 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-01-17 23:39:28 -0800 |
commit | 7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40 (patch) | |
tree | 86bf4b5ded23337a1b508fadd55cbf395384ce85 /view | |
parent | b6595a44d1f6db38c104abaa3c24f42223316ec5 (diff) | |
download | volse-hubzilla-7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40.tar.gz volse-hubzilla-7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40.tar.bz2 volse-hubzilla-7f944515dedd5c7a7d36fe5ed3b6bd884eb9be40.zip |
more work on native wiki - revert now works; still remaining: diff, delete-page, rename-page and export wiki.
Diffstat (limited to 'view')
-rw-r--r-- | view/tpl/nwiki_page_history.tpl | 59 | ||||
-rw-r--r-- | view/tpl/wiki_page_list.tpl | 3 |
2 files changed, 61 insertions, 1 deletions
diff --git a/view/tpl/nwiki_page_history.tpl b/view/tpl/nwiki_page_history.tpl new file mode 100644 index 000000000..d99f83863 --- /dev/null +++ b/view/tpl/nwiki_page_history.tpl @@ -0,0 +1,59 @@ +<style> + .diff { + width:100%; + word-break: break-all; + } + + .diff td{ + padding:0 0.667em; + vertical-align:top; + white-space:pre; + white-space:pre-wrap; + font-family:Consolas,'Courier New',Courier,monospace; + font-size:1.0em; + line-height:1.333; + } + + .diff span{ + display:block; + min-height:1.333em; + margin-top:-1px; + padding:0 3px; + } + + * html .diff span{ + height:1.333em; + } + + .diff span:first-child{ + margin-top:0; + } + + .diffDeleted span{ + border:1px solid rgb(255,192,192); + background:rgb(255,224,224); + } + + .diffInserted span{ + border:1px solid rgb(192,255,192); + background:rgb(224,255,224); + } +</style> +<table class="table-striped table-responsive table-hover" style="width: 100%;"> + {{foreach $pageHistory as $commit}} + <tr><td> + <table id="rev-{{$commit.revision}}" onclick="$('#details-{{$commit.revision}}').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.revision}}" class="btn btn-danger btn-xs" onclick="wiki_revert_page('{{$commit.revision}}')">Revert</button> + <br><br> + {{/if}} + <button id="compare-{{$commit.revision}}" class="btn btn-warning btn-xs" onclick="wiki_compare_page('{{$commit.revision}}')">Compare</button> + </td></tr> + <tr><td>{{$name_lbl}}</td><td>{{$commit.name}}</td></tr> + <tr><td>{{$msg_label}}</td><td>{{$commit.title}}</td></tr> + </table> + </td></tr> + {{/foreach}} +</table> diff --git a/view/tpl/wiki_page_list.tpl b/view/tpl/wiki_page_list.tpl index ef2b41490..a270e6cee 100644 --- a/view/tpl/wiki_page_list.tpl +++ b/view/tpl/wiki_page_list.tpl @@ -19,6 +19,7 @@ {{if $canadd}} <div id="new-page-form-wrapper" class="sub-menu" style="display:none;"> <form id="new-page-form" action="wiki/{{$channel}}/create/page" method="post" > + <input type="hidden" name="resource_id" value="{{$resource_id}}"> {{include file="field_input.tpl" field=$pageName}} <button id="new-page-submit" class="btn btn-primary" type="submit" name="submit" >Submit</button> </form> @@ -29,7 +30,7 @@ <script> $('#new-page-submit').click(function (ev) { - $.post("wiki/{{$channel}}/create/page", {name: $('#id_pageName').val(), resource_id: window.wiki_resource_id}, + $.post("wiki/{{$channel}}/create/page", {pageName: $('#id_pageName').val(), resource_id: window.wiki_resource_id}, function(data) { if(data.success) { window.location = data.url; |