<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Luis
 * Date: 16/12/13
 * Time: 20:55
 * To change this template use File | Settings | File Templates.
 */

use Fuel\Core\DB;
use Fuel\Core\Response;
use \Parser\View;
use Auth\Auth;

class Controller_Menussaludables_Menu_Index extends \Controller_App{

    public function action_index($id){

        $view = View::forge('menussaludables/menu/index.twig');

        //Titulo de la vista
        $view->title = "Menús Saludables";

        //Pasar la leyenda para la info funcionamiento de la página
        $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);

        $view->name_menu =$view->items->ds;

	    return Response::forge($view);
    }

}