Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
backend-mcafee
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cristian Mauricio Diaz Canales
backend-mcafee
Commits
9fd5d2e2
Commit
9fd5d2e2
authored
Oct 05, 2020
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mejoras menores
prueba de css
parent
4f6d9ab2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
37 deletions
+36
-37
app/Resources/views/front/campania/prueba.html.twig
app/Resources/views/front/campania/prueba.html.twig
+11
-27
src/WsBundle/Controller/v1/CampaniaApiController.php
src/WsBundle/Controller/v1/CampaniaApiController.php
+25
-10
No files found.
app/Resources/views/front/campania/prueba.html.twig
View file @
9fd5d2e2
...
...
@@ -15,45 +15,29 @@
{%
for
contenido
in
headContent
%}
{%
if
fila
!=
contenido.fila
%}
{%
set
fila
,
filaAux
=
contenido.fila
,
contenido.fila
%}
{%
if
loop.first
%}
<div
class=
"row"
id=
"
{{
contenido.fila
}}
"
>
{%
else
%}
</div><div
class=
"row"
id=
"
{{
contenido.fila
}}
"
>
{%
endif
%}
{{
contenido.contenido
|
raw
}}
{%
else
%}
{{
contenido.contenido
|
raw
}}
{%
endif
%}
{%
endfor
%}
</div>
</div>
<br>
<div
id=
"bodyContainer"
>
{%
set
fila
,
filaAux
=
0
,
0
%}
{%
for
contenido
in
bodyContent
%}
{%
if
fila
!=
contenido.fila
%}
{%
set
fila
,
filaAux
=
contenido.fila
,
contenido.fila
%}
{%
if
loop.first
%}
<div
class=
"row"
id=
"
{{
contenido.fila
}}
"
>
{%
else
%}
</div>
<div
class=
"row"
id=
"
{{
contenido.fila
}}
"
>
{%
endif
%}
{{
contenido.contenido
|
raw
}}
{%
else
%}
{{
contenido.contenido
|
raw
}}
{%
endif
%}
{%
endfor
%}
</div>
</div>
<br>
<div
id=
"footerContainer"
>
{%
set
fila
,
filaAux
=
0
,
0
%}
{%
for
contenido
in
footerContent
%}
{%
if
fila
!=
contenido.fila
%}
{%
set
fila
,
filaAux
=
contenido.fila
,
contenido.fila
%}
{%
if
loop.first
%}
<div
class=
"row"
id=
"
{{
contenido.fila
}}
"
>
{%
else
%}
</div>
<div
class=
"row"
id=
"
{{
contenido.fila
}}
"
>
{%
endif
%}
{{
contenido.contenido
|
raw
}}
{%
else
%}
{{
contenido.contenido
|
raw
}}
{%
endif
%}
{%
endfor
%}
</div>
</div>
</body>
</html>
src/WsBundle/Controller/v1/CampaniaApiController.php
View file @
9fd5d2e2
...
...
@@ -146,7 +146,7 @@ class CampaniaApiController extends ApiController {
$html
=
""
;
$html
=
$this
->
getColumnaByDisposicion
(
$disposicion
,
$columna
);
$html
=
$html
.
'<div id="texto_fil_'
.
$filaId
.
'_con_'
.
$id
.
'" class="'
.
$claseCss
.
'" >'
.
$contenido
.
'</div>'
;
$html
=
$html
.
''
;
$html
=
$html
.
'
</div>
'
;
return
$html
;
}
...
...
@@ -219,7 +219,7 @@ class CampaniaApiController extends ApiController {
$log
->
debug
(
"obteniendo contenido del head para campaña "
.
$szerValidatorCampania
->
getId
());
$indice
=
0
;
$arrayHeadContenido
=
array
();
$fila
=
0
;
$query
=
CampaniaContenidoQuery
::
create
()
->
filterByCcoEliminado
(
CampaniaContenido
::
ELIMINADO_FALSE
)
->
filterByCcoEstado
(
CampaniaContenido
::
ESTADO_ACTIVO
)
...
...
@@ -241,7 +241,12 @@ class CampaniaApiController extends ApiController {
$contenidosHead
=
$query
->
orderByCcoFila
(
'asc'
)
->
orderByCcoColumna
(
'asc'
)
->
find
();
$log
->
debug
(
"generando html relacionado al head de la campaña..."
);
foreach
(
$contenidosHead
as
$contenidoHead
)
:
if
(
$fila
==
0
){
$html
=
'<div class="row" id="'
.
$contenidoHead
->
getCcoFila
()
.
'">'
;
}
else
if
(
$fila
!=
$contenidoHead
->
getCcoFila
()){
$fila
=
$contenidoHead
->
getCcoColumna
();
$html
=
"</div><div class='row' id='"
.
$contenidoHead
->
getCcoFila
()
.
"'>"
;
}
$szerContenidoHead
=
new
szerHeadContenido
();
$szerContenidoHead
->
setId
(
$contenidoHead
->
getCcoId
());
$szerContenidoHead
->
setFila
(
$contenidoHead
->
getCcoFila
());
...
...
@@ -249,7 +254,7 @@ class CampaniaApiController extends ApiController {
$szerContenidoHead
->
setTipo
(
$contenidoHead
->
getCcoTipo
());
$html
=
$this
->
htmlTypeAnalizer
(
$contenidoHead
,
$template
);
$html
=
$
html
.
$
this
->
htmlTypeAnalizer
(
$contenidoHead
,
$template
);
$szerContenidoHead
->
setContenido
(
$html
);
...
...
@@ -266,7 +271,7 @@ class CampaniaApiController extends ApiController {
$log
->
debug
(
"obteniendo contenido del body para campaña "
.
$szerValidatorCampania
->
getId
());
$indice
=
0
;
$arrayBodyContenido
=
array
();
$fila
=
0
;
$query
=
CampaniaContenidoQuery
::
create
()
->
filterByCcoEliminado
(
CampaniaContenido
::
ELIMINADO_FALSE
)
->
filterByCcoEstado
(
CampaniaContenido
::
ESTADO_ACTIVO
)
...
...
@@ -288,7 +293,12 @@ 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
)
:
if
(
$fila
==
0
){
$html
=
'<div class="row" id="'
.
$contenidoBody
->
getCcoFila
()
.
'">'
;
}
else
if
(
$fila
!=
$contenidoBody
->
getCcoFila
()){
$fila
=
$contenidoBody
->
getCcoColumna
();
$html
=
"</div><div class='row' id='"
.
$contenidoBody
->
getCcoFila
()
.
"'>"
;
}
$szerContenidoBody
=
new
szerBodyContenido
();
$szerContenidoBody
->
setId
(
$contenidoBody
->
getCcoId
());
$szerContenidoBody
->
setFila
(
$contenidoBody
->
getCcoFila
());
...
...
@@ -296,7 +306,7 @@ class CampaniaApiController extends ApiController {
$szerContenidoBody
->
setTipo
(
$contenidoBody
->
getCcoTipo
());
$html
=
$this
->
htmlTypeAnalizer
(
$contenidoBody
,
$template
);
$html
=
$
html
.
$
this
->
htmlTypeAnalizer
(
$contenidoBody
,
$template
);
$szerContenidoBody
->
setContenido
(
$html
);
...
...
@@ -314,7 +324,7 @@ class CampaniaApiController extends ApiController {
$log
->
debug
(
"obteniendo contenido del footer para campaña "
.
$szerValidatorCampania
->
getId
());
$indice
=
0
;
$arrayFooterContenido
=
array
();
$fila
=
0
;
$query
=
CampaniaContenidoQuery
::
create
()
->
filterByCcoEliminado
(
CampaniaContenido
::
ELIMINADO_FALSE
)
->
filterByCcoEstado
(
CampaniaContenido
::
ESTADO_ACTIVO
)
...
...
@@ -336,7 +346,12 @@ class CampaniaApiController extends ApiController {
$contenidosFooter
=
$query
->
orderByCcoFila
(
'asc'
)
->
orderByCcoColumna
(
'asc'
)
->
find
();
$log
->
debug
(
"generando html relacionado al footer de la campaña..."
);
foreach
(
$contenidosFooter
as
$contenidoFooter
)
:
if
(
$fila
==
0
){
$html
=
'<div class="row" id="'
.
$contenidoFooter
->
getCcoFila
()
.
'">'
;
}
else
if
(
$fila
!=
$contenidoFooter
->
getCcoFila
()){
$fila
=
$contenidoFooter
->
getCcoColumna
();
$html
=
"</div><div class='row' id='"
.
$contenidoFooter
->
getCcoFila
()
.
"'>"
;
}
$szerContenidoFooter
=
new
szerFooterContenido
();
$szerContenidoFooter
->
setId
(
$contenidoFooter
->
getCcoId
());
$szerContenidoFooter
->
setFila
(
$contenidoFooter
->
getCcoFila
());
...
...
@@ -344,7 +359,7 @@ class CampaniaApiController extends ApiController {
$szerContenidoFooter
->
setTipo
(
$contenidoFooter
->
getCcoTipo
());
$html
=
$this
->
htmlTypeAnalizer
(
$contenidoFooter
,
$template
);
$html
=
$
html
.
$
this
->
htmlTypeAnalizer
(
$contenidoFooter
,
$template
);
$szerContenidoFooter
->
setContenido
(
$html
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment