Mejoras menores

prueba de css
parent b0dd1e85
......@@ -293,6 +293,7 @@ class CampaniaApiController extends ApiController {
$indice = 0;
$arrayBodyContenido = array();
$fila = 0;
$html = "";
$query = CampaniaContenidoQuery::create()
->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE)
->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO)
......@@ -313,8 +314,24 @@ class CampaniaApiController extends ApiController {
$contenidosBody = $query->orderByCcoFila('asc')->orderByCcoColumna('asc')->find();
$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());
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->setId($contenidoBody->getCcoId());
......@@ -323,12 +340,19 @@ class CampaniaApiController extends ApiController {
$szerContenidoBody->setTipo($contenidoBody->getCcoTipo());
$html = $this->htmlTypeAnalizer($contenidoBody, $template);
$html = $html . "". $this->htmlTypeAnalizer($contenidoBody, $template);
$szerContenidoBody->setContenido($html);
$arrayBodyContenido[$indice] = $szerContenidoBody;
$indice++;
$fila = $contenidoBody->getCcoFila();
end($contenidosBody);
if ($key === key($contenidosBody)){
$html = $html . "</div>";
$log->debug("KEY $key | HTML $html");
}
endforeach;
......@@ -341,6 +365,7 @@ class CampaniaApiController extends ApiController {
$indice = 0;
$arrayFooterContenido = array();
$fila = 0;
$html = "";
$query = CampaniaContenidoQuery::create()
->filterByCcoEliminado(CampaniaContenido::ELIMINADO_FALSE)
->filterByCcoEstado(CampaniaContenido::ESTADO_ACTIVO)
......@@ -363,7 +388,21 @@ class CampaniaApiController extends ApiController {
$log->debug("generando html relacionado al footer de la campaña...");
foreach ($contenidosFooter as $contenidoFooter):
$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->setId($contenidoFooter->getCcoId());
$szerContenidoFooter->setFila($contenidoFooter->getCcoFila());
......@@ -371,12 +410,19 @@ class CampaniaApiController extends ApiController {
$szerContenidoFooter->setTipo($contenidoFooter->getCcoTipo());
$html = $this->htmlTypeAnalizer($contenidoFooter, $template);
$html = $html . "". $this->htmlTypeAnalizer($contenidoFooter, $template);
$szerContenidoFooter->setContenido($html);
$arrayFooterContenido[$indice] = $szerContenidoFooter;
$indice++;
$fila = $contenidoFooter->getCcoFila();
end($contenidosFooter);
if ($key === key($contenidosFooter)){
$html = $html . "</div>";
$log->debug("KEY $key | HTML $html");
}
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