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
8d794524
Commit
8d794524
authored
Oct 08, 2020
by
Cristian Mauricio Diaz Canales
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mejoras realizadas a url
parent
75f0ccfb
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1310 additions
and
1163 deletions
+1310
-1163
app/Resources/views/backend_content/pages/campanias/nuevaCampania.html.twig
...s/backend_content/pages/campanias/nuevaCampania.html.twig
+1013
-992
app/propel/generated-schemas/conn1_reversed_schema.xml
app/propel/generated-schemas/conn1_reversed_schema.xml
+1
-0
src/AppBundle/Model/Template.php
src/AppBundle/Model/Template.php
+3
-0
src/AppBundle/Model/map/CampaniaTableMap.php
src/AppBundle/Model/map/CampaniaTableMap.php
+1
-0
src/AppBundle/Model/om/BaseCampania.php
src/AppBundle/Model/om/BaseCampania.php
+120
-64
src/AppBundle/Model/om/BaseCampaniaPeer.php
src/AppBundle/Model/om/BaseCampaniaPeer.php
+19
-14
src/AppBundle/Model/om/BaseCampaniaQuery.php
src/AppBundle/Model/om/BaseCampaniaQuery.php
+34
-1
src/AppBundle/Resources/config/conn1_reversed_schema.xml
src/AppBundle/Resources/config/conn1_reversed_schema.xml
+1
-0
src/CampaniaBundle/Controller/CampaniaController.php
src/CampaniaBundle/Controller/CampaniaController.php
+118
-92
No files found.
app/Resources/views/backend_content/pages/campanias/nuevaCampania.html.twig
View file @
8d794524
...
...
@@ -28,9 +28,7 @@
<div
class=
"container"
>
<form
class=
"form"
>
<div
class=
"card-body"
>
<div
class=
"form-group"
>
{%
include
'backend_content/includes/messagesCrearCampania.html.twig'
%}
</div>
<div
class=
"form-group row"
>
<input
id=
"jsonContenido"
type=
"hidden"
value=
"
{{
jsonContenido
}}
"
/>
<div
class=
"col-lg-12"
>
...
...
@@ -83,6 +81,13 @@
<span
class=
"form-text text-muted"
>
Ingrese el código pixel facebook.
</span>
</div>
</div>
<div
class=
"form-group row"
>
<div
class=
"col-lg-12"
>
<label>
Url Campaña:
</label>
<input
id=
"url_campania"
type=
"text"
class=
"form-control"
value=
"
{{
campania.getCamUrlFinalCampania
()
}}
"
placeholder=
""
/>
<span
class=
"form-text text-muted"
>
Url generada para la campaña.
</span>
</div>
</div>
</div>
<!--begin::Card-->
<div
class=
"card card-custom"
>
...
...
@@ -114,8 +119,15 @@
<button type="reset" class="btn btn-danger">Borrar</button>
</div>#}
</div>
<br>
<div
class=
"row"
>
<div
class=
"col-lg-12 col-md-12 col-sm-12 col-xs-12"
>
{%
include
'backend_content/includes/messagesCrearCampania.html.twig'
%}
</div>
</div>
</div>
</form>
</div>
<!--end::Container-->
</div>
...
...
@@ -186,15 +198,15 @@
var
startDate
=
moment
();
var
endDate
=
moment
().
add
(
1
,
'
days
'
);
if
(
$
(
"
#fechaInicioActual
"
).
val
()
==
""
)
{
if
(
$
(
"
#fechaInicioActual
"
).
val
()
==
""
)
{
startDate
=
moment
();
}
else
{
}
else
{
startDate
=
moment
(
$
(
"
#fechaInicioActual
"
).
val
(),
"
YYYY/MM/DD
"
);
}
if
(
$
(
"
#fechaFinActual
"
).
val
()
==
""
)
{
if
(
$
(
"
#fechaFinActual
"
).
val
()
==
""
)
{
endDate
=
moment
().
add
(
1
,
'
days
'
);
}
else
{
}
else
{
endDate
=
moment
(
$
(
"
#fechaFinActual
"
).
val
(),
"
YYYY/MM/DD
"
);
}
...
...
@@ -607,7 +619,7 @@
lastIndex
=
data
.
contenidoId
;
var
valorFila
=
data
.
filaValor
;
json
.
id
=
lastIndex
;
var
actionColumns
=
'
\n\
<a id="edit_
'
+
lastIndex
+
'
" href="" onclick="showModalEditar(event,
'
+
lastIndex
+
'
)" class="navi-link"><span class="btn btn-icon btn-light btn-hover-primary btn-sm"><i class="fa fa-lg fa-edit"></i></span></a>
\n\
var
actionColumns
=
'
\n\
<a id="edit_
'
+
lastIndex
+
'
" href="" onclick="showModalEditar(event,
'
+
lastIndex
+
'
)" class="navi-link"><span class="btn btn-icon btn-light btn-hover-primary btn-sm"><i class="fa fa-lg fa-edit"></i></span></a>
\n\
<a id="delete_
'
+
lastIndex
+
'
" href="" onclick="eliminarContenido(event,
'
+
lastIndex
+
'
)" class="navi-link">
\n\
<span class="btn btn-icon btn-light btn-hover-primary btn-sm">
\n\
<i class="fa fa-lg fa-trash"></i>
\n\
...
...
@@ -666,7 +678,7 @@
var
formData
=
new
FormData
();
var
url
=
"
{{
path
(
'campania_update_contenido'
)
}}
"
;
formData
.
append
(
"
campaniaId
"
,
campaniaId
);
formData
.
append
(
"
contenidoId
"
,
conId
);
formData
.
append
(
"
contenidoId
"
,
conId
);
formData
.
append
(
"
disposicionId
"
,
$
(
"
#generador-contenido-selector-disposicion-entorno-columnasEditar
"
).
val
());
formData
.
append
(
"
seccionId
"
,
$
(
"
#generador-contenido-selector-seccionEditar
"
).
val
());
formData
.
append
(
"
filaId
"
,
$
(
"
#generador-contenido-selector-fila-editar
"
).
val
());
...
...
@@ -706,13 +718,14 @@
}
},
success
:
function
(
data
)
{
console
.
log
(
data
);
$
(
"
#mensaje-exito-crear-campania
"
).
show
();
$
(
"
#mensaje-error-crear-campania
"
).
hide
();
$
(
"
#contenido-mensaje-crear-campania-exito
"
).
html
(
data
.
msg
);
lastIndex
=
data
.
contenidoId
;
var
valorFila
=
data
.
filaValor
;
json
.
id
=
lastIndex
;
var
actionColumns
=
'
\n\
<a id="edit_
'
+
lastIndex
+
'
" href="" onclick="showModalEditar(event,
'
+
lastIndex
+
'
)" class="navi-link"><span class="btn btn-icon btn-light btn-hover-primary btn-sm"><i class="fa fa-lg fa-edit"></i></span></a>
\n\
var
actionColumns
=
'
\n\
<a id="edit_
'
+
lastIndex
+
'
" href="" onclick="showModalEditar(event,
'
+
lastIndex
+
'
)" class="navi-link"><span class="btn btn-icon btn-light btn-hover-primary btn-sm"><i class="fa fa-lg fa-edit"></i></span></a>
\n\
<a id="delete_
'
+
lastIndex
+
'
" href="" onclick="eliminarContenido(event,
'
+
lastIndex
+
'
)" class="navi-link">
\n\
<span class="btn btn-icon btn-light btn-hover-primary btn-sm">
\n\
<i class="fa fa-lg fa-trash"></i>
\n\
...
...
@@ -764,6 +777,9 @@
$
(
"
#btnGuardarGeneracionContenidoEditar
"
).
html
(
"
Guardar
"
);
$
(
"
#btnGuardarGeneracionContenidoEditar
"
).
attr
(
"
disabled
"
,
false
);
},
});
}
...
...
@@ -912,7 +928,7 @@
}
function
deleteFromJson
(
id
)
{
var
jsonContenidoTemp
=
{
'
head
'
:
[],
'
body
'
:
[]
,
'
footer
'
:
[]};
var
jsonContenidoTemp
=
{
'
head
'
:
[],
'
body
'
:
[]
,
'
footer
'
:
[]};
for
(
var
k
=
0
;
k
<
jsonContenidoCampania
[
"
head
"
].
length
;
k
++
)
{
if
(
jsonContenidoCampania
[
"
head
"
][
k
][
"
id
"
]
==
id
)
{
...
...
@@ -998,6 +1014,8 @@
$
(
"
#btnGuardarCampania
"
).
html
(
"
Guardar
"
);
$
(
"
#btnGuardarCampania
"
).
attr
(
"
disabled
"
,
false
);
$
(
"
#btnCancelarCampania
"
).
show
();
//URL campania
$
(
"
#urlCampania
"
).
val
(
data
.
urlCampania
);
}
});
}
...
...
@@ -1111,6 +1129,8 @@
});
/**
* CARGA DEL DOCUMENTO
*
...
...
@@ -1119,6 +1139,7 @@
jQuery
(
document
).
ready
(
function
()
{
calendariosContainer
.
init
();
generateTable
();
});
...
...
app/propel/generated-schemas/conn1_reversed_schema.xml
View file @
8d794524
...
...
@@ -53,6 +53,7 @@
<column
name=
"ope_id"
phpName=
"OpeId"
type=
"INTEGER"
required=
"false"
/>
<column
name=
"ser_id"
phpName=
"SerId"
type=
"INTEGER"
required=
"false"
/>
<column
name=
"tem_id"
phpName=
"TemId"
type=
"INTEGER"
required=
"false"
/>
<column
name=
"cam_unique_key"
phpName=
"CamUniqueKey"
type=
"LONGVARCHAR"
required=
"false"
/>
<column
name=
"cam_nombre"
phpName=
"CamNombre"
type=
"VARCHAR"
size=
"1000"
required=
"false"
/>
<column
name=
"cam_titulo_lp"
phpName=
"CamTituloLp"
type=
"VARCHAR"
size=
"1000"
required=
"false"
/>
<column
name=
"cam_adwords"
phpName=
"CamAdwords"
type=
"VARCHAR"
size=
"1000"
required=
"false"
/>
...
...
src/AppBundle/Model/Template.php
View file @
8d794524
...
...
@@ -13,4 +13,7 @@ class Template extends BaseTemplate
/*Eliminado*/
const
ELIMINADO_TRUE
=
1
;
const
ELIMINADO_FALSE
=
0
;
const
TEMPLATE_1
=
1
;
const
TEMPLATE_2
=
2
;
}
src/AppBundle/Model/map/CampaniaTableMap.php
View file @
8d794524
...
...
@@ -46,6 +46,7 @@ class CampaniaTableMap extends TableMap
$this
->
addColumn
(
'ope_id'
,
'OpeId'
,
'INTEGER'
,
false
,
null
,
null
);
$this
->
addColumn
(
'ser_id'
,
'SerId'
,
'INTEGER'
,
false
,
null
,
null
);
$this
->
addForeignKey
(
'tem_id'
,
'TemId'
,
'INTEGER'
,
'template'
,
'tem_id'
,
false
,
null
,
null
);
$this
->
addColumn
(
'cam_unique_key'
,
'CamUniqueKey'
,
'LONGVARCHAR'
,
false
,
null
,
null
);
$this
->
addColumn
(
'cam_nombre'
,
'CamNombre'
,
'VARCHAR'
,
false
,
1000
,
null
);
$this
->
addColumn
(
'cam_titulo_lp'
,
'CamTituloLp'
,
'VARCHAR'
,
false
,
1000
,
null
);
$this
->
addColumn
(
'cam_adwords'
,
'CamAdwords'
,
'VARCHAR'
,
false
,
1000
,
null
);
...
...
src/AppBundle/Model/om/BaseCampania.php
View file @
8d794524
This diff is collapsed.
Click to expand it.
src/AppBundle/Model/om/BaseCampaniaPeer.php
View file @
8d794524
This diff is collapsed.
Click to expand it.
src/AppBundle/Model/om/BaseCampaniaQuery.php
View file @
8d794524
...
...
@@ -24,6 +24,7 @@ use AppBundle\Model\Template;
* @method CampaniaQuery orderByOpeId($order = Criteria::ASC) Order by the ope_id column
* @method CampaniaQuery orderBySerId($order = Criteria::ASC) Order by the ser_id column
* @method CampaniaQuery orderByTemId($order = Criteria::ASC) Order by the tem_id column
* @method CampaniaQuery orderByCamUniqueKey($order = Criteria::ASC) Order by the cam_unique_key column
* @method CampaniaQuery orderByCamNombre($order = Criteria::ASC) Order by the cam_nombre column
* @method CampaniaQuery orderByCamTituloLp($order = Criteria::ASC) Order by the cam_titulo_lp column
* @method CampaniaQuery orderByCamAdwords($order = Criteria::ASC) Order by the cam_adwords column
...
...
@@ -42,6 +43,7 @@ use AppBundle\Model\Template;
* @method CampaniaQuery groupByOpeId() Group by the ope_id column
* @method CampaniaQuery groupBySerId() Group by the ser_id column
* @method CampaniaQuery groupByTemId() Group by the tem_id column
* @method CampaniaQuery groupByCamUniqueKey() Group by the cam_unique_key column
* @method CampaniaQuery groupByCamNombre() Group by the cam_nombre column
* @method CampaniaQuery groupByCamTituloLp() Group by the cam_titulo_lp column
* @method CampaniaQuery groupByCamAdwords() Group by the cam_adwords column
...
...
@@ -78,6 +80,7 @@ use AppBundle\Model\Template;
* @method Campania findOneByOpeId(int $ope_id) Return the first Campania filtered by the ope_id column
* @method Campania findOneBySerId(int $ser_id) Return the first Campania filtered by the ser_id column
* @method Campania findOneByTemId(int $tem_id) Return the first Campania filtered by the tem_id column
* @method Campania findOneByCamUniqueKey(string $cam_unique_key) Return the first Campania filtered by the cam_unique_key column
* @method Campania findOneByCamNombre(string $cam_nombre) Return the first Campania filtered by the cam_nombre column
* @method Campania findOneByCamTituloLp(string $cam_titulo_lp) Return the first Campania filtered by the cam_titulo_lp column
* @method Campania findOneByCamAdwords(string $cam_adwords) Return the first Campania filtered by the cam_adwords column
...
...
@@ -96,6 +99,7 @@ use AppBundle\Model\Template;
* @method array findByOpeId(int $ope_id) Return Campania objects filtered by the ope_id column
* @method array findBySerId(int $ser_id) Return Campania objects filtered by the ser_id column
* @method array findByTemId(int $tem_id) Return Campania objects filtered by the tem_id column
* @method array findByCamUniqueKey(string $cam_unique_key) Return Campania objects filtered by the cam_unique_key column
* @method array findByCamNombre(string $cam_nombre) Return Campania objects filtered by the cam_nombre column
* @method array findByCamTituloLp(string $cam_titulo_lp) Return Campania objects filtered by the cam_titulo_lp column
* @method array findByCamAdwords(string $cam_adwords) Return Campania objects filtered by the cam_adwords column
...
...
@@ -214,7 +218,7 @@ abstract class BaseCampaniaQuery extends ModelCriteria
*/
protected
function
findPkSimple
(
$key
,
$con
)
{
$sql
=
'SELECT `cam_id`, `ope_id`, `ser_id`, `tem_id`, `cam_nombre`, `cam_titulo_lp`, `cam_adwords`, `cam_pixel_facebook`, `cam_url_final_campania`, `cam_tipo`, `cam_estado`, `cam_eliminado`, `cam_fecha_inicio`, `cam_fecha_fin`, `cam_json_estructura`, `created_at`, `updated_at` FROM `campania` WHERE `cam_id` = :p0'
;
$sql
=
'SELECT `cam_id`, `ope_id`, `ser_id`, `tem_id`, `cam_
unique_key`, `cam_
nombre`, `cam_titulo_lp`, `cam_adwords`, `cam_pixel_facebook`, `cam_url_final_campania`, `cam_tipo`, `cam_estado`, `cam_eliminado`, `cam_fecha_inicio`, `cam_fecha_fin`, `cam_json_estructura`, `created_at`, `updated_at` FROM `campania` WHERE `cam_id` = :p0'
;
try
{
$stmt
=
$con
->
prepare
(
$sql
);
$stmt
->
bindValue
(
':p0'
,
$key
,
PDO
::
PARAM_INT
);
...
...
@@ -473,6 +477,35 @@ abstract class BaseCampaniaQuery extends ModelCriteria
return
$this
->
addUsingAlias
(
CampaniaPeer
::
TEM_ID
,
$temId
,
$comparison
);
}
/**
* Filter the query on the cam_unique_key column
*
* Example usage:
* <code>
* $query->filterByCamUniqueKey('fooValue'); // WHERE cam_unique_key = 'fooValue'
* $query->filterByCamUniqueKey('%fooValue%'); // WHERE cam_unique_key LIKE '%fooValue%'
* </code>
*
* @param string $camUniqueKey The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CampaniaQuery The current query, for fluid interface
*/
public
function
filterByCamUniqueKey
(
$camUniqueKey
=
null
,
$comparison
=
null
)
{
if
(
null
===
$comparison
)
{
if
(
is_array
(
$camUniqueKey
))
{
$comparison
=
Criteria
::
IN
;
}
elseif
(
preg_match
(
'/[\%\*]/'
,
$camUniqueKey
))
{
$camUniqueKey
=
str_replace
(
'*'
,
'%'
,
$camUniqueKey
);
$comparison
=
Criteria
::
LIKE
;
}
}
return
$this
->
addUsingAlias
(
CampaniaPeer
::
CAM_UNIQUE_KEY
,
$camUniqueKey
,
$comparison
);
}
/**
* Filter the query on the cam_nombre column
*
...
...
src/AppBundle/Resources/config/conn1_reversed_schema.xml
View file @
8d794524
...
...
@@ -51,6 +51,7 @@
<column
name=
"ope_id"
phpName=
"OpeId"
type=
"INTEGER"
required=
"false"
/>
<column
name=
"ser_id"
phpName=
"SerId"
type=
"INTEGER"
required=
"false"
/>
<column
name=
"tem_id"
phpName=
"TemId"
type=
"INTEGER"
required=
"false"
/>
<column
name=
"cam_unique_key"
phpName=
"CamUniqueKey"
type=
"LONGVARCHAR"
required=
"false"
/>
<column
name=
"cam_nombre"
phpName=
"CamNombre"
type=
"VARCHAR"
size=
"1000"
required=
"false"
/>
<column
name=
"cam_titulo_lp"
phpName=
"CamTituloLp"
type=
"VARCHAR"
size=
"1000"
required=
"false"
/>
<column
name=
"cam_adwords"
phpName=
"CamAdwords"
type=
"VARCHAR"
size=
"1000"
required=
"false"
/>
...
...
src/CampaniaBundle/Controller/CampaniaController.php
View file @
8d794524
This diff is collapsed.
Click to expand it.
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