aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-08-04 12:09:06 +0200
committerMario Vavti <mario@mariovavti.com>2016-08-04 12:09:06 +0200
commit036b72757c0dd24cb468e5d02f717de9dffe67cb (patch)
tree60c4a4dfe7ce3aafa0b03ec475cf2c88bcd9c68c
parent120e9a1e4c816eb629bc00dcf2324a26825479e0 (diff)
downloadvolse-hubzilla-036b72757c0dd24cb468e5d02f717de9dffe67cb.tar.gz
volse-hubzilla-036b72757c0dd24cb468e5d02f717de9dffe67cb.tar.bz2
volse-hubzilla-036b72757c0dd24cb468e5d02f717de9dffe67cb.zip
multi acl: port /wiki
-rw-r--r--Zotlabs/Module/Wiki.php17
-rw-r--r--view/tpl/wiki.tpl14
2 files changed, 20 insertions, 11 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 55a52ea6d..011cd4366 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -74,11 +74,16 @@ class Wiki extends \Zotlabs\Web\Controller {
// Initialize the ACL to the channel default permissions
$x = array(
'lockstate' => (( $local_observer['channel_allow_cid'] ||
- $local_observer['channel_allow_gid'] ||
- $local_observer['channel_deny_cid'] ||
- $local_observer['channel_deny_gid'])
- ? 'lock' : 'unlock'),
+ $local_observer['channel_allow_gid'] ||
+ $local_observer['channel_deny_cid'] ||
+ $local_observer['channel_deny_gid'])
+ ? 'lock' : 'unlock'
+ ),
'acl' => populate_acl($channel_acl),
+ 'allow_cid' => acl2json($channel_acl['allow_cid']),
+ 'allow_gid' => acl2json($channel_acl['allow_gid']),
+ 'deny_cid' => acl2json($channel_acl['deny_cid']),
+ 'deny_gid' => acl2json($channel_acl['deny_gid']),
'bang' => ''
);
} else {
@@ -186,6 +191,10 @@ class Wiki extends \Zotlabs\Web\Controller {
'$page' => $pageUrlName,
'$lockstate' => $x['lockstate'],
'$acl' => $x['acl'],
+ '$allow_cid' => $x['allow_cid'],
+ '$allow_gid' => $x['allow_gid'],
+ '$deny_cid' => $x['deny_cid'],
+ '$deny_gid' => $x['deny_gid'],
'$bang' => $x['bang'],
'$content' => $content,
'$renderedContent' => $renderedContent,
diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl
index d9a4f8be3..c346bed60 100644
--- a/view/tpl/wiki.tpl
+++ b/view/tpl/wiki.tpl
@@ -29,7 +29,7 @@
<div class="clear"></div>
</div>
<div id="new-wiki-form-wrapper" class="section-content-tools-wrapper" style="display:none;">
- <form id="new-wiki-form" action="wiki/{{$channel}}/create/wiki" method="post" >
+ <form id="new-wiki-form" action="wiki/{{$channel}}/create/wiki" method="post" class="acl-form" data-form_id="new-wiki-form" data-allow_cid='{{$allow_cid}}' data-allow_gid='{{$allow_gid}}' data-deny_cid='{{$deny_cid}}' data-deny_gid='{{$deny_gid}}'>
<div class="clear"></div>
{{include file="field_input.tpl" field=$wikiName}}
@@ -45,17 +45,17 @@
</div>
<div class="btn-group pull-right">
- <div id="profile-jot-submit-right" class="btn-group" style="margin-right: 20px;">
+ <div id="profile-jot-submit-right" class="btn-group">
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="Permission settings" onclick="return false;">
- <i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons">{{$bang}}</i>
+ <i id="jot-perms-icon" class="fa fa-{{$lockstate}} jot-icons"></i>{{$bang}}
</button>
+ <button id="new-wiki-submit" class="btn btn-primary" type="submit" name="submit" >Create Wiki</button>
</div>
- <button id="new-wiki-submit" class="btn btn-primary" type="submit" name="submit" >Create Wiki</button>
</div>
- <div>{{$acl}}</div>
</form>
- <div class="clear"></div>
- <hr>
+ {{$acl}}
+ <div class="clear"></div>
+ <hr>
</div>
<div id="new-page-form-wrapper" class="section-content-tools-wrapper" style="display:none;">