mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
feat: gestione tel e mailto per le tabelle datatables
This commit is contained in:
@ -177,8 +177,18 @@ if (!empty($query)) {
|
||||
$column['data-color'] = isset($column['data-color']) ? $column['data-color'] : color_inverse(trim($column['data-background']));
|
||||
}
|
||||
|
||||
elseif (preg_match('/^mailto_(.+?)$/', trim($field), $m)) {
|
||||
$column['class'] = '';
|
||||
$value = ($r[$field] ? '<a class="btn btn-default btn-sm btn-block" style="font-weight:normal;" href="mailto:'.$r[$field].'" target="_blank"><i class="fa fa-envelope text-primary"></i> '.$r[$field].'</a>' : '');
|
||||
}
|
||||
|
||||
elseif (preg_match('/^tel_(.+?)$/', trim($field), $m)) {
|
||||
$column['class'] = '';
|
||||
$value = ($r[$field] ? '<a class="btn btn-default btn-sm btn-block" href="tel:'.$r[$field].'" target="_blank"><i class="fa fa-phone text-primary"></i> '.$r[$field].'</a>' : '');
|
||||
}
|
||||
|
||||
// Link della colonna
|
||||
if ($field != '_print_') {
|
||||
if ($field != '_print_' && !preg_match('/^tel_(.+?)$/', trim($field), $m) && !preg_match('/^mailto_(.+?)$/', trim($field), $m)) {
|
||||
$id_record = $r['id'];
|
||||
$hash = '';
|
||||
|
||||
|
Reference in New Issue
Block a user