aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-15 00:50:31 -0800
committerzotlabs <mike@macgirvin.com>2016-11-15 00:50:31 -0800
commite0a702df764036ae0303a49f08b2ada90ed0a842 (patch)
tree9a10631db191b0cc29c562879cb5aff3ceba6bb1 /include
parente990a35a91014e5874ca21dfb057b2435c9bada6 (diff)
downloadvolse-hubzilla-e0a702df764036ae0303a49f08b2ada90ed0a842.tar.gz
volse-hubzilla-e0a702df764036ae0303a49f08b2ada90ed0a842.tar.bz2
volse-hubzilla-e0a702df764036ae0303a49f08b2ada90ed0a842.zip
wiki: permissions issues, untranslated strings in templates and some minor changes to provide a consistent UI with the rest of the app.
Diffstat (limited to 'include')
-rw-r--r--include/widgets.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 071622387..86f0305df 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -917,7 +917,11 @@ function widget_wiki_list($arr) {
'$channel' => $channel['channel_address'],
'$wikis' => $wikis['wikis'],
// If the observer is the local channel owner, show the wiki controls
- '$owner' => ((local_channel() === intval($channel['channel_id'])) ? true : false)
+ '$owner' => ((local_channel() && local_channel() === intval(\App::$profile['uid'])) ? true : false),
+ '$edit' => t('Edit'),
+ '$download' => t('Download'),
+ '$view' => t('View'),
+ '$addnew' => t('Add new wiki')
));
}
return '';
@@ -948,13 +952,17 @@ function widget_wiki_pages($arr) {
}
}
}
+ $can_create = perm_is_allowed(\App::$profile['uid'],get_observer_hash(),'write_pages');
+
return replace_macros(get_markup_template('wiki_page_list.tpl'), array(
'$hide' => $hide,
'$not_refresh' => $not_refresh,
'$header' => t('Wiki Pages'),
'$channel' => $channelname,
'$wikiname' => $wikiname,
- '$pages' => $pages
+ '$pages' => $pages,
+ '$canadd' => $can_create,
+ '$addnew' => t('Add new page'),
));
}