#204 Map is now in a modal and can be obtained via FontAwesome icon
This commit is contained in:
parent
b44884a99e
commit
38704b2c12
@ -873,24 +873,36 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
$locationText = $hesklang['location_unavailable'];
|
||||
}
|
||||
?>
|
||||
<button class="btn btn-default" data-toggle="modal" data-target=".map-modal"><?php echo $locationText; ?></button>
|
||||
|
||||
|
||||
<div class="modal fade map-modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<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>
|
||||
</span>
|
||||
<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-content">
|
||||
<p>map modal!</p>
|
||||
<div class="modal-header">
|
||||
<h4><?php echo $hesklang['users_location']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="map" style="height: 500px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map" style="height: 150px"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var map = L.map('map').setView([<?php echo $ticket['latitude']; ?>, <?php echo $ticket['longitude']; ?>], 13);
|
||||
var map = L.map('map').setView([<?php echo $ticket['latitude']; ?>, <?php echo $ticket['longitude']; ?>], 15);
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
L.marker([<?php echo $ticket['latitude']; ?>, <?php echo $ticket['longitude']; ?>]).addTo(map)
|
||||
.bindPopup('A pretty CSS3 popup. <br> Easily customizable.');
|
||||
.bindPopup("<?php echo $hesklang['users_location']; ?>");
|
||||
|
||||
|
||||
$('#map-modal').on('shown.bs.modal', function(){
|
||||
setTimeout(function() {
|
||||
map.invalidateSize();
|
||||
}, 10);
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
@ -45,10 +45,11 @@ $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.
|
||||
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['click_for_map'] = "Click the crosshair to see a map of the ticket's location";
|
||||
$hesklang['click_for_map'] = "View map of user's 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
|
||||
see a map of the customer's location when they created the ticket.";
|
||||
$hesklang['users_location'] = "User's Location";
|
||||
|
||||
// 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 (:)
|
||||
|
Loading…
x
Reference in New Issue
Block a user