aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Directory.php6
-rw-r--r--Zotlabs/Module/Manage.php4
-rw-r--r--Zotlabs/Module/Settings/Directory.php43
-rw-r--r--app/directory.apd4
-rw-r--r--include/features.php23
-rw-r--r--view/theme/redbasic/css/style.css11
-rwxr-xr-xview/tpl/channels.tpl2
7 files changed, 79 insertions, 14 deletions
diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php
index 8a7c6baf6..c29fa8326 100644
--- a/Zotlabs/Module/Directory.php
+++ b/Zotlabs/Module/Directory.php
@@ -12,13 +12,16 @@ class Directory extends \Zotlabs\Web\Controller {
function init() {
\App::set_pager_itemspage(60);
- if(x($_GET,'ignore')) {
+ if(local_channel() && x($_GET,'ignore')) {
q("insert into xign ( uid, xchan ) values ( %d, '%s' ) ",
intval(local_channel()),
dbesc($_GET['ignore'])
);
goaway(z_root() . '/directory?f=&suggest=1');
}
+
+ if(local_channel())
+ \App::$profile_uid = local_channel();
$observer = get_observer_hash();
$global_changed = false;
@@ -55,6 +58,7 @@ class Directory extends \Zotlabs\Web\Controller {
if($observer)
set_xconfig($observer,'directory','pubforums',$pubforums);
}
+
}
function get() {
diff --git a/Zotlabs/Module/Manage.php b/Zotlabs/Module/Manage.php
index ea24bbf61..20d5b0449 100644
--- a/Zotlabs/Module/Manage.php
+++ b/Zotlabs/Module/Manage.php
@@ -129,7 +129,7 @@ class Manage extends \Zotlabs\Web\Controller {
}
}
-
+
$r = q("select count(channel_id) as total from channel where channel_account_id = %d and channel_removed = 0",
intval(get_account_id())
);
@@ -170,7 +170,7 @@ class Manage extends \Zotlabs\Web\Controller {
'$header' => t('Channel Manager'),
'$msg_selected' => t('Current Channel'),
'$selected' => local_channel(),
- '$desc' => t('Switch to one of your channels by selecting it.'),
+ '$desc' => ((count($channels) > 1 || $delegates) ? t('Switch to one of your channels by selecting it.') : ''),
'$msg_default' => t('Default Channel'),
'$msg_make_default' => t('Make Default'),
'$create' => $create,
diff --git a/Zotlabs/Module/Settings/Directory.php b/Zotlabs/Module/Settings/Directory.php
new file mode 100644
index 000000000..2682bcafc
--- /dev/null
+++ b/Zotlabs/Module/Settings/Directory.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace Zotlabs\Module\Settings;
+
+
+class Directory {
+
+ function post() {
+
+ $module = substr(strrchr(strtolower(static::class), '\\'), 1);
+
+ check_form_security_token_redirectOnErr('/settings/' . $module, 'settings_' . $module);
+
+ $features = get_module_features($module);
+
+ process_module_features_post(local_channel(), $features, $_POST);
+
+ build_sync_packet();
+ return;
+ }
+
+ function get() {
+
+ $module = substr(strrchr(strtolower(static::class), '\\'), 1);
+
+ $features = get_module_features($module);
+ $rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
+
+ $tpl = get_markup_template("settings_module.tpl");
+
+ $o .= replace_macros($tpl, array(
+ '$rpath' => $rpath,
+ '$action_url' => 'settings/' . $module,
+ '$form_security_token' => get_form_security_token('settings_' . $module),
+ '$title' => t('Directory Settings'),
+ '$features' => process_module_features_get(local_channel(), $features),
+ '$submit' => t('Submit')
+ ));
+
+ return $o;
+ }
+
+}
diff --git a/app/directory.apd b/app/directory.apd
index 03a93f042..0c723c16b 100644
--- a/app/directory.apd
+++ b/app/directory.apd
@@ -1,5 +1,5 @@
-version: 1
-url: $baseurl/directory
+version: 1.1
+url: $baseurl/directory, $baseurl/settings/directory
name: Directory
photo: icon:sitemap
categories: nav_featured_app, Networking
diff --git a/include/features.php b/include/features.php
index 37445c643..c1d2510de 100644
--- a/include/features.php
+++ b/include/features.php
@@ -114,15 +114,6 @@ function get_features($filtered = true, $level = (-1)) {
],
[
- 'advanced_dirsearch',
- t('Advanced Directory Search'),
- t('Allows creation of complex directory search queries'),
- false,
- get_config('feature_lock','advanced_dirsearch'),
- feature_level('advanced_dirsearch',4),
- ],
-
- [
'advanced_theming',
t('Advanced Theme and Layout Settings'),
t('Allows fine tuning of themes and page layouts'),
@@ -283,6 +274,20 @@ function get_features($filtered = true, $level = (-1)) {
]
],
+ 'directory' => [
+
+ t('Directory'),
+
+ [
+ 'advanced_dirsearch',
+ t('Advanced Directory Search'),
+ t('Allows creation of complex directory search queries'),
+ false,
+ get_config('feature_lock','advanced_dirsearch'),
+ ]
+
+ ],
+
'editor' => [
t('Editor'),
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index a9ea29ba1..97f4c67db 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1274,6 +1274,17 @@ img.mail-conv-sender-photo {
white-space: nowrap;
}
+#nav-app-settings-link {
+ opacity: 0;
+}
+
+nav:hover #nav-app-settings-link {
+ opacity: 1;
+ transition: opacity .3s ease-in-out;
+ -moz-transition: opacity .3s ease-in-out;
+ -webkit-transition: opacity .3s ease-in-out;
+}
+
.page-title {
margin: 7px 0px;
}
diff --git a/view/tpl/channels.tpl b/view/tpl/channels.tpl
index f484b49e5..695b3b30f 100755
--- a/view/tpl/channels.tpl
+++ b/view/tpl/channels.tpl
@@ -9,9 +9,11 @@
{{$channel_usage_message}}
</div>
{{/if}}
+ {{if $desc}}
<div id="channels-desc" class="section-content-info-wrapper">
{{$desc}}
</div>
+ {{/if}}
{{foreach $all_channels as $chn}}
{{include file="channel.tpl" channel=$chn}}
{{/foreach}}