aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2017-09-16 14:27:40 -0400
committerAndrew Manning <tamanning@zoho.com>2017-09-16 14:27:40 -0400
commit6239a27288bacad225606a40a3dc6ac26072d329 (patch)
tree67fbcab8ac0d506e82fb289deed4626f6689301b /view/tpl
parent0b272264eada1d5cf71e4273d6d3b22337c4e5cc (diff)
downloadvolse-hubzilla-6239a27288bacad225606a40a3dc6ac26072d329.tar.gz
volse-hubzilla-6239a27288bacad225606a40a3dc6ac26072d329.tar.bz2
volse-hubzilla-6239a27288bacad225606a40a3dc6ac26072d329.zip
Moved add wiki page form to top of page list to address issue https://github.com/redmatrix/hubzilla/issues/719
Diffstat (limited to 'view/tpl')
-rw-r--r--view/tpl/wiki_page_list.tpl34
1 files changed, 17 insertions, 17 deletions
diff --git a/view/tpl/wiki_page_list.tpl b/view/tpl/wiki_page_list.tpl
index cfaa50395..bf5f6697d 100644
--- a/view/tpl/wiki_page_list.tpl
+++ b/view/tpl/wiki_page_list.tpl
@@ -3,6 +3,23 @@
{{/if}}
<h3>{{$header}}</h3>
<ul class="nav nav-pills flex-column">
+ {{if $canadd}}
+ <li class="nav-item"><a class="nav-link" href="#" onclick="wiki_show_new_page_form(); return false;"><i class="fa fa-plus-circle"></i>&nbsp;{{$addnew}}</a></li>
+ {{/if}}
+ {{if $canadd}}
+ <div id="new-page-form-wrapper" class="sub-menu" style="display:none;">
+ <form id="new-page-form" action="wiki/{{$channel_address}}/create/page" method="post" >
+ <input type="hidden" name="resource_id" value="{{$resource_id}}">
+ {{if $typelock}}
+ <input type="hidden" name="mimetype" value="{{$lockedtype}}">
+ {{else}}
+ {{$mimetype}}
+ {{/if}}
+ {{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}}
{{if $pages}}
{{foreach $pages as $page}}
<li class="nav-item nav-item-hack" id="{{$page.link_id}}">
@@ -13,24 +30,7 @@
</li>
{{/foreach}}
{{/if}}
- {{if $canadd}}
- <li class="nav-item"><a class="nav-link" 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_address}}/create/page" method="post" >
- <input type="hidden" name="resource_id" value="{{$resource_id}}">
- {{if $typelock}}
- <input type="hidden" name="mimetype" value="{{$lockedtype}}">
- {{else}}
- {{$mimetype}}
- {{/if}}
- {{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}}
{{if ! $refresh}}
</div>
{{/if}}