#204 Process error handling on staff-side
This commit is contained in:
parent
38704b2c12
commit
a6328e3be8
@ -864,17 +864,23 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
if ($modsForHesk_settings['request_location'])
|
if ($modsForHesk_settings['request_location'])
|
||||||
{
|
{
|
||||||
$locationText = '';
|
$locationText = '';
|
||||||
|
$iconColor = '';
|
||||||
|
$hasLocation = true;
|
||||||
if (strpos($ticket['latitude'], 'E') === false)
|
if (strpos($ticket['latitude'], 'E') === false)
|
||||||
{
|
{
|
||||||
$locationText = $hesklang['click_for_map'];
|
$locationText = $hesklang['click_for_map'];
|
||||||
|
$iconColor = 'inherit';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$hasLocation = false;
|
||||||
$locationText = $hesklang['location_unavailable'];
|
$locationText = $hesklang['location_unavailable'];
|
||||||
|
$iconColor = '#ccc';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<span data-toggle="modal" data-target=".map-modal" style="cursor: pointer">
|
<span data-toggle="modal" data-target=".map-modal" style="cursor: pointer">
|
||||||
<i class="fa fa-map-marker" data-toggle="tooltip" title="<?php echo $locationText; ?>"></i>
|
<i class="fa fa-map-marker" data-toggle="tooltip" title="<?php echo $locationText; ?>"
|
||||||
|
style="color: <?php echo $iconColor; ?>"></i>
|
||||||
</span>
|
</span>
|
||||||
<div id="map-modal" class="modal fade map-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
<div id="map-modal" class="modal fade map-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog modal-lg">
|
||||||
@ -883,18 +889,34 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
<h4><?php echo $hesklang['users_location']; ?></h4>
|
<h4><?php echo $hesklang['users_location']; ?></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="map" style="height: 500px"></div>
|
<?php if ($hasLocation): ?>
|
||||||
|
<div id="map" style="height: 500px"></div>
|
||||||
|
<?php
|
||||||
|
else:
|
||||||
|
$errorCode = explode('-', $ticket['latitude']);
|
||||||
|
$key = 'location_unavailable_'.$errorCode[1];
|
||||||
|
echo '<h5>'.$hesklang[$key].'</h5>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Only output JavaScript if we have coordinates
|
||||||
|
if (strpos($ticket['latitude'], 'E') === false):
|
||||||
|
?>
|
||||||
<script>
|
<script>
|
||||||
var map = L.map('map').setView([<?php echo $ticket['latitude']; ?>, <?php echo $ticket['longitude']; ?>], 15);
|
var latitude = '';
|
||||||
|
latitude = <?php echo $ticket['latitude']; ?>;
|
||||||
|
var longitude = '';
|
||||||
|
longitude = <?php echo $ticket['longitude']; ?>;
|
||||||
|
var map = L.map('map').setView([latitude, longitude], 15);
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
L.marker([<?php echo $ticket['latitude']; ?>, <?php echo $ticket['longitude']; ?>]).addTo(map)
|
L.marker([latitude, longitude]).addTo(map)
|
||||||
.bindPopup("<?php echo $hesklang['users_location']; ?>");
|
.bindPopup("<?php echo $hesklang['users_location']; ?>");
|
||||||
|
|
||||||
|
|
||||||
@ -905,6 +927,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
endif;
|
||||||
}
|
}
|
||||||
echo $ticket['subject'];
|
echo $ticket['subject'];
|
||||||
?></h3>
|
?></h3>
|
||||||
|
@ -44,12 +44,20 @@ $hesklang['show_number_merged_help'] = 'If enabled, the user will be able to see
|
|||||||
$hesklang['latest_top_on_home'] = 'Latest/Top articles on home page';
|
$hesklang['latest_top_on_home'] = 'Latest/Top articles on home page';
|
||||||
$hesklang['latest_top_on_home_help'] = 'Select YES to display the top and latest knowledgebase articles on the home page.
|
$hesklang['latest_top_on_home_help'] = 'Select YES to display the top and latest knowledgebase articles on the home page.
|
||||||
Otherwise, a link to the knowledgebase will appear on the home page.';
|
Otherwise, a link to the knowledgebase will appear on the home page.';
|
||||||
$hesklang['location_unavailable'] = "Customer's location is unavailable. Click the crosshair for more information.";
|
$hesklang['location_unavailable'] = "Location unavailable. Click for more information.";
|
||||||
$hesklang['click_for_map'] = "View map of user's location";
|
$hesklang['click_for_map'] = "View map of user's location";
|
||||||
$hesklang['request_user_location'] = "Request Location";
|
$hesklang['request_user_location'] = "Request Location";
|
||||||
$hesklang['request_user_location_help'] = "If enabled, the help desk will ask for the customer's location, allowing staff to
|
$hesklang['request_user_location_help'] = "If enabled, the help desk will ask for the customer's location, allowing staff to
|
||||||
see a map of the customer's location when they created the ticket.";
|
see a map of the customer's location when they created the ticket.";
|
||||||
$hesklang['users_location'] = "User's Location";
|
$hesklang['users_location'] = "User's Location";
|
||||||
|
$hesklang['location_unavailable_0'] = "User's location is not available because the ticket was created before location tracking was enabled.";
|
||||||
|
$hesklang['location_unavailable_1'] = "User's location is not available because the user refused to share it.";
|
||||||
|
$hesklang['location_unavailable_2'] = "User's location is not available because the help desk was unable to determine the user's position.";
|
||||||
|
$hesklang['location_unavailable_3'] = "User's location is not available because the help desk was not able to determine the user's position in
|
||||||
|
a reasonable amount of time.";
|
||||||
|
$hesklang['location_unavailable_4'] = "An unknown error occurred when trying to obtain the user's location.";
|
||||||
|
$hesklang['location_unavailable_5'] = "User's location is not available because the user's browser did not meet the minimum
|
||||||
|
requirements for tracking their location when the ticket was submitted.";
|
||||||
|
|
||||||
// ADDED OR MODIFIED IN Mods for HESK 2.2.1
|
// ADDED OR MODIFIED IN Mods for HESK 2.2.1
|
||||||
$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)
|
$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user