mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
jot: cleanup/collapse location service buttons into a dropdown
This commit is contained in:
parent
df757cdb19
commit
477cf933c1
3 changed files with 21 additions and 15 deletions
|
@ -499,8 +499,8 @@ class Libprofile
|
|||
|
||||
// logger('gender: ' . $gender);
|
||||
|
||||
// This can easily get throw off if the observer language is different
|
||||
// than the channel owner language.
|
||||
// This can easily get thrown off if the observer language is different
|
||||
// from the channel owner language.
|
||||
|
||||
if (str_contains(strtolower($gender), strtolower(t('Female')))) {
|
||||
return 'venus';
|
||||
|
@ -528,8 +528,8 @@ class Libprofile
|
|||
{
|
||||
|
||||
|
||||
// This can easily get throw off if the observer language is different
|
||||
// than the channel owner language.
|
||||
// This can easily get thrown off if the observer language is different
|
||||
// from the channel owner language.
|
||||
|
||||
if (str_contains(strtolower($pronouns), strtolower(t('She')))) {
|
||||
return 'venus';
|
||||
|
@ -612,8 +612,9 @@ class Libprofile
|
|||
$val = substr(App::$profile['dob'], 0, 4);
|
||||
}
|
||||
|
||||
$year_bd_format = t('j F, Y');
|
||||
$short_bd_format = t('j F');
|
||||
// translators: 'j F, Y' produces the format '4 May, 2021'
|
||||
$year_bd_format = t('j F, Y', 'birthday_time_format');
|
||||
$short_bd_format = t('j F', 'short_birthday_time_format');
|
||||
|
||||
if (!$val) {
|
||||
$val = ((intval(App::$profile['dob']))
|
||||
|
|
|
@ -1297,6 +1297,7 @@ function z_status_editor($x, $popup = false)
|
|||
'$embedPhotosModalCancel' => t('Cancel'),
|
||||
'$embedPhotosModalOK' => t('OK'),
|
||||
'$setloc' => $setloc,
|
||||
'$locdesc' => t('Location options'),
|
||||
'$poll' => t('Toggle poll'),
|
||||
'$poll_option_label' => t('Option'),
|
||||
'$poll_add_option_label' => t('Add option'),
|
||||
|
|
|
@ -147,27 +147,31 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="btn-group ">
|
||||
|
||||
<button type="button" id="location-dropdown" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" title="{{$locdesc}}">
|
||||
<i id="location-menu-icon" class="fa fa-globe jot-icons"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
{{if $setloc}}
|
||||
<button id="profile-location-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$setloc}}" onclick="jotGetLocation();return false;">
|
||||
<i id="profile-location" class="fa fa-globe jot-icons"></i>
|
||||
<button id="profile-location-wrapper" class="dropdown-item btn btn-outline-secondary btn-sm" title="{{$setloc}}" onclick="jotGetLocation();return false;">
|
||||
<i id="profile-location" class="fa fa-globe jot-icons"></i> {{$setloc}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $clearloc}}
|
||||
<button id="profile-nolocation-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$clearloc}}" onclick="jotClearLocation();return false;" disabled="disabled">
|
||||
<i id="profile-nolocation" class="fa fa-circle-o jot-icons"></i>
|
||||
<button id="profile-nolocation-wrapper" class="dropdown-item btn btn-outline-secondary btn-sm" title="{{$clearloc}}" onclick="jotClearLocation();return false;" disabled="disabled">
|
||||
<i id="profile-nolocation" class="fa fa-circle-o jot-icons"></i> {{$clearloc}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $feature_checkin}}
|
||||
<button id="profile-checkin-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$checkin}}" onclick="jotCheckin(); return false;">
|
||||
<i id="profile-checkin" class="fa fa-sign-in jot-icons"></i>
|
||||
<button id="profile-checkin-wrapper" class="dropdown-item btn btn-outline-secondary btn-sm" title="{{$checkin}}" onclick="jotCheckin(); return false;">
|
||||
<i id="profile-checkin" class="fa fa-sign-in jot-icons"></i> {{$checkin}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $feature_checkout}}
|
||||
<button id="profile-checkout-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$checkout}}" onclick="jotCheckout(); return false;">
|
||||
<i id="profile-checkout" class="fa fa-sign-out jot-icons"></i>
|
||||
<button id="profile-checkout-wrapper" class="dropdown-item btn btn-outline-secondary btn-sm" title="{{$checkout}}" onclick="jotCheckout(); return false;">
|
||||
<i id="profile-checkout" class="fa fa-sign-out jot-icons"></i> {{$checkout}}
|
||||
</button>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="btn-group d-none ">
|
||||
{{/if}}
|
||||
|
|
Loading…
Reference in a new issue