respuesta al issue en FrontEnd Legibilidad Portal OpenData

This commit is contained in:
Hacky Purple 2020-04-30 11:58:25 -05:00
parent 3823d3916e
commit 55260e43bc
4 changed files with 346 additions and 5 deletions

View File

@ -0,0 +1,52 @@
#opendata_cabecera{
text-align: center;
}
#datatable_row {
padding: 10px;
}
@media (max-width: 768px) {
#portaldata_categories {
font-size: 13px;
line-height: 1;
}
#contenedor{
padding: 0px;
}
#opendata_table{
padding-top: 50px;
border: none;
}
.table-bordered>tbody>tr>td,{
border: none important;
}
table, thead, tbody, th, td, tr {
display: block;
}
td {
/* Behave like a "row" */
border: none;
position: relative;
padding-left: 50%;
}
td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
}
}
@media (max-width: 480px) {
#drop_aplicacion {
margin-top: 5px;
}
}

2
milfs

@ -1 +1 @@
Subproject commit 307bc9bc88bec68637485ee4343c6383ec5ee625
Subproject commit 9f813436bc3d355007c1cbb28537ac898e3db291

View File

@ -106,7 +106,7 @@ $panel_formularios ="
<div class='dropdown' id='drop_aplicacion'>
<button class='btn btn-warning btn-block dropdown-toggle' type='button' data-toggle='dropdown'>Selecciona una Aplicación
<button class='btn btn-dark btn-block dropdown-toggle' type='button' data-toggle='dropdown'>Selecciona una Aplicación
<span class='caret'></span></button>
<ul class='dropdown-menu'>
<ul class='list-unstyled'>
@ -148,6 +148,7 @@ $acciones=formulario_acciones("$formulario","");
<?php $xajax->printJavascript("milfs/xajax/"); ?>
<link rel="shortcut icon" href="favicon-152.png">
<link rel="apple-touch-icon-precomposed" href="favicon-152.png">
<link rel="stylesheet" href="librerias/css/opendata.css" rel="stylesheet">
<link href="milfs/css/font-awesome/css/font-awesome.css" rel="stylesheet">
<!-- <link rel="stylesheet" href="milfs/css/style.css" media="screen" /> -->
<link href="librerias/bootstrap/css/sticky-footer-navbar.css" rel="stylesheet">
@ -207,18 +208,18 @@ color: black !important;
<!-- Static navbar -->
<div id ='contenedor' style=' ' class="container">
<div class="col-md-12">
<div id='opendata_cabecera' class="col-md-12">
<?php echo "<h1><img class='img img-rounded' src='milfs/images/secure/?file=150/$logo[0]' style='max-height:100px;'> $razon_social[0]<small><br>$slogan[0]</small></h1>"; ?>
</div>
<div class='container-full'>
<div class='col-md-12'>
<div class='col-sm-6'>
<?php
$empresas = drop('empresa','id','razon_social','?proyecto',"",'Selecciona un Proyecto');
echo $empresas
?>
</div>
<div class='col-md-6'>
<div class='col-sm-6'>
<?php echo $panel_formularios ?>
</div>

288
opendata2.php Normal file
View File

@ -0,0 +1,288 @@
<?php
///este archivo debe estar un nivel superior al directorio milfs
session_start();
if(isset($_REQUEST['debug'])) {ini_set('display_errors', 'On');}
//ini_set('display_errors', 'On');
require ('milfs/xajax/xajax.inc.php');
$xajax = new xajax();
require ('milfs/funciones/funciones.php');
//require ('milfs/funciones/experimentales.php');
//require ('milfs/funciones/convert.php');
require ('milfs/funciones/login.php');
require_once ('milfs/includes/markdown.php');
require ("milfs/funciones/conex.php");
$xajax->processRequests();
if($_REQUEST['tipo'] == 'documento') {
if($_REQUEST['id'] !="") {
$linea = consultar_contenido_formulario("$_REQUEST[id]",'','','embebido','','impresion');
$nombre="documento_$_REQUEST[id].odt";
}else {
$linea = landingpage_contenido_identificador("$_REQUEST[identificador]","$id_form","impresion",'paginado');
$nombre="documento_$_REQUEST[identificador].docx";
}
header('Content-Description: File Transfer');
//header('Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document');
header('Content-Type: application/vnd.oasis.opendocument.text');
header("Content-Disposition: attachment;filename=$nombre");
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
echo "<html><body><h2>https://tupale.co</h2> $linea</body></html>";
return;
}elseif($_REQUEST['tipo'] == 'svg') {
if($_REQUEST['id'] !="") {
// $linea = consultar_contenido_formulario("$_REQUEST[id]",'','','simple','','svg');
$creacion = exportar_svg($_REQUEST['id']);
echo $creacion ;
echo"$creacion svg";
return;
}else {
// $linea = landingpage_contenido_identificador("$_REQUEST[identificador]","$id_form","impresion",'paginado');
// $nombre="documento_$_REQUEST[identificador].docx";
}
/*header('Content-type: image/svg+xml');
echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="210mm"
height="297mm"
viewBox="0 0 744.09448819 1052.3622047"
id="svg9084"
version="1.1">
<defs
id="defs9086">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath11049">
</clipPath>
</defs>
<metadata
id="metadata9089">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
';
echo $linea;
echo '</svg>';
//echo $linea;
return;
*/
}else{}
if(isset($_REQUEST['id']) AND $_REQUEST['id'] !="") {$formulario = $_REQUEST['id'];
$id_proyecto = remplacetas('form_id','id',"$formulario",'id_empresa','') ; $id_proyecto = $id_proyecto[0];
}else {$formulario = "";}
if(isset($_REQUEST['campo']) AND $_REQUEST['campo'] !="") {$id_campo = $_REQUEST['campo'];}else {$id_campo = "";}
if(isset($_REQUEST['proyecto']) AND $_REQUEST['proyecto'] !="") {$id_proyecto = $_REQUEST['proyecto'];}else {}
if($id_proyecto =="") {$id_proyecto= "1";}
$listado_formularios = portal_listado_formularios($id_proyecto);
$panel_formularios ="
<div class='panel panel-default'>
<div class='panel panel-heading'>
<h3>Aplicaciones</h3>
</div>
<div class='panel-body'>
<ul class='list-unstyled'>
$listado_formularios
</ul>
</div>
</div>
";
$logo = remplacetas('empresa','id',"$id_proyecto",'imagen','') ;
$direccion = remplacetas('empresa','id',"$id_proyecto",'direccion','') ;
$telefono = remplacetas('empresa','id',"$id_proyecto",'telefono','') ;
$email = remplacetas('empresa','id',"$id_proyecto",'email','') ;
$razon_social = remplacetas('empresa','id',"$id_proyecto",'razon_social','') ;
$slogan = remplacetas('empresa','id',"$id_proyecto",'slogan','') ;
$formulario_publico = remplacetas('form_id','id',"$formulario",'publico',"") ;
$empresa = remplacetas('form_id','id',"$formulario",'id_empresa',"") ;
if($formulario_publico[0] !="1" AND ($id_empresa[0] == $_SESSION['id_empresa']) ) {
$formulario_descripcion="";
$formulario_nombre="";
$acciones="";
}
else {
$formulario_descripcion = remplacetas('form_id','id',"$formulario",'descripcion',"") ;
$formulario_nombre = remplacetas('form_id','id',"$formulario",'nombre',"") ;
$acciones=formulario_acciones("$formulario","");
}
?>
<!DOCTYPE html>
<html lang="en">
<head >
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<?php $xajax->printJavascript("milfs/xajax/"); ?>
<link rel="shortcut icon" href="favicon-152.png">
<link rel="apple-touch-icon-precomposed" href="favicon-152.png">
<link href="milfs/css/font-awesome/css/font-awesome.css" rel="stylesheet">
<!-- <link rel="stylesheet" href="milfs/css/style.css" media="screen" /> -->
<link href="https://getbootstrap.com/examples/sticky-footer-navbar/sticky-footer-navbar.css" rel="stylesheet">
<!-- <script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script> -->
<!-- <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" /> -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css?'.time().'" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous" >
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha256-k2/8zcNbxVIh5mnQ52A0r3a6jAgMGxFJFE2707UxGCk= sha512-ZV9KawG2Legkwp3nAlxLIVFudTauWuBpC10uEafMHYL0Sarrz5A7G79kXh5+5+woxQ5HM559XX2UZjMJ36Wplg==" crossorigin="anonymous">
<!-- <link href="milfs/css/estilos.php" rel="stylesheet"> -->
<script src="milfs/js/jquery.min.js"></script>
<script src="milfs/js/jquery.timelinr-0.9.54.js"></script>
<script src="./librerias/charts/Chart.bundle.js"></script>
<script src="./librerias/charts/utils.js"></script>
<style type="text/css">
/*@font-face {
font-family: Brandon_light;
src: url("milfs/patos/fuentes/Brandon_light.otf") format("opentype");
}*/
body{
font-size: 18px;
color: black;
}
.modal-dialog {
width: 95%;
height: 95%;
padding: 0;
}
.modal-content {
/*height: 100%;*/
border-radius: 0;
}
.container-fluid {
padding: 0px !important;
}
a.pie{
color: white !important;
}
a.menu{
color: white !important;
}
a:active{
color: black !important;
}
</style>
<!-- morris -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
<!-- morris -->
</head>
<body >
<!-- Static navbar -->
<?php
$empresas = drop('empresa','id','razon_social','?proyecto',"",'Selecciona un Proyecto');
$buscador = buscar_datos("*formato*","$formulario","grid","mostrar_contenido_buscador");
?>
<div id ='contenedor' style=' ' class="container">
<div class="col-md-12">
<?php echo $empresas; echo "<h1><img class='img img-rounded' src='milfs/images/secure/?file=150/$logo[0]' style='max-height:100px;'> $razon_social[0]<small><br>$slogan[0]</small></h1>"; ?>
</div>
<div class='row'>
<div class='col-md-2'>
<?php echo $panel_formularios ?>
</div>
<div class='col-md-10'>
<div id='mostrar_contenido' class='container-fluid'>
<?php echo "<h2>$formulario_nombre[0] <small><br>$formulario_descripcion[0]</small></h2> $acciones $buscador
<div id='mostrar_contenido_buscador' class=''>
</div>
";
if($id_campo =="") {
echo portal_listado_campos("$formulario");
}
?>
</div>
</div>
</div>
</div>
<div class="" style="background-color: black; color:white; ">
<!-- <img class='img img-resposive' src="milfs/patos/images/pie.png" style="width:100%" alt=""> -->
</div>
</div>
<!-- Modal -->
<div class='modal fade ' id='muestraInfo' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>
<div class='modal-dialog modal-lg' style=' ' >
<div class='modal-content' style=' '>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<br>
</div>
<div class='modal-body'>
<div id='muestra_form' class="row"></div>
</div>
</div>
</div>
<!--
<div class='pie' style=" position: fixed;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
">
</div> -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<!-- <script src="milfs/js/jquery.min.js"></script> -->
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>
<!-- <script src="milfs/js/bootstrap.min.js"></script> -->
<script src="milfs/js/scripts.js"></script>
</body>
</html>