Commit 78777bbb by David Villalba

Merge branch 'master' into dev_villa

# Conflicts:
#	fuel/app/classes/trait/inutraliaWS.php
parents 39e2ff22 9fc79982
fuel/app/cache/ fuel/app/cache/
.idea/
fuel/app/logs/2018/
fuel/vendor/
...@@ -49,6 +49,7 @@ class Controller_Menussaludables_Lista_Index extends \Controller_App{ ...@@ -49,6 +49,7 @@ class Controller_Menussaludables_Lista_Index extends \Controller_App{
//Pasar la leyenda para la info funcionamiento de la página //Pasar la leyenda para la info funcionamiento de la página
$view->leyenda = "Te proponemos los siguientes menús saludables"; $view->leyenda = "Te proponemos los siguientes menús saludables";
$view->items = $this->ws_get('generic');
return Response::forge($view); return Response::forge($view);
} }
......
...@@ -33,7 +33,8 @@ class Controller_Menussaludables_Menu_Index extends \Controller_App{ ...@@ -33,7 +33,8 @@ class Controller_Menussaludables_Menu_Index extends \Controller_App{
parent::before(); parent::before();
} }
public function action_index(){ public function action_index($id){
$view = View::forge('menussaludables/menu/index.twig'); $view = View::forge('menussaludables/menu/index.twig');
...@@ -49,6 +50,21 @@ class Controller_Menussaludables_Menu_Index extends \Controller_App{ ...@@ -49,6 +50,21 @@ class Controller_Menussaludables_Menu_Index extends \Controller_App{
//Pasar la leyenda para la info funcionamiento de la página //Pasar la leyenda para la info funcionamiento de la página
$view->leyenda = "Disfruta de este menú"; $view->leyenda = "Disfruta de este menú";
$view->items = $this->ws_get("generic/$id");
$view->week_days = array(
'monday' => 'lunes',
'tuesday' => 'martes',
'wednesday' => 'miercoles',
'thursday' => 'jueves',
'friday' => 'viernes',
'saturday' => 'sábado',
'sunday' => 'domingo',
);
$view->auto_filter(false);
Log::error(print_r( $view->items,true));
return Response::forge($view); return Response::forge($view);
} }
......
...@@ -124,28 +124,21 @@ trait Trait_InutraliaWS { ...@@ -124,28 +124,21 @@ trait Trait_InutraliaWS {
public function ws_article_get(){ public function ws_article_get(){
return json_decode($this->request_generic('article')); return $this->ws_get('article');
} }
public function ws_recipe_get($id = null){ public function ws_recipe_get($id = null){
if(!$id){ return $this->ws_get('recipe'.(($id!=null)?"/$id":""));
return json_decode($this->request_generic('recipe'));
}else{
return json_decode($this->request_generic('recipe/'.$id));
}
} }
public function ws_options_get(){ public function ws_options_get(){
return $this->ws_get('options');
return json_decode($this->request_generic('options'));
} }
public function ws_recipes_post($data){ public function ws_recipes_post($data)
{
$data_json = json_encode($data); $data_json = json_encode($data);
$extra_options = array( $extra_options = array(
...@@ -153,15 +146,18 @@ trait Trait_InutraliaWS { ...@@ -153,15 +146,18 @@ trait Trait_InutraliaWS {
); );
return json_decode($this->request_generic('recipes',"post",1,$extra_options,array('Content-Length: ' . strlen($data_json)))); return json_decode($this->request_generic('recipes',"post",1,$extra_options,array('Content-Length: ' . strlen($data_json))));
} }
public function ws_menu_get(){ public function ws_menu_get(){
return json_decode($this->request_generic('menu')); return $this->ws_get('menu');
} }
public function ws_get($url)
{
return json_decode($this->request_generic($url));
}
} }
\ No newline at end of file
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
// Url redirect a DEL SUPER --> "https://delsuper.es/inutralia?ids="; // Url redirect a DEL SUPER --> "https://delsuper.es/inutralia?ids=";
$domain = "http://inutralia20back"; $domain = "http://inutralia/";
$V1 = '/api/v1/'; $V1 = '/api/v1/';
// PARAMETERS // PARAMETERS
......
...@@ -8,7 +8,7 @@ return array( ...@@ -8,7 +8,7 @@ return array(
'connection' => array( 'connection' => array(
'dsn' => 'mysql:host=127.0.0.1;dbname=inutralia_webapp', 'dsn' => 'mysql:host=127.0.0.1;dbname=inutralia_webapp',
'username' => 'root', 'username' => 'root',
'password' => 'socket', 'password' => '123456',
), ),
), ),
); );
...@@ -19,9 +19,9 @@ return array( ...@@ -19,9 +19,9 @@ return array(
'usuarios/active' => 'administracion/usuarios/index/active', 'usuarios/active' => 'administracion/usuarios/index/active',
'usuarios/profile' => 'administracion/usuarios/index/profile', 'usuarios/profile' => 'administracion/usuarios/index/profile',
'grupos' =>'administracion/grupos/index', 'grupos' => 'administracion/grupos/index',
'grupos/update' =>'administracion/grupos/index/update', 'grupos/update' => 'administracion/grupos/index/update',
'grupos/show/:id' =>'administracion/grupos/index/show/$1', 'grupos/show/:id' => 'administracion/grupos/index/show/$1',
/*HOME*/ /*HOME*/
'dashboard' => 'dashboard/index', 'dashboard' => 'dashboard/index',
...@@ -31,27 +31,27 @@ return array( ...@@ -31,27 +31,27 @@ return array(
'perfil/update' => 'perfil/index/update', 'perfil/update' => 'perfil/index/update',
// MENU PERSONALIZADO // MENU PERSONALIZADO
'menupersonalizado' =>'menupersonalizado/index', 'menupersonalizado' => 'menupersonalizado/index',
// MENU SALUDABLES // MENU SALUDABLES
'menussaludables' =>'menussaludables/lista/index', 'menussaludables' => 'menussaludables/lista/index',
'menussaludables-menu' =>'menussaludables/menu/index', 'menussaludables-menu/:id' => 'menussaludables/menu/index/index/$1',
// RECETA // RECETA
'receta-detalle' =>'receta/index', 'receta-detalle' => 'receta/index',
'receta-detalle/update/:id' =>'receta/index/update/$1', 'receta-detalle/update/:id' => 'receta/index/update/$1',
// RECETARIO // RECETARIO
'recetario' =>'recetario/index', 'recetario' => 'recetario/index',
// BOLETIN SALUDABLE // BOLETIN SALUDABLE
'boletin-saludable' =>'boletinsaludable/index', 'boletin-saludable' => 'boletinsaludable/index',
'boletin-saludable/ver' =>'boletinsaludable/index/ver', 'boletin-saludable/ver' => 'boletinsaludable/index/ver',
// ARTICULO // ARTICULO
'articulo-detalle' =>'articulo/index', 'articulo-detalle' => 'articulo/index',
'lista-compra' =>'listacompra/index', 'lista-compra' => 'listacompra/index',
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
</div> </div>
<div class="container mt20" > <div class="container mt20" >
{% for i in 0..5 %} {% for i in items %}
<a href="menussaludables-menu"> <a href={{ "menussaludables-menu/"~ i.id }}>
<div class="row item-list-style"> <div class="row item-list-style">
<div class="col-xs-11"> Menú tipo {{ i }}</div> <div class="col-xs-11"> Menú {{ i.ds }}</div>
<div class="col-xs-1"><i class="fa fa-angle-right"></i></div> <div class="col-xs-1"><i class="fa fa-angle-right"></i></div>
</div> </div>
</a> </a>
......
...@@ -12,7 +12,18 @@ ...@@ -12,7 +12,18 @@
</div> </div>
<div class="content text-center pb40"> <div class="content text-center pb40">
Texto recomendaciones resto del día
<strong>DESAYUNO </strong>
<br>{{ items.recBreakfastBase |raw }}<br>
{{ items.recBreakfastExt |raw}}
<strong>Media Mañana</strong>
<br>{{ items.recMorningBase |raw}}<br>
{{ items.recMorningExt |raw}}
<strong>Merienda </strong>
<br> {{ items.recAfternoonBase |raw}}<br>{{ items.recAfternoonExt |raw}}
<strong>Consejos Generales</strong>
<br>{{ items.recGeneralBase |raw}}
<br>{{ items.recGeneralExt |raw}}
</div> </div>
</div> </div>
......
...@@ -19,22 +19,23 @@ ...@@ -19,22 +19,23 @@
{% for group in groups_filters %} {% for group in groups_filters %}
{# ETIQUETA DEL GRUPO #} {# ETIQUETA DEL GRUPO #}
<label style="background-color: gainsboro; width: 100%"> {{ group.name }} </label> <div class="bg-color-other p10">
<span class="whitecolor"> {{ group.name }} </span>
</div>
<div class="row mt20"> <div class="row mt20">
{% for option in group.options %} {% for option in group.options %}
<div class="col-md-3"> <div class="col-xs-4 col-sm-2">
<div class="form-group text-center"> <div class="form-group text-center">
<label class="switch" for="switch_filter_{{ option.id }}"> <label class="switch-small" for="switch_filter_{{ option.id }}">
<input type="checkbox" <input type="checkbox"
{% if group.id == 1 %} name="flags_or[]" {% else %} name="flags[]"{% endif %} {% if group.id == 1 %} name="flags_or[]" {% else %} name="flags[]"{% endif %}
id="switch_filter_{{ option.id }}" id="switch_filter_{{ option.id }}"
value="{{ option.id }}" value="{{ option.id }}"
{% if option.id in criterio_options %} checked {% endif %} {% if option.id in criterio_options %} checked {% endif %}
/> />
<div class="slider round"></div> <div class="slider slider-small round"></div>
</label> </label>
<p>{{ option.name }}</p> <p class="small-text">{{ option.name }}</p>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
......
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitb8199cd60e690a51db649fb05371acf6::getLoader();
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
return array(
);
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
return array(
'Twig_' => array($vendorDir . '/twig/twig/lib'),
'Monolog' => array($vendorDir . '/monolog/monolog/src'),
'Fuel\\Upload' => array($vendorDir . '/fuelphp/upload/src'),
);
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
return array(
'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
);
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitb8199cd60e690a51db649fb05371acf6
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitb8199cd60e690a51db649fb05371acf6', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitb8199cd60e690a51db649fb05371acf6', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitb8199cd60e690a51db649fb05371acf6::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
return $loader;
}
}
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitb8199cd60e690a51db649fb05371acf6
{
public static $prefixLengthsPsr4 = array (
'P' =>
array (
'Psr\\Log\\' => 8,
),
);
public static $prefixDirsPsr4 = array (
'Psr\\Log\\' =>
array (
0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
),
);
public static $prefixesPsr0 = array (
'T' =>
array (
'Twig_' =>
array (
0 => __DIR__ . '/..' . '/twig/twig/lib',
),
),
'M' =>
array (
'Monolog' =>
array (
0 => __DIR__ . '/..' . '/monolog/monolog/src',
),
),
'F' =>
array (
'Fuel\\Upload' =>
array (
0 => __DIR__ . '/..' . '/fuelphp/upload/src',
),
),
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitb8199cd60e690a51db649fb05371acf6::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb8199cd60e690a51db649fb05371acf6::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInitb8199cd60e690a51db649fb05371acf6::$prefixesPsr0;
}, null, ClassLoader::class);
}
}
[
{
"name": "fuelphp/upload",
"version": "2.0.1",
"version_normalized": "2.0.1.0",
"source": {
"type": "git",
"url": "https://github.com/fuelphp/upload.git",
"reference": "6310108de98ffdbf1083612db5b15411fc140c90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fuelphp/upload/zipball/6310108de98ffdbf1083612db5b15411fc140c90",
"reference": "6310108de98ffdbf1083612db5b15411fc140c90",
"shasum": ""
},
"require": {
"php": ">=5.3"
},
"require-dev": {
"mockery/mockery": "0.7.*"
},
"time": "2013-10-11T21:42:58+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-0": {
"Fuel\\Upload": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "FuelPHP Development Team",
"email": "team@fuelphp.com"
}
],
"description": "Uploaded file processing.",
"homepage": "https://github.com/fuelphp/upload",
"keywords": [
"file uploads",
"upload"
]
},
{
"name": "monolog/monolog",
"version": "1.5.0",
"version_normalized": "1.5.0.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "583618d5cd2115a52101694aca87afb182b3e567"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/583618d5cd2115a52101694aca87afb182b3e567",
"reference": "583618d5cd2115a52101694aca87afb182b3e567",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0"
},
"require-dev": {
"doctrine/couchdb": "dev-master",
"mlehner/gelf-php": "1.0.*",
"raven/raven": "0.3.*"
},
"suggest": {
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-mongo": "Allow sending log messages to a MongoDB server",
"mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server",
"raven/raven": "Allow sending log messages to a Sentry server"
},
"time": "2013-04-23T10:09:48+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Monolog": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be",
"role": "Developer"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "http://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
]
},
{
"name": "psr/log",
"version": "dev-master",
"version_normalized": "9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "c4421fcac1edd5a324fda73e589a5cf96e52ffd0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/c4421fcac1edd5a324fda73e589a5cf96e52ffd0",
"reference": "c4421fcac1edd5a324fda73e589a5cf96e52ffd0",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"time": "2018-11-21T13:42:00+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
]
},
{
"name": "twig/twig",
"version": "v1.14.1",
"version_normalized": "1.14.1.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "8873d7593ad7c120004f177c0fd01459b383c9cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/8873d7593ad7c120004f177c0fd01459b383c9cb",
"reference": "8873d7593ad7c120004f177c0fd01459b383c9cb",
"shasum": ""
},
"require": {
"php": ">=5.2.4"
},
"time": "2013-10-15T19:17:38+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.14-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Twig_": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{
"name": "Armin Ronacher",
"email": "armin.ronacher@active-4.com",
"role": "Project Founder"
}
],
"description": "Twig, the flexible, fast, and secure template language for PHP",
"homepage": "http://twig.sensiolabs.org",
"keywords": [
"templating"
]
}
]
...@@ -181,6 +181,28 @@ input:checked + .slider:before { ...@@ -181,6 +181,28 @@ input:checked + .slider:before {
margin-top:10px; margin-top:10px;
} }
/*switches small para filters recetario*/
.switch-small {
display: inline-block;
height: 20px;
position: relative;
width: 50px;
}
.switch-small input {
display:none;
}
.slider-small:before {
background-color: #fff;
bottom: 3px;
content: "";
height: 16px;
left: 4px;
position: absolute;
transition: .4s;
width: 16px;
}
/*END TOGGLE SWITCHES STYLE /*END TOGGLE SWITCHES STYLE
*/ */
...@@ -418,7 +440,10 @@ a:focus { ...@@ -418,7 +440,10 @@ a:focus {
.pointer:hover{ .pointer:hover{
opacity:0.7; opacity:0.7;
} }
.small-text{
font-size:0.7em;
text-transform: lowercase;
}
/*****************************************************************************/ /*****************************************************************************/
/**********************************CHECKBOX Y RADIOBUTTON CUSTOM*****************/ /**********************************CHECKBOX Y RADIOBUTTON CUSTOM*****************/
/***************************************************************************************/ /***************************************************************************************/
...@@ -700,6 +725,7 @@ a:focus { ...@@ -700,6 +725,7 @@ a:focus {
background-size:cover; background-size:cover;
height:200px; height:200px;
width:100%; width:100%;
background-position:50% 50%;
} }
.text-receta-and-articulo-item-list{ .text-receta-and-articulo-item-list{
......
...@@ -4,11 +4,13 @@ $( document ).ready(function() { ...@@ -4,11 +4,13 @@ $( document ).ready(function() {
$( "#btn-show-filter-recetario" ).click(function() { $( "#btn-show-filter-recetario" ).click(function() {
//cerrar filtros //cerrar filtros
if(show_filter==true){ if(show_filter==true){
$("#content-filter-recetario").addClass("hidden"); $("#content-filter-recetario").fadeOut("slow");
// $("#content-filter-recetario").addClass("hidden");
$("#arrow-filters").css('transform', 'rotate(0deg)'); $("#arrow-filters").css('transform', 'rotate(0deg)');
show_filter=false show_filter=false
// abrir filtros // abrir filtros
}else{ }else{
$("#content-filter-recetario").fadeIn("slow");
$("#content-filter-recetario").removeClass("hidden"); $("#content-filter-recetario").removeClass("hidden");
$("#arrow-filters").css('transform', 'rotate(180deg)'); $("#arrow-filters").css('transform', 'rotate(180deg)');
show_filter=true; show_filter=true;
......
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