mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:15:14 +00:00
clean up the profile edit page a bit
This commit is contained in:
parent
a45dc7a076
commit
5f4d24af44
3 changed files with 41 additions and 37 deletions
|
@ -115,7 +115,7 @@ class Display
|
|||
public function get()
|
||||
{
|
||||
|
||||
$yes_no = array(t('No'), t('Yes'));
|
||||
$yes_no = [t('No'), t('Yes')];
|
||||
|
||||
$default_theme = get_config('system', 'theme');
|
||||
if (!$default_theme) {
|
||||
|
@ -200,7 +200,7 @@ class Display
|
|||
// logger('schemas: ' . print_r($schemas,true));
|
||||
|
||||
$tpl = Theme::get_template("settings_display.tpl");
|
||||
$o = replace_macros($tpl, array(
|
||||
$o = replace_macros($tpl, [
|
||||
'$ptitle' => t('Display Settings'),
|
||||
'$d_tset' => t('Theme Settings'),
|
||||
'$d_ctset' => t('Custom Theme Settings'),
|
||||
|
@ -210,23 +210,23 @@ class Display
|
|||
'$baseurl' => z_root(),
|
||||
'$uid' => local_channel(),
|
||||
|
||||
'$theme' => (($themes) ? array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview') : false),
|
||||
'$schema' => array('schema', t('Select scheme'), $existing_schema, '', $schemas),
|
||||
'$theme' => (($themes) ? ['theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'] : false),
|
||||
'$schema' => ['schema', t('Select scheme'), $existing_schema, '', $schemas],
|
||||
|
||||
'$preload_images' => array('preload_images', t("Preload images before rendering the page"), $preload_images, t("The subjective page load time will be longer but the page will be ready when displayed"), $yes_no),
|
||||
'$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no),
|
||||
'$ajaxint' => array('browser_update', t("Update notifications every xx seconds"), $browser_update, t('Minimum of 15 seconds, no maximum')),
|
||||
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),
|
||||
'$nosmile' => array('nosmile', t("Show emoticons (smilies) as images"), 1 - intval($nosmile), '', $yes_no),
|
||||
'$preload_images' => ['preload_images', t("Preload images before rendering the page"), $preload_images, t("The subjective page load time will be longer but the page will be ready when displayed"), $yes_no],
|
||||
'$user_scalable' => ['user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no],
|
||||
'$ajaxint' => ['browser_update', t("Update notifications every xx seconds"), $browser_update, t('Minimum of 15 seconds, no maximum')],
|
||||
'$itemspage' => ['itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')],
|
||||
'$nosmile' => ['nosmile', t("Show emoticons (smilies) as images"), 1 - intval($nosmile), '', $yes_no],
|
||||
'$channel_menu' => ['channel_menu', t('Provide channel menu in navigation bar'), get_pconfig(local_channel(), 'system', 'channel_menu', get_config('system', 'channel_menu', 0)), t('Default: channel menu located in app menu'), $yes_no],
|
||||
'$layout_editor' => t('System Page Layout Editor - (advanced)'),
|
||||
'$theme_config' => $theme_config,
|
||||
'$expert' => Features::enabled(local_channel(), 'advanced_theming'),
|
||||
'$channel_divmore_height' => array('channel_divmore_height', t('Channel page max height of content (in pixels)'), ((get_pconfig(local_channel(), 'system', 'channel_divmore_height')) ? get_pconfig(local_channel(), 'system', 'channel_divmore_height') : 400), t('click to expand content exceeding this height')),
|
||||
'$stream_divmore_height' => array('stream_divmore_height', t('Stream page max height of content (in pixels)'), ((get_pconfig(local_channel(), 'system', 'stream_divmore_height')) ? get_pconfig(local_channel(), 'system', 'stream_divmore_height') : 400), t('click to expand content exceeding this height')),
|
||||
'$channel_divmore_height' => ['channel_divmore_height', t('Channel page max height of content (in pixels)'), ((get_pconfig(local_channel(), 'system', 'channel_divmore_height')) ? get_pconfig(local_channel(), 'system', 'channel_divmore_height') : 400), t('click to expand content exceeding this height')],
|
||||
'$stream_divmore_height' => ['stream_divmore_height', t('Stream page max height of content (in pixels)'), ((get_pconfig(local_channel(), 'system', 'stream_divmore_height')) ? get_pconfig(local_channel(), 'system', 'stream_divmore_height') : 400), t('click to expand content exceeding this height')],
|
||||
'$indentpx' => ['indentpx', t('Indent threaded comments this many pixels from the parent'), intval(get_pconfig(local_channel(), 'system', 'thread_indent_px', get_config('system', 'thread_indent_px', 0))), t('0-20')],
|
||||
|
||||
));
|
||||
]);
|
||||
|
||||
Hook::call('display_settings', $o);
|
||||
return $o;
|
||||
|
|
|
@ -597,7 +597,7 @@ class Profile_edit
|
|||
'$addthing' => t('Add profile things'),
|
||||
'$personal' => t('Personal'),
|
||||
'$location' => t('Location'),
|
||||
'$relation' => t('Relationship'),
|
||||
'$relation' => t('Gender and Relationship'),
|
||||
'$miscellaneous' => t('Miscellaneous'),
|
||||
'$exportable' => Features::enabled(local_channel(), 'profile_export'),
|
||||
'$lbl_import' => t('Import profile from file'),
|
||||
|
@ -789,7 +789,7 @@ class Profile_edit
|
|||
public static function gender_selector_min($current = "", $suffix = "")
|
||||
{
|
||||
$o = '';
|
||||
$select = ['', t('Male'), t('Female'), t('Other')];
|
||||
$select = ['', t('Male'), t('Female'), t('Intersex'), t('Agender'), t('Genderfluid'), t('It\'s complicated'), t('Other')];
|
||||
|
||||
Hook::call('gender_selector_min', $select);
|
||||
|
||||
|
@ -839,7 +839,7 @@ class Profile_edit
|
|||
public static function sexpref_selector($current = "", $suffix = "")
|
||||
{
|
||||
$o = '';
|
||||
$select = ['', t('Males'), t('Females'), t('Gay'), t('Lesbian'), t('No Preference'), t('Bisexual'), t('Autosexual'), t('Abstinent'), t('Virgin'), t('Deviant'), t('Fetish'), t('Oodles'), t('Nonsexual')];
|
||||
$select = ['', t('Males'), t('Females'), t('Bisexual'), t('Autosexual'), t('Abstinent'), t('Virgin'), t('Asexual'), t('It\'s complicated'),t('Other')];
|
||||
|
||||
|
||||
Hook::call('sexpref_selector', $select);
|
||||
|
|
|
@ -53,27 +53,19 @@
|
|||
{{include file="field_input.tpl" field=$pdesc}}
|
||||
{{/if}}
|
||||
|
||||
{{if $fields.basic_gender || $fields.advanced_gender || $fields.gender || $fields.pronouns}}
|
||||
<div id="profile-edit-gender-wrapper" class="form-group field select" >
|
||||
<label id="profile-edit-gender-label" for="gender-select" >{{$lbl_gender}}</label>
|
||||
{{if ($advanced && $fields.gender) || $fields.advanced_gender}}
|
||||
{{if $gender_text}}{{$gender_text}}{{else}}{{$gender}}{{/if}}
|
||||
{{else}}
|
||||
{{$gender_min}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $fields.pronouns}}
|
||||
<div id="profile-edit-pronouns-wrapper" class="form-group field" >
|
||||
<label id="profile-edit-pronouns-label" for="pronouns-select" >{{$lbl_pronouns}}</label>
|
||||
{{$pronouns}}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div id="profile-edit-pronouns-wrapper" class="form-group field" >
|
||||
<label id="profile-edit-pronouns-label" for="pronouns-select" >{{$lbl_pronouns}}</label>
|
||||
{{$pronouns}}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{{/if}}
|
||||
|
||||
{{if $fields.about}}
|
||||
{{include file="field_textarea.tpl" field=$about}}
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $fields.dob}}
|
||||
{{$dob}}
|
||||
{{/if}}
|
||||
|
@ -252,7 +244,7 @@
|
|||
|
||||
{{/if}}
|
||||
|
||||
{{if $fields.marital || $fields.sexual}}
|
||||
{{if $fields.marital || $fields.sexual || $fields.basic_gender || $fields.advanced_gender || $fields.gender }}
|
||||
<div class="panel">
|
||||
<div class="section-subtitle-wrapper" role="tab" id="relation">
|
||||
<h3>
|
||||
|
@ -263,6 +255,21 @@
|
|||
</div>
|
||||
<div id="relation-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="relation">
|
||||
<div class="section-content-tools-wrapper">
|
||||
|
||||
{{if $fields.basic_gender || $fields.advanced_gender || $fields.gender}}
|
||||
<div id="profile-edit-gender-wrapper" class="form-group field select" >
|
||||
<label id="profile-edit-gender-label" for="gender-select" >{{$lbl_gender}}</label>
|
||||
{{if ($advanced && $fields.gender) || $fields.advanced_gender}}
|
||||
{{if $gender_text}}{{$gender_text}}{{else}}{{$gender}}{{/if}}
|
||||
{{else}}
|
||||
{{$gender_min}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
{{if $fields.marital }}
|
||||
<div id="profile-edit-marital-wrapper" class="form-group field" >
|
||||
<label id="profile-edit-marital-label" for="profile-edit-marital" ><span class="heart"><i class="fa fa-heart"></i> </span>{{$lbl_marital}}</label>
|
||||
|
@ -328,9 +335,6 @@
|
|||
{{include file="field_input.tpl" field=$religion}}
|
||||
{{/if}}
|
||||
|
||||
{{if $fields.about}}
|
||||
{{include file="field_textarea.tpl" field=$about}}
|
||||
{{/if}}
|
||||
|
||||
{{if $fields.contact}}
|
||||
{{include file="field_textarea.tpl" field=$contact}}
|
||||
|
|
Loading…
Reference in a new issue