mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 19:40:44 +01:00
Aggiunta variabile random per evitare la cache del browser
in fase di link pdf o anteprima stampa
This commit is contained in:
parent
921fc0ad98
commit
fbdd4f4587
@ -143,7 +143,7 @@ if (!empty($sessioni)) {
|
|||||||
|
|
||||||
// ORE
|
// ORE
|
||||||
echo '
|
echo '
|
||||||
<td style="border-right:1px solid #aaa;">'.($ore <= 0 ? '<i title="'.tr('Questa sessione non ha una durata valida.').'" class="fa fa-warning tip text-warning"></i>' : '').'
|
<td style="border-right:1px solid #aaa;">'.(((\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->eq(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine']))) || (\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_inizio'])->gt(\Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $sessione['orario_fine'])))) ? '<i title="'.tr('Questa sessione non ha una durata valida.').'" class="fa fa-warning tip text-warning"></i>' : '').'
|
||||||
</td>
|
</td>
|
||||||
<td style="border-right:1px solid #aaa;">
|
<td style="border-right:1px solid #aaa;">
|
||||||
{[ "type": "number", "name": "ore_'.$sessione['id'].'", "required": 1, "value": "'.numberFormat($ore, 'qta').'", "disabled": "1" ]}
|
{[ "type": "number", "name": "ore_'.$sessione['id'].'", "required": 1, "value": "'.numberFormat($ore, 'qta').'", "disabled": "1" ]}
|
||||||
|
@ -260,7 +260,7 @@ class Prints
|
|||||||
{
|
{
|
||||||
$info = self::render($print, $id_record, $directory);
|
$info = self::render($print, $id_record, $directory);
|
||||||
|
|
||||||
return self::getPDFLink($info['path']);
|
return self::getPDFLink($info['path'].'?'.rand());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -272,7 +272,7 @@ class Prints
|
|||||||
*/
|
*/
|
||||||
public static function getPDFLink($path)
|
public static function getPDFLink($path)
|
||||||
{
|
{
|
||||||
return base_path().'/assets/dist/pdfjs/web/viewer.html?file='.base_url().'/'.ltrim(str_replace(base_dir(), '', $path), '/');
|
return base_path().'/assets/dist/pdfjs/web/viewer.html?file='.base_url().'/'.ltrim(str_replace(base_dir(), '', $path.'?'.rand()), '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user