mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadido helper de gestion de assets caducados e implementado en CSS de PDFs
This commit is contained in:
@ -35,7 +35,7 @@ class BaseController extends Controller
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $helpers = ['general', 'go_common', 'rbac'];
|
||||
protected $helpers = ['general', 'go_common', 'rbac', 'assets'];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@ -85,7 +85,7 @@ abstract class BaseResourceController extends \CodeIgniter\RESTful\ResourceContr
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $helpers = ['session', 'go_common', 'form', 'text', 'general', 'rbac']; //JJO
|
||||
protected $helpers = ['session', 'go_common', 'form', 'text', 'general', 'rbac', 'assets']; //JJO
|
||||
|
||||
/**
|
||||
* Initializer method.
|
||||
|
||||
@ -139,7 +139,7 @@ abstract class GoBaseController extends Controller
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $helpers = ['session', 'go_common', 'text', 'general', 'jwt', 'rbac']; //JJO
|
||||
protected $helpers = ['session', 'go_common', 'text', 'general', 'jwt', 'rbac', 'assets']; //JJO
|
||||
|
||||
public static $queries = [];
|
||||
|
||||
|
||||
10
ci4/app/Helpers/assets_helper.php
Normal file
10
ci4/app/Helpers/assets_helper.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('versioned_asset')) {
|
||||
function versioned_asset(string $path): string
|
||||
{
|
||||
$fullPath = FCPATH . $path;
|
||||
$version = file_exists($fullPath) ? filemtime($fullPath) : time();
|
||||
return site_url($path) . '?v=' . $version;
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/font-pdf.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.albaran.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.albaran.css') ?>">
|
||||
<style>
|
||||
@page {
|
||||
margin: 10px;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/font-pdf.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.albaran.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.albaran.css') ?>">
|
||||
<style>
|
||||
@page {
|
||||
margin: 10px;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/font-pdf.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.factura.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.factura.css') ?>">
|
||||
<style>
|
||||
@page {
|
||||
margin: 10px;
|
||||
|
||||
@ -25,7 +25,7 @@ $settings = $session->get('settings');
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
|
||||
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
|
||||
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ $settings = $session->get('settings');
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
|
||||
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
|
||||
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ $settings = $session->get('settings');
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
|
||||
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
|
||||
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/font-pdf.css') ?>">
|
||||
<!-- <link rel="stylesheet" href="--><?php //= site_url('themes/vuexy/css/all.css') ?><!--">-->
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.presupuesto.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.presupuesto.css') ?>">
|
||||
<style>
|
||||
@page {
|
||||
margin: 10px;
|
||||
|
||||
@ -25,7 +25,7 @@ $settings = $session->get('settings');
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/app-chat.css') ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/flatpickr/flatpickr.css') ?>" />
|
||||
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>" />
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
<link rel="stylesheet" href="<?= versioned_asset('themes/vuexy/css/pdf.ot.css') ?>">
|
||||
|
||||
<title><?= $presupuesto->titulo ?>[OT:<?= $ot->id ?>]</title>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user