111 lines
8.0 KiB
PHP
111 lines
8.0 KiB
PHP
<?php /* Smarty version Smarty-3.1.7, created on 2025-09-26 16:23:46
|
|
compiled from "C:\xampp\htdocs\sophalcrm\includes\runtime/../../layouts/v7\modules\Accounts\DetailViewHeaderTitle.tpl" */ ?>
|
|
<?php /*%%SmartyHeaderCode:122798025068d6be128fb568-47069791%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
|
$_valid = $_smarty_tpl->decodeProperties(array (
|
|
'file_dependency' =>
|
|
array (
|
|
'c2bff16af5a7792c1b4219f213934ba4c7245f65' =>
|
|
array (
|
|
0 => 'C:\\xampp\\htdocs\\sophalcrm\\includes\\runtime/../../layouts/v7\\modules\\Accounts\\DetailViewHeaderTitle.tpl',
|
|
1 => 1758796599,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'nocache_hash' => '122798025068d6be128fb568-47069791',
|
|
'function' =>
|
|
array (
|
|
),
|
|
'variables' =>
|
|
array (
|
|
'SELECTED_MENU_CATEGORY' => 0,
|
|
'RECORD' => 0,
|
|
'IMAGE_DETAILS' => 0,
|
|
'IMAGE_INFO' => 0,
|
|
'MODULE_MODEL' => 0,
|
|
'NAME_FIELD' => 0,
|
|
'FIELD_MODEL' => 0,
|
|
'MODULE' => 0,
|
|
'MODULE_NAME' => 0,
|
|
),
|
|
'has_nocache_code' => false,
|
|
'version' => 'Smarty-3.1.7',
|
|
'unifunc' => 'content_68d6be1290b8d',
|
|
),false); /*/%%SmartyHeaderCode%%*/?>
|
|
<?php if ($_valid && !is_callable('content_68d6be1290b8d')) {function content_68d6be1290b8d($_smarty_tpl) {?>
|
|
<div class="col-sm-6"><div class="clearfix record-header "><div class="hidden-sm hidden-xs recordImage bgAccounts app-<?php echo $_smarty_tpl->tpl_vars['SELECTED_MENU_CATEGORY']->value;?>
|
|
"><?php $_smarty_tpl->tpl_vars['IMAGE_DETAILS'] = new Smarty_variable($_smarty_tpl->tpl_vars['RECORD']->value->getImageDetails(), null, 0);?><?php $_smarty_tpl->tpl_vars['IMAGE_INFO'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['IMAGE_INFO']->_loop = false;
|
|
$_smarty_tpl->tpl_vars['ITER'] = new Smarty_Variable;
|
|
$_from = $_smarty_tpl->tpl_vars['IMAGE_DETAILS']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['IMAGE_INFO']->key => $_smarty_tpl->tpl_vars['IMAGE_INFO']->value){
|
|
$_smarty_tpl->tpl_vars['IMAGE_INFO']->_loop = true;
|
|
$_smarty_tpl->tpl_vars['ITER']->value = $_smarty_tpl->tpl_vars['IMAGE_INFO']->key;
|
|
?><?php if (!empty($_smarty_tpl->tpl_vars['IMAGE_INFO']->value['path'])){?><img src="<?php echo $_smarty_tpl->tpl_vars['IMAGE_INFO']->value['path'];?>
|
|
_<?php echo $_smarty_tpl->tpl_vars['IMAGE_INFO']->value['orgname'];?>
|
|
" alt="<?php echo $_smarty_tpl->tpl_vars['IMAGE_INFO']->value['orgname'];?>
|
|
" title="<?php echo $_smarty_tpl->tpl_vars['IMAGE_INFO']->value['orgname'];?>
|
|
" width="100%" height="100%" align="left"><br><?php }else{ ?><img src="<?php echo vimage_path('summary_organizations.png');?>
|
|
" class="summaryImg"/><?php }?><?php } ?><?php if (empty($_smarty_tpl->tpl_vars['IMAGE_DETAILS']->value)){?><div class="name"><span><strong><?php echo $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getModuleIcon();?>
|
|
</strong></span></div><?php }?></div><div class="recordBasicInfo"><div class="info-row" ><h4><span class="recordLabel pushDown" title="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getName();?>
|
|
"><?php $_smarty_tpl->tpl_vars['NAME_FIELD'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['NAME_FIELD']->_loop = false;
|
|
$_from = $_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getNameFields(); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
|
foreach ($_from as $_smarty_tpl->tpl_vars['NAME_FIELD']->key => $_smarty_tpl->tpl_vars['NAME_FIELD']->value){
|
|
$_smarty_tpl->tpl_vars['NAME_FIELD']->_loop = true;
|
|
?><?php $_smarty_tpl->tpl_vars['FIELD_MODEL'] = new Smarty_variable($_smarty_tpl->tpl_vars['MODULE_MODEL']->value->getField($_smarty_tpl->tpl_vars['NAME_FIELD']->value), null, 0);?><?php if ($_smarty_tpl->tpl_vars['FIELD_MODEL']->value->getPermissions()){?><span class="<?php echo $_smarty_tpl->tpl_vars['NAME_FIELD']->value;?>
|
|
"><?php echo trim($_smarty_tpl->tpl_vars['RECORD']->value->get($_smarty_tpl->tpl_vars['NAME_FIELD']->value));?>
|
|
</span> <?php }?><?php } ?></span></h4></div><?php echo $_smarty_tpl->getSubTemplate (vtemplate_path("DetailViewHeaderFieldsView.tpl",$_smarty_tpl->tpl_vars['MODULE']->value), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
|
|
<div class="info-row"><i class="fa fa-map-marker"></i> <a class="showMap" href="javascript:void(0);" onclick='Vtiger_Index_Js.showMap(this);' data-module='<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getModule()->getName();?>
|
|
' data-record='<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
|
|
'><?php echo vtranslate('LBL_SHOW_MAP',$_smarty_tpl->tpl_vars['MODULE_NAME']->value);?>
|
|
</a></div></div></div><!-- sophal --><button type="button" class="btn btn-danger"" data-toggle="modal" data-target="#myModal" onclick ="getLocation()"><div class="fa fa-crosshairs" aria-hidden="true"></div> Géolocalisation</button> <button type="button" class="btn btn-danger"" data-toggle="modal" data-target="#myModal" onclick ="showPHPLocation(<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('cf_986');?>
|
|
,<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->get('cf_988');?>
|
|
)"><div class="fa fa-crosshairs" aria-hidden="true"></div> Voir sur la carte</button><!-- Modal --><div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button><h4 class="modal-title" id="myModalLabel">Coordonnées GPS</h4></div><div class="modal-body"><form action="Geolocalisation.php" method="POST" accept-charset="utf-8"><input type="hidden" name="idUser" value="<?php echo $_smarty_tpl->tpl_vars['RECORD']->value->getId();?>
|
|
"><input type="hidden" name="Latitude" id="IDLatitude" ><input type="hidden" name="Longitude" id="IDLongitude" ><!-- map container --><div id="map"></div></div><div class="modal-footer"><button type="submit" name="Enregistrer" id='EnregistrerBtn' class="btn addButton btn-success" >Enregistrer</button><button type="button" class="btn btn-primary" data-dismiss="modal">Close</button></div></div></div></div></form><!-- sophal --></div>
|
|
|
|
<script>
|
|
|
|
function showPHPLocation(lat, long) {
|
|
document.getElementById("EnregistrerBtn").style.visibility = "hidden";
|
|
MapCompte(lat, long);
|
|
}
|
|
function showLocation(position) {
|
|
document.getElementById("EnregistrerBtn").style.visibility = "";
|
|
var latitude = position.coords.latitude;
|
|
var longitude = position.coords.longitude;
|
|
MapCompte(latitude , longitude);
|
|
document.getElementById("IDLatitude").value = latitude;
|
|
document.getElementById("IDLongitude").value = longitude;
|
|
|
|
}
|
|
|
|
function errorHandler(err) {
|
|
if(err.code == 1) {
|
|
alert("Erreur: Accès refusé");
|
|
|
|
} else if( err.code == 2) {
|
|
alert("Erreur: Votre position n'est pas disponible");
|
|
}
|
|
}
|
|
|
|
function getLocation() {
|
|
if(navigator.geolocation) {
|
|
navigator.geolocation.getCurrentPosition(function(position){
|
|
navigator.geolocation.getCurrentPosition(showLocation, errorHandler, { enableHighAccuracy: true, maximumAge: 1000, timeout: 6000 });
|
|
},function(){}, { maximumAge: 0, timeout: 6000 });
|
|
} else {
|
|
alert("Votre navigateur ne supporte pas la géolocalisation!");
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
#map {
|
|
width: 100%;
|
|
height: 400px;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
|
|
<script src="jscss/leaflet.js"></script>
|
|
<link rel="stylesheet" href="jscss/leaflet.css"/><?php }} ?>
|