diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-17 06:33:39 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-17 06:33:39 -0400 |
commit | 961539258be90f5b7c989299db0e8c551d0d6c72 (patch) | |
tree | 8c1e37dd56e06ed157feb9288fba7867f18e0034 /view/tpl/wiki_page_history.tpl | |
parent | aa77b04860a68370d829f1081418e69777d0e1f9 (diff) | |
download | volse-hubzilla-961539258be90f5b7c989299db0e8c551d0d6c72.tar.gz volse-hubzilla-961539258be90f5b7c989299db0e8c551d0d6c72.tar.bz2 volse-hubzilla-961539258be90f5b7c989299db0e8c551d0d6c72.zip |
Wiki page revision comparison tool with diff displayed in modal dialog. Leverages Diff class from http://code.stephenmorley.org/php/diff-implementation with license CC0 1.0 universal http://creativecommons.org/publicdomain/zero/1.0/legalcode
Diffstat (limited to 'view/tpl/wiki_page_history.tpl')
-rw-r--r-- | view/tpl/wiki_page_history.tpl | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/view/tpl/wiki_page_history.tpl b/view/tpl/wiki_page_history.tpl index 6ce3ce204..fef5d93a5 100644 --- a/view/tpl/wiki_page_history.tpl +++ b/view/tpl/wiki_page_history.tpl @@ -1,12 +1,52 @@ +<style> + .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.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"> - <button id="revert-{{$commit.hash}}" class="btn btn-danger btn-xs" onclick="wiki_revert_page('{{$commit.hash}}')">Revert</button></td></tr> + <tr><td width="10%">Date</td><td width="70%">{{$commit.date}}</td> + <td rowspan="3" width="20%" align="right"> + <button id="revert-{{$commit.hash}}" class="btn btn-danger btn-xs" onclick="wiki_revert_page('{{$commit.hash}}')">Revert</button> + <br><br> + <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}} <{{$commit.email}}></td></tr> <tr><td>Message</td><td>{{$commit.title}}</td></tr> </table> </td></tr> {{/foreach}} -</table>
\ No newline at end of file +</table> |