Cambios en titulo, en boton fojas, y en indices online
This commit is contained in:
@ -4,6 +4,7 @@ namespace ProVM\NotariaRaby\Common\Controller\Web\Admin;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Slim\Views\Blade as View;
|
||||
use Carbon\Carbon;
|
||||
use ProVM\Common\Service\Filemanager;
|
||||
|
||||
class Admin {
|
||||
@ -17,7 +18,13 @@ class Admin {
|
||||
'activo' => false
|
||||
];
|
||||
}
|
||||
$months = (object) ['full' => [], 'short' => []];
|
||||
$m = Carbon::createFromDate(0, 1, 1);
|
||||
for ($i = 0; $i < 12; $i ++) {
|
||||
$months->full []= ucwords($m->copy()->addMonths($i)->locale('es_ES')->isoFormat('MMMM'));
|
||||
$months->short []= ucwords($m->copy()->addMonths($i)->locale('es_ES')->isoFormat('MMM'));
|
||||
}
|
||||
$transparencia = $filemanager->folder('data')->load('transparencia.yml')->activo;
|
||||
return $view->render($response, 'admin.admin', compact('aviso', 'transparencia'));
|
||||
return $view->render($response, 'admin.admin', compact('aviso', 'transparencia', 'months'));
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,12 @@ class Documentos {
|
||||
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.upload'),
|
||||
$post['filename'] . '.pdf'
|
||||
$post['filename']
|
||||
]);
|
||||
if (isset($post['month'])) {
|
||||
$filename .= '_' . implode('_', array_reverse(explode(' ', $post['month'])));
|
||||
}
|
||||
$filename .= '.pdf';
|
||||
$file->moveTo($filename);
|
||||
$status = (file_exists($filename) and filemtime($filename) == time());
|
||||
|
||||
|
Reference in New Issue
Block a user