This commit is contained in:
2020-03-02 01:05:39 -03:00
parent 91b996201c
commit d28f0f2f07
42 changed files with 444 additions and 69 deletions

View File

@ -10,7 +10,7 @@ class Home {
public function __invoke(Request $request, Response $response, View $view, Container $container): Response {
$banner = (object) [
'titulo' => "5° NOTARÍA DE SANTIAGO\nPATRICIO RABY BENAVENTE",
'contenido' => "Gertrudis Echenique 30, of. 32, El Golf\n<img style=\"height: 1em\" src=\"" . $container->get('urls.metro.logo') . "\" /> Metro Alcantara"
'contenido' => "Gertrudis Echenique 30, of. 32, El Golf\n<span class=\"icon-metro\"></span> Metro Alcantara"
];
$suplente = (object) [
'horario' => (object) [
@ -25,6 +25,53 @@ class Home {
'nombre' => "MARIA VIRGINIA\nWIELANDT COVARRUBIAS"
]
];
return $view->render($response, 'home', compact('banner', 'suplente'));
$links = (object) [
'documentos' => [
new Documento($container, 'Autorizaciones'),
new Documento($container, 'Declaraciones'),
new Documento($container, 'Certificados'),
new Documento($container, 'Poderes'),
new Documento($container, 'Contratos'),
new Documento($container, 'Otros')
],
'consulta' => [
new Link('Servicios de Impuestos Internos', 'http://www.sii.cl'),
new Link('Registro Civil', 'http://www.registrocivil.cl'),
new Link('Conservador de Bienes Raices', ''),
new Link('Diario Oficial', ''),
new Link('Tesorería General de la República', ''),
new Link('Fojas', '')
]
];
return $view->render($response, 'home', compact('banner', 'suplente', 'links'));
}
}
class Documento {
protected $icono;
protected $texto;
protected $uri;
public function __construct(Container $container, string $nombre) {
$this->icono = implode('/', [$container->get('urls.images'), $nombre . '.png']);
$this->texto = $nombre;
$this->uri = implode('/', [$container->get('urls.base'), 'documentos', strtolower($nombre)]);
}
public function show(): string {
return '<a href="' . $this->uri . '"><img src="' . $this->icono . '" /> ' . $this->texto . '</a>';
}
}
class Link {
protected $uri;
protected $texto;
public function __construct(string $texto, string $uri) {
$this->texto = $texto;
$this->uri = $uri;
}
public function show(): string {
return '<a href="' . $this->uri . '">' . $this->texto . '</a>';
}
}