示例#1
0
 public function imprimir_historial_back($pendientes = true)
 {
     $clase = new Clase($this->clase);
     $numero_dia = date('d', $clase->fecha);
     $titulo = date_i18n('l ', $clase->fecha) . $numero_dia;
     $comprador = get_user_by('id', $this->comprador);
     if (!$comprador) {
         return;
     }
     $userTitle = '<span class="upcoming_reservations_date">' . $titulo . '</span><span class="upcoming_reservations_span upcoming_reservation_address">' . get_the_title($clase->get_ubicacion()) . '</span><span class="upcoming_reservation_separator">/</span><span class="upcoming_reservation_user">' . $comprador->display_name . '</span><span class="upcoming_reservation_separator">/</span><span class="upcoming_reservations_span upcoming_reservation_time">' . date_i18n('g:i A', $clase->fecha) . '</span>';
     if ($pendientes) {
         return print_single_option($this->ID, array('titulo' => $userTitle, 'extra' => editar_opcion(false, false, false, 'eliminar_reserva basic_bookings symbols', '<img src="' . imagenes(false) . '/trash_bookings.png" />', $this->ID) . editar_opcion($this->ID, 'editar_reserva', false, 'basic_bookings symbols', '<img src="' . imagenes(false) . '/editar.png" />'), 'class' => 'bookings_bottom_single'), false);
     } else {
         return print_single_option($this->ID, array('titulo' => $userTitle, 'class' => 'bookings_bottom_single bookings_bottom_single_pastReservations'), false);
     }
 }
示例#2
0
 function panel_reservaciones()
 {
     global $letras;
     $buffer_datos = $letras;
     $buffer_usuarios = $buffer_instructores = $buffer_ubicaciones = array();
     $html = '';
     $reservaciones = get_posts(array('post_type' => 'reserva', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'fields' => 'ids', 'post_status' => 'future'));
     if ($reservaciones) {
         foreach ($reservaciones as $r) {
             /*TENEMOS LA RESERVACION*/
             $reservacion = new Reserva($r);
             /*USUARIO-------------------------------------*/
             $usuario = get_user_by('id', $reservacion->comprador);
             $nombre = $usuario->display_name;
             $inicial = strtolower($nombre[0]);
             if (!isset($buffer_datos[$inicial])) {
                 $buffer_datos[$inicial] = '';
             }
             if (!isset($buffer_usuarios[$reservacion->comprador])) {
                 /*NO REPETIMOS USUARIOS*/
                 $buffer_usuarios[$reservacion->comprador] = true;
                 $buffer_datos[$inicial] .= print_single_option(strtolower($nombre), array('titulo' => $nombre, 'extra' => editar_opcion($reservacion->comprador, 'reservaciones_usuario', false, 'basic_bookings symbols esconder_hijos', '<img src="' . imagenes(false) . '/ojo.png" />'), 'class' => 'bookings_bottom_single filtrado_usuario'), false);
             }
             /*INSTRUCTOR-------------------------------------*/
             $clase = new Clase($reservacion->clase);
             $instructor = new Instructor($clase->instructor);
             $nombre = $instructor->nombre;
             $inicial = strtolower($nombre[0]);
             if (!isset($buffer_datos[$inicial])) {
                 $buffer_datos[$inicial] = '';
             }
             if (!isset($buffer_instructores[$instructor->ID])) {
                 /*NO REPETIMOS INSTRUCTORES*/
                 $buffer_instructores[$instructor->ID] = true;
                 $buffer_datos[$inicial] .= print_single_option(strtolower($nombre), array('titulo' => $nombre, 'extra' => editar_opcion($instructor->ID, 'reservaciones_instructor', false, 'basic_bookings symbols esconder_hijos', '<img src="' . imagenes(false) . '/ojo.png" />'), 'class' => 'bookings_bottom_single filtrado_instructor'), false);
             }
             /*UBICACIONES-------------------------------------*/
             $salon = new Salon($clase->salon);
             $ubicacion = new Ubicacion($salon->ubicacion);
             $nombre = $ubicacion->nombre;
             $inicial = strtolower($nombre[0]);
             if (!isset($buffer_datos[$inicial])) {
                 $buffer_datos[$inicial] = '';
             }
             if (!isset($buffer_ubicaciones[$ubicacion->ID])) {
                 /*NO REPETIMOS UBICACIONES*/
                 $buffer_ubicaciones[$ubicacion->ID] = true;
                 $buffer_datos[$inicial] .= print_single_option(strtolower($nombre), array('titulo' => $nombre, 'extra' => editar_opcion(array($ubicacion->ID, false), 'ver_menu_salon', false, 'basic_bookings symbols esconder_hijos', '<img src="' . imagenes(false) . '/ojo.png" />', false, 'cont_reservacion_ubi'), 'class' => 'bookings_bottom_single filtrado_ubicacion'), false);
             }
         }
         $html .= informacion_letras($buffer_datos);
         $html .= '<script>habilitar_filtros(  );</script>';
     }
     return $html;
 }