streamline location rendering

This commit is contained in:
Mario
2024-08-02 16:02:29 +00:00
parent 7eb23aa8b8
commit 56cb6f1034
5 changed files with 24 additions and 20 deletions

View File

@@ -1467,14 +1467,18 @@ function render_location_default($item) {
$location = $item['location'];
$coord = $item['coord'];
if($coord) {
if ($coord) {
if($location)
$location .= '&nbsp;<span class="smalltext">(' . $coord . ')</span>';
$location .= '&nbsp;(' . $coord . ')';
else
$location = '<span class="smalltext">' . $coord . '</span>';
$location = $coord;
}
return $location;
if (!$location) {
return '';
}
return '<i class="bi bi-geo-alt" title="' . $location . '"></i>';
}

View File

@@ -29,14 +29,14 @@
<div class="p-2 wall-item-head{{if !$item.title && !$item.event && !$item.photo}} rounded-top{{/if}}{{if $item.is_new && !$item.event && !$item.is_comment}} wall-item-head-new{{/if}} clearfix">
<div class="lh-sm text-end float-end">
<div class="wall-item-ago opacity-75" id="wall-item-ago-{{$item.id}}">
{{if $item.editedtime}}
<i class="bi bi-pencil"></i>
{{if $item.location}}
{{$item.location}}
{{/if}}
{{if $item.delayed}}
<i class="bi bi-clock"></i>
{{/if}}
{{if $item.location}}
<small class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}}</small>
{{if $item.editedtime}}
<i class="bi bi-pencil"></i>
{{/if}}
{{if $item.verified}}
<i class="bi bi-shield-check" title="{{$item.verified}}"></i>

View File

@@ -23,14 +23,14 @@
<div class="p-2 wall-item-head{{if !$item.title && !$item.event && !$item.photo}} rounded-top{{/if}}{{if $item.is_new && !$item.event && !$item.is_comment}} wall-item-head-new{{/if}}" >
<div class="lh-sm text-end float-end">
<div class="wall-item-ago opacity-75" id="wall-item-ago-{{$item.id}}">
{{if $item.editedtime}}
<i class="bi bi-pencil"></i>
{{if $item.location}}
{{$item.location}}
{{/if}}
{{if $item.delayed}}
<i class="bi bi-clock"></i>
{{/if}}
{{if $item.location}}
<small class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}}</small>
{{if $item.editedtime}}
<i class="bi bi-pencil"></i>
{{/if}}
{{if $item.verified}}
<i class="bi bi-shield-check" title="{{$item.verified}}"></i>

View File

@@ -138,12 +138,12 @@
<div class="btn-group me-2 d-none d-lg-flex">
{{if $setloc}}
<button type="button" id="profile-location-wrapper" class="btn btn-outline-secondary btn-sm border-0" title="{{$setloc}}" onclick="jotGetLocation();return false;">
<i id="profile-location" class="bi bi-geo-fill jot-icons"></i>
<i id="profile-location" class="bi bi-geo-alt-fill jot-icons"></i>
</button>
{{/if}}
{{if $clearloc}}
<button type="button" id="profile-nolocation-wrapper" class="btn btn-outline-secondary btn-sm border-0" title="{{$clearloc}}" onclick="jotClearLocation();return false;" disabled="disabled">
<i id="profile-nolocation" class="bi bi-geo jot-icons"></i>
<i id="profile-nolocation" class="bi bi-geo-alt jot-icons"></i>
</button>
{{/if}}
{{else}}
@@ -193,10 +193,10 @@
<a class="dropdown-item" href="#" onclick="initializeEmbedPhotoDialog(); return false;"><i class="bi bi-file-image jot-icons"></i>&nbsp;{{$embedPhotos}}</a>
{{/if}}
{{if $setloc}}
<a class="dropdown-item" href="#" onclick="jotGetLocation(); return false;"><i class="bi bi-geo-fill"></i>&nbsp;{{$setloc}}</a>
<a class="dropdown-item" href="#" onclick="jotGetLocation(); return false;"><i class="bi bi-geo-alt-fill"></i>&nbsp;{{$setloc}}</a>
{{/if}}
{{if $clearloc}}
<a class="dropdown-item" href="#" onclick="jotClearLocation(); return false;"><i class="bi bi-geo"></i>&nbsp;{{$clearloc}}</a>
<a class="dropdown-item" href="#" onclick="jotClearLocation(); return false;"><i class="bi bi-geo-alt"></i>&nbsp;{{$clearloc}}</a>
{{/if}}
{{/if}}
{{if $feature_expire}}

View File

@@ -23,14 +23,14 @@
<div class="p-2 wall-item-head{{if !$item.title && !$item.event && !$item.photo}} rounded-top{{/if}}{{if $item.is_new && !$item.event && !$item.is_comment}} wall-item-head-new{{/if}}" >
<div class="lh-sm text-end float-end">
<div class="wall-item-ago opacity-75" id="wall-item-ago-{{$item.id}}">
{{if $item.editedtime}}
<i class="bi bi-pencil"></i>
{{if $item.location}}
{{$item.location}}
{{/if}}
{{if $item.delayed}}
<i class="bi bi-clock"></i>
{{/if}}
{{if $item.location}}
<small class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}}</small>
{{if $item.editedtime}}
<i class="bi bi-pencil"></i>
{{/if}}
{{if $item.verified}}
<i class="bi bi-shield-check" title="{{$item.verified}}"></i>