Mejoras menores

prueba de css
parent b0dd1e85
...@@ -293,6 +293,7 @@ class CampaniaApiController extends ApiController { ...@@ -293,6 +293,7 @@ class CampaniaApiController extends ApiController {
$indice = 0; $indice = 0;
$arrayBodyContenido = array(); $arrayBodyContenido = array();
$fila = 0; $fila = 0;
$html = "";
$query = CampaniaContenidoQuery::create() $query = CampaniaContenidoQuery::create()
->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE) ->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE)
->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO) ->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO)
...@@ -313,8 +314,24 @@ class CampaniaApiController extends ApiController { ...@@ -313,8 +314,24 @@ class CampaniaApiController extends ApiController {
$contenidosBody = $query->orderByCcoFila('asc')->orderByCcoColumna('asc')->find(); $contenidosBody = $query->orderByCcoFila('asc')->orderByCcoColumna('asc')->find();
$log->debug("generando html relacionado al body de la campaña..."); $log->debug("generando html relacionado al body de la campaña...");
foreach ($contenidosBody as $contenidoBody): foreach ($contenidosBody as $key => $contenidoBody):
$log->debug("id de la fila : " . $contenidoBody->getCcoFila()); $log->debug("id de la fila : " . $contenidoBody->getCcoFila());
reset($contenidosBody);
if ($key === key($contenidosBody)){
$html = $html."<div id ='".$contenidoBody->getCcoFila()."' class='row'>";
$log->debug("KEY $key | HTML $html");
}else if($key != key($contenidosBody) && $fila != $contenidoBody->getCcoFila()){
$html = "";
$html = $html."</div><div id ='".$contenidoBody->getCcoFila()."' class='row'>";
$log->debug("KEY $key | HTML $html");
}else if($key != key($contenidosBody) && $fila == $contenidoBody->getCcoFila()){
$html = "";
$log->debug("KEY $key | HTML $html");
}
$szerContenidoBody = new szerBodyContenido(); $szerContenidoBody = new szerBodyContenido();
$szerContenidoBody->setId($contenidoBody->getCcoId()); $szerContenidoBody->setId($contenidoBody->getCcoId());
...@@ -323,12 +340,19 @@ class CampaniaApiController extends ApiController { ...@@ -323,12 +340,19 @@ class CampaniaApiController extends ApiController {
$szerContenidoBody->setTipo($contenidoBody->getCcoTipo()); $szerContenidoBody->setTipo($contenidoBody->getCcoTipo());
$html = $this->htmlTypeAnalizer($contenidoBody, $template); $html = $html . "". $this->htmlTypeAnalizer($contenidoBody, $template);
$szerContenidoBody->setContenido($html); $szerContenidoBody->setContenido($html);
$arrayBodyContenido[$indice] = $szerContenidoBody; $arrayBodyContenido[$indice] = $szerContenidoBody;
$indice++; $indice++;
$fila = $contenidoBody->getCcoFila();
end($contenidosBody);
if ($key === key($contenidosBody)){
$html = $html . "</div>";
$log->debug("KEY $key | HTML $html");
}
endforeach; endforeach;
...@@ -341,6 +365,7 @@ class CampaniaApiController extends ApiController { ...@@ -341,6 +365,7 @@ class CampaniaApiController extends ApiController {
$indice = 0; $indice = 0;
$arrayFooterContenido = array(); $arrayFooterContenido = array();
$fila = 0; $fila = 0;
$html = "";
$query = CampaniaContenidoQuery::create() $query = CampaniaContenidoQuery::create()
->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE) ->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE)
->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO) ->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO)
...@@ -363,7 +388,21 @@ class CampaniaApiController extends ApiController { ...@@ -363,7 +388,21 @@ class CampaniaApiController extends ApiController {
$log->debug("generando html relacionado al footer de la campaña..."); $log->debug("generando html relacionado al footer de la campaña...");
foreach ($contenidosFooter as $contenidoFooter): foreach ($contenidosFooter as $contenidoFooter):
$log->debug("id de la fila : " . $contenidoFooter->getCcoFila()); $log->debug("id de la fila : " . $contenidoFooter->getCcoFila());
reset($contenidosFooter);
if ($key === key($contenidosFooter)){
$html = $html."<div id ='".$contenidoFooter->getCcoFila()."' class='row'>";
$log->debug("KEY $key | HTML $html");
}else if($key != key($contenidosFooter) && $fila != $contenidoFooter->getCcoFila()){
$html = "";
$html = $html."</div><div id ='".$contenidoFooter->getCcoFila()."' class='row'>";
$log->debug("KEY $key | HTML $html");
}else if($key != key($contenidosFooter) && $fila == $contenidoFooter->getCcoFila()){
$html = "";
$log->debug("KEY $key | HTML $html");
}
$szerContenidoFooter = new szerFooterContenido(); $szerContenidoFooter = new szerFooterContenido();
$szerContenidoFooter->setId($contenidoFooter->getCcoId()); $szerContenidoFooter->setId($contenidoFooter->getCcoId());
$szerContenidoFooter->setFila($contenidoFooter->getCcoFila()); $szerContenidoFooter->setFila($contenidoFooter->getCcoFila());
...@@ -371,12 +410,19 @@ class CampaniaApiController extends ApiController { ...@@ -371,12 +410,19 @@ class CampaniaApiController extends ApiController {
$szerContenidoFooter->setTipo($contenidoFooter->getCcoTipo()); $szerContenidoFooter->setTipo($contenidoFooter->getCcoTipo());
$html = $this->htmlTypeAnalizer($contenidoFooter, $template); $html = $html . "". $this->htmlTypeAnalizer($contenidoFooter, $template);
$szerContenidoFooter->setContenido($html); $szerContenidoFooter->setContenido($html);
$arrayFooterContenido[$indice] = $szerContenidoFooter; $arrayFooterContenido[$indice] = $szerContenidoFooter;
$indice++; $indice++;
$fila = $contenidoFooter->getCcoFila();
end($contenidosFooter);
if ($key === key($contenidosFooter)){
$html = $html . "</div>";
$log->debug("KEY $key | HTML $html");
}
endforeach; endforeach;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment