Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
2018_web_app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
inutralia
2018_web_app
Commits
bd3f650e
Commit
bd3f650e
authored
Dec 07, 2018
by
gema
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.setisl.com/inutraliaapp/2018_web_app
into gemis_dev
parents
0ae75b6e
98f23780
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
24 deletions
+70
-24
index.php
fuel/app/classes/controller/login/index.php
+2
-0
index.php
fuel/app/classes/controller/recetario/index.php
+25
-1
inutraliaWS.php
fuel/app/classes/trait/inutraliaWS.php
+14
-1
constants.php
fuel/app/config/development/constants.php
+4
-3
constants.php
fuel/app/config/production/constants.php
+5
-8
index.twig
fuel/app/views/dashboard/index.twig
+1
-1
filters.twig
fuel/app/views/recetario/filters.twig
+19
-10
No files found.
fuel/app/classes/controller/login/index.php
View file @
bd3f650e
...
...
@@ -67,6 +67,8 @@ class Controller_Login_Index extends Controller
if
(
!
isset
(
$return
[
'status'
])){
\Session
::
set_flash
(
'name'
,
current
(
$return
)
->
name
);
Response
::
redirect
(
'/dashboard'
);
return
null
;
...
...
fuel/app/classes/controller/recetario/index.php
View file @
bd3f650e
...
...
@@ -33,7 +33,7 @@ class Controller_Recetario_Index extends \Controller_App{
parent
::
before
();
}
public
function
action
_index
(){
public
function
get
_index
(){
$view
=
View
::
forge
(
'recetario/index.twig'
);
...
...
@@ -46,9 +46,32 @@ class Controller_Recetario_Index extends \Controller_App{
//Paso de las opciones de menu que deben aparecer seleccionadas
$view
->
option_menu
=
$this
->
_option_menu
;
$view
->
groups_filters
=
$this
->
ws_options_get
();
$view
->
recipes
=
$this
->
ws_recipe_get
();
return
Response
::
forge
(
$view
);
}
public
function
post_index
(){
$view
=
View
::
forge
(
'recetario/index.twig'
);
//Titulo de la vista
$view
->
title
=
"Recetario"
;
//Paso de las migas de pan a la vista
$view
->
bc
=
$this
->
_bc
;
//Paso de las opciones de menu que deben aparecer seleccionadas
$view
->
option_menu
=
$this
->
_option_menu
;
$view
->
groups_filters
=
$this
->
ws_options_get
();
$view
->
recipes
=
$this
->
ws_recipe_get
();
return
Response
::
forge
(
$view
);
}
}
\ No newline at end of file
fuel/app/classes/trait/inutraliaWS.php
View file @
bd3f650e
...
...
@@ -39,7 +39,7 @@ trait Trait_InutraliaWS {
*/
public
function
request_generic
(
$url
,
$method
=
"get"
,
$return_transfer
=
1
,
$extra_options
=
array
(),
$add_params_header
=
array
()){
$constant
=
\Config
::
load
(
'constants'
);
$constant
=
\Config
::
load
(
'constants'
,
'config'
,
true
);
// La url la obtiene de config dependiendo del entorno.
$ch
=
curl_init
(
$constant
[
'domain'
]
.
$url
.
$constant
[
'apikey'
]);
...
...
@@ -125,5 +125,17 @@ trait Trait_InutraliaWS {
}
public
function
ws_options_get
(){
return
json_decode
(
$this
->
request_generic
(
'options'
));
}
public
function
ws_options_post
(){
return
json_decode
(
$this
->
request_generic
(
'options'
));
}
}
\ No newline at end of file
fuel/app/config/development/constants.php
View file @
bd3f650e
...
...
@@ -27,13 +27,13 @@
// Url redirect a DEL SUPER --> "https://delsuper.es/inutralia?ids=";
const
DOMAIN
=
"http://inutralia20back"
;
const
V1
=
'/api/v1/'
;
$domain
=
"http://inutralia20back"
;
$
V1
=
'/api/v1/'
;
// PARAMETERS
return
array
(
'domain'
=>
DOMAIN
.
V1
,
'domain'
=>
$domain
.
$
V1
,
'apikey'
=>
"?api-key=7745289b-f09c-4e0b-89d1-bb59c599c85e"
);
\ No newline at end of file
fuel/app/config/production/constants.php
View file @
bd3f650e
...
...
@@ -26,17 +26,13 @@
// Url redirect a DEL SUPER --> "https://delsuper.es/inutralia?ids=";
const
DOMAIN
=
" http://i20.inutralia.com"
;
const
V1
=
'/api/v1/'
;
const
APIKEY
=
"?api-key=7745289b-f09c-4e0b-89d1-bb59c599c85e"
;
$domain
=
"http://i20.inutralia.com"
;
$V1
=
'/api/v1/'
;
// PARAMETERS
const
USER
=
'user'
;
const
PROFILE
=
'profile'
;
return
array
(
'
user'
=>
DOMAIN
.
V1
.
USER
.
APIKEY
,
'
profile'
=>
DOMAIN
.
V1
.
PROFILE
.
APIKEY
,
'
domain'
=>
$domain
.
$V1
,
'
apikey'
=>
"?api-key=7745289b-f09c-4e0b-89d1-bb59c599c85e"
);
\ No newline at end of file
fuel/app/views/dashboard/index.twig
View file @
bd3f650e
...
...
@@ -64,7 +64,7 @@
</div>
</a>
<div
class=
"logout-home-position mt-logout-home"
>
<h2
class=
"text-welcome-home"
>
Bienvenid@
Gema
</h2>
<h2
class=
"text-welcome-home"
>
Bienvenid@
{{
session_get
(
'name'
)
}}
</h2>
<a
href=
"auth/logout"
class=
"btn btn-custom btn-other"
>
Cerrar Sesión
<i
class=
"fa fa-sign-out"
></i>
</a>
</div>
</div>
...
...
fuel/app/views/recetario/filters.twig
View file @
bd3f650e
...
...
@@ -11,24 +11,33 @@
</div>
<!--contenido desplegable filtros-->
<div
class=
"hidden"
id=
"content-filter-recetario"
>
<div
class=
"row mt20"
>
{%
for
i
in
1.
.
12
%}
<form>
{%
for
group
in
groups_filters
%}
{# ETIQUETA DEL GRUPO #}
<label
style=
"background-color: gainsboro; width: 100%"
>
{{
group.name
}}
</label>
<div
class=
"row mt20"
>
{%
for
option
in
group.options
%}
<div
class=
"col-md-3"
>
<div
class=
"form-group text-center"
>
<label
class=
"switch"
for=
"switch_filter_
{{
i
}}
"
>
<input
type=
"checkbox"
id=
"switch_filter_
{{
i
}}
"
/>
<label
class=
"switch"
for=
"switch_filter_
{{
group.id
~
'_'
~
option.id
}}
"
>
<input
type=
"checkbox"
id=
"switch_filter_
{{
group.id
~
'_'
~
option.id
}}
"
/>
<div
class=
"slider round"
></div>
</label>
<p>
filtro
{{
i
}}
</p>
<p>
{{
option.name
}}
</p>
</div>
</div>
{%
endfor
%}
</div>
<div
class=
"row"
>
<div
class=
"col-md-6 col-md-offset-6"
>
<button
class=
"btn btn-custom btn-other mt20"
>
aplicar
<i
class=
"fa fa-angle-double-right"
></i></button>
</div>
{%
endfor
%}
<div
class=
"row"
>
<div
class=
"col-md-6 col-md-offset-6"
>
<button
class=
"btn btn-custom btn-other mt20"
>
aplicar
<i
class=
"fa fa-angle-double-right"
></i></button>
</div>
</div>
</
div
>
</
form
>
</div>
</div>
...
...
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