aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-11-23 13:49:24 +0100
committerMario Vavti <mario@mariovavti.com>2016-11-23 13:49:24 +0100
commit0ff24b6f215b9125876489741d8aff2b764a0175 (patch)
tree92b41e6f0d6dce6e7eae07d636e03f9758699b81
parent6cf8ca5e43a693b6e0d7d2c410037505dc4cb6cf (diff)
downloadvolse-hubzilla-0ff24b6f215b9125876489741d8aff2b764a0175.tar.gz
volse-hubzilla-0ff24b6f215b9125876489741d8aff2b764a0175.tar.bz2
volse-hubzilla-0ff24b6f215b9125876489741d8aff2b764a0175.zip
whitespace and minor fixes
-rw-r--r--include/widgets.php2
-rw-r--r--view/tpl/wiki_page_list.tpl29
2 files changed, 13 insertions, 18 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 97f3ec019..c9194c2a3 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1017,7 +1017,7 @@ function widget_wiki_pages($arr) {
'$pages' => $pages,
'$canadd' => $can_create,
'$addnew' => t('Add new page'),
- '$pageName' => array('pageName', t('Enter the name of the new page:'), '', ''),
+ '$pageName' => array('pageName', t('Page name')),
));
}
diff --git a/view/tpl/wiki_page_list.tpl b/view/tpl/wiki_page_list.tpl
index c0eeecff8..723cd0904 100644
--- a/view/tpl/wiki_page_list.tpl
+++ b/view/tpl/wiki_page_list.tpl
@@ -1,38 +1,33 @@
{{if $not_refresh}}<div id="wiki_page_list_container" {{if $hide}} style="display: none;" {{/if}}>{{/if}}
<div id="wiki_page_list" class="widget" >
<h3>{{$header}}</h3>
-
<ul class="nav nav-pills nav-stacked">
{{if $pages}}
{{foreach $pages as $page}}
<li><a href="/wiki/{{$channel}}/{{$wikiname}}/{{$page.url}}">{{$page.title}}</a></li>
{{/foreach}}
{{/if}}
- {{if $canadd}}<li><a href="#" onclick="wiki_show_new_page_form(); return false;"><i class="fa fa-plus-circle"></i>&nbsp;{{$addnew}}</a></li>{{/if}}
+ {{if $canadd}}
+ <li><a href="#" onclick="wiki_show_new_page_form(); return false;"><i class="fa fa-plus-circle"></i>&nbsp;{{$addnew}}</a></li>
+ {{/if}}
</ul>
{{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" >
- <div class="clear"></div>
- {{include file="field_input.tpl" field=$pageName}}
- <div class="btn-group pull-right">
- <button id="new-page-submit" class="btn btn-success" type="submit" name="submit" >Create Page</button>
- </div>
- </form>
- <div class="clear"></div>
- <hr>
- </div>
+ <form id="new-page-form" action="wiki/{{$channel}}/create/page" method="post" >
+ {{include file="field_input.tpl" field=$pageName}}
+ <button id="new-page-submit" class="btn btn-primary" type="submit" name="submit" >Submit</button>
+ </form>
+ </div>
{{/if}}
</div>
{{if $not_refresh}}</div>{{/if}}
<script>
-
$('#new-page-submit').click(function (ev) {
if (window.wiki_resource_id === '') {
- window.console.log('You must have a wiki open in order to create pages.');
- ev.preventDefault();
- return false;
+ window.console.log('You must have a wiki open in order to create pages.');
+ ev.preventDefault();
+ return false;
}
$.post("wiki/{{$channel}}/create/page", {name: $('#id_pageName').val(), resource_id: window.wiki_resource_id},
function (data) {
@@ -44,4 +39,4 @@
}, 'json');
ev.preventDefault();
});
-</script> \ No newline at end of file
+</script>