Stash changes for merge with dev
This commit is contained in:
parent
70d38fe5b3
commit
c98b91f514
@ -2294,6 +2294,28 @@ function website_import_tools() {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Creates website export tools menu
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function website_export_tools() {
|
||||||
|
|
||||||
|
$channel = App::get_channel();
|
||||||
|
$sys = false;
|
||||||
|
|
||||||
|
if(App::$is_sys && is_site_admin()) {
|
||||||
|
require_once('include/channel.php');
|
||||||
|
$channel = get_sys_channel();
|
||||||
|
$sys = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return replace_macros(get_markup_template('website_export_tools.tpl'), array(
|
||||||
|
'$title' => t('Export'),
|
||||||
|
'$export_label' => t('Export website...'),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
/* case insensitive in_array() */
|
/* case insensitive in_array() */
|
||||||
|
|
||||||
function in_arrayi($needle, $haystack) {
|
function in_arrayi($needle, $haystack) {
|
||||||
|
@ -794,6 +794,21 @@ function widget_website_import_tools($arr) {
|
|||||||
return website_import_tools();
|
return website_import_tools();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function widget_website_export_tools($arr) {
|
||||||
|
|
||||||
|
// mod menu doesn't load a profile. For any modules which load a profile, check it.
|
||||||
|
// otherwise local_channel() is sufficient for permissions.
|
||||||
|
|
||||||
|
if(App::$profile['profile_uid'])
|
||||||
|
if((App::$profile['profile_uid'] != local_channel()) && (! App::$is_sys))
|
||||||
|
return '';
|
||||||
|
|
||||||
|
if(! local_channel())
|
||||||
|
return '';
|
||||||
|
|
||||||
|
return website_export_tools();
|
||||||
|
}
|
||||||
|
|
||||||
function widget_findpeople($arr) {
|
function widget_findpeople($arr) {
|
||||||
return findpeople_widget();
|
return findpeople_widget();
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
[region=aside]
|
[region=aside]
|
||||||
[widget=design_tools][/widget]
|
[widget=design_tools][/widget]
|
||||||
[widget=website_import_tools][/widget]
|
[widget=website_import_tools][/widget]
|
||||||
|
[widget=website_export_tools][/widget]
|
||||||
[/region]
|
[/region]
|
14
view/tpl/website_export_tools.tpl
Normal file
14
view/tpl/website_export_tools.tpl
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<div id="website-export-tools" class="widget">
|
||||||
|
<h3>{{$title}}</h3>
|
||||||
|
<ul class="nav nav-pills nav-stacked">
|
||||||
|
<li>
|
||||||
|
<a href="#" onclick="openClose('export-form');
|
||||||
|
return false;"><i class="fa fa-cloud-upload generic-icons"></i> {{$export_label}}</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<form id="export-form" enctype="multipart/form-data" method="post" action="" style="display: none;" class="sub-menu">
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
Reference in New Issue
Block a user