Improved descriptions, improved tab behaviour

This commit is contained in:
Michael 2018-01-04 14:22:04 +00:00
parent 505474e118
commit 6531313b73
2 changed files with 19 additions and 15 deletions

View file

@ -1176,8 +1176,8 @@ function admin_page_site(App $a)
$community_page_style_choices = array( $community_page_style_choices = array(
CP_NO_COMMUNITY_PAGE => t("No community page"), CP_NO_COMMUNITY_PAGE => t("No community page"),
CP_USERS_ON_SERVER => t("Public postings from users of this site"), CP_USERS_ON_SERVER => t("Public postings from users of this site"),
CP_GLOBAL_COMMUNITY => t("Global community page"), CP_GLOBAL_COMMUNITY => t("Public postings from the federated network"),
CP_USERS_AND_GLOBAL => t("Public user postings and global postings") CP_USERS_AND_GLOBAL => t("Public postings from local users and the federated network")
); );
/* OStatus conversation poll choices */ /* OStatus conversation poll choices */
@ -1312,7 +1312,7 @@ function admin_page_site(App $a)
'$no_multi_reg' => array('no_multi_reg', t("Block multiple registrations"), Config::get('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")), '$no_multi_reg' => array('no_multi_reg', t("Block multiple registrations"), Config::get('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
'$no_openid' => array('no_openid', t("OpenID support"), !Config::get('system','no_openid'), t("OpenID support for registration and logins.")), '$no_openid' => array('no_openid', t("OpenID support"), !Config::get('system','no_openid'), t("OpenID support for registration and logins.")),
'$no_regfullname' => array('no_regfullname', t("Fullname check"), !Config::get('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")), '$no_regfullname' => array('no_regfullname', t("Fullname check"), !Config::get('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")),
'$community_page_style' => array('community_page_style', t("Community pages for visitors"), Config::get('system','community_page_style'), t("Which community pages should be shown to visitors. Local users always see both pages. 'Global community' shows every public posting from an open distributed network that arrived on this server."), $community_page_style_choices), '$community_page_style' => array('community_page_style', t("Community pages for visitors"), Config::get('system','community_page_style'), t("Which community pages should be available for visitors. Local users always see both pages."), $community_page_style_choices),
'$max_author_posts_community_page' => array('max_author_posts_community_page', t("Posts per user on community page"), Config::get('system','max_author_posts_community_page'), t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")), '$max_author_posts_community_page' => array('max_author_posts_community_page', t("Posts per user on community page"), Config::get('system','max_author_posts_community_page'), t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")),
'$ostatus_disabled' => array('ostatus_disabled', t("Enable OStatus support"), !Config::get('system','ostatus_disabled'), t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")), '$ostatus_disabled' => array('ostatus_disabled', t("Enable OStatus support"), !Config::get('system','ostatus_disabled'), t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")),
'$ostatus_full_threads' => array('ostatus_full_threads', t("Only import OStatus threads from our contacts"), Config::get('system','ostatus_full_threads'), t("Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system.")), '$ostatus_full_threads' => array('ostatus_full_threads', t("Only import OStatus threads from our contacts"), Config::get('system','ostatus_full_threads'), t("Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system.")),

View file

@ -59,19 +59,23 @@ function community_content(App $a, $update = 0) {
if (!$update) { if (!$update) {
$tabs = []; $tabs = [];
$tabs[] = array('label'=>t('Community'), if (local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) {
'url' => 'community/local', $tabs[] = array('label'=>t('Community'),
'sel' => $content == 'local' ? 'active' : '', 'url' => 'community/local',
'title' => t('Posts from local users on this server'), 'sel' => $content == 'local' ? 'active' : '',
'id' => 'community-local-tab', 'title' => t('Posts from local users on this server'),
'accesskey' => 'l'); 'id' => 'community-local-tab',
'accesskey' => 'l');
}
$tabs[] = array('label' => t('Global Timeline'), if (local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_GLOBAL_COMMUNITY])) {
'url' => 'community/global', $tabs[] = array('label' => t('Global Timeline'),
'sel' => $content == 'global' ? 'active' : '', 'url' => 'community/global',
'title' => t('Posts from users of the federated network'), 'sel' => $content == 'global' ? 'active' : '',
'id' => 'community-global-tab', 'title' => t('Posts from users of the federated network'),
'accesskey' => 'g'); 'id' => 'community-global-tab',
'accesskey' => 'g');
}
$tab_tpl = get_markup_template('common_tabs.tpl'); $tab_tpl = get_markup_template('common_tabs.tpl');
$o .= replace_macros($tab_tpl, array('$tabs' => $tabs)); $o .= replace_macros($tab_tpl, array('$tabs' => $tabs));