| @@ -22,19 +22,9 @@ | ||
| 22 | 22 | */ |
| 23 | 23 | class WPBC_Page_CalendarOverview extends WPBC_Page_Structure { |
| 24 | 24 | |
| 25 | 25 | private $timeline; |
| 26 | - | |
| 27 | - public function __construct() { | |
| 28 | - | |
| 29 | - parent::__construct(); | |
| 30 | 26 | |
| 31 | - // Redefine TAGs Names, becasue 'tab' slug already used in the system for definition of active toolbar. | |
| 32 | - $this->tags['tab'] = 'view_mode'; | |
| 33 | - $this->tags['subtab'] = 'bottom_nav'; | |
| 34 | - } | |
| 35 | - | |
| 36 | - | |
| 37 | 27 | public function in_page() { |
| 38 | 28 | return 'wpbc'; |
| 39 | 29 | } |
| 40 | 30 | |
| @@ -39,26 +29,55 @@ | ||
| 39 | 29 | } |
| 40 | 30 | |
| 41 | 31 | public function tabs() { |
| 42 | 32 | |
| 33 | + $is_full_screen = WPBC_User_Custom_Data_Saver::get_user_data_value( wpbc_get_current_user_id(), 'is_full_screen' ); | |
| 34 | + $is_full_screen = function_exists( 'wpbc_ui__get_full_screen_mode_from_cookie' ) | |
| 35 | + ? wpbc_ui__get_full_screen_mode_from_cookie( $is_full_screen ) | |
| 36 | + : $is_full_screen; | |
| 37 | + $is_full_screen = ( 'On' === $is_full_screen ); | |
| 38 | + | |
| 43 | 39 | $tabs = array(); |
| 44 | 40 | $tabs[ 'vm_calendar' ] = array( |
| 41 | + 'is_show_top_path' => true, // true | false. By default value is: true. | |
| 42 | + 'is_show_top_navigation' => true, // true | false. By default value is: false. | |
| 43 | + 'left_navigation__default_view_mode' => '', // FixIn:11.7.1.1: ( $is_full_screen ) ? 'compact' : 'min', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''. | |
| 44 | + 'page_title' => false, // Header - Title. If false, than hidden. | |
| 45 | + 'page_description' => false, // Header - Title Description. If false, than hidden. | |
| 45 | 46 | 'title' => __('Timeline View','booking') // Title of TAB |
| 46 | 47 | , 'hint' => __('Timeline View', 'booking') // Hint |
| 47 | - , 'page_title' => __('Timeline View', 'booking') // Title of Page | |
| 48 | 48 | , 'link' => '' // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link |
| 49 | 49 | , 'position' => '' // 'left' || 'right' || '' |
| 50 | 50 | , 'css_classes' => '' // CSS class(es) |
| 51 | 51 | , 'icon' => '' // Icon - link to the real PNG img |
| 52 | 52 | , 'font_icon' => 'wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom' // CSS definition of forn Icon // FixIn: 9.5.5.3. |
| 53 | - , 'header_font_icon' => 'wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom' // CSS definition of forn Icon // FixIn: 9.5.5.3. | |
| 54 | - , 'default' => false // Is this tab activated by default or not: true || false. | |
| 53 | + , 'default' => false // Is this tab activated by default or not: true || false. | |
| 55 | 54 | , 'disabled' => false // Is this tab disbaled: true || false. |
| 56 | 55 | , 'hided' => true // Is this tab hided: true || false. |
| 57 | 56 | , 'subtabs' => array() |
| 58 | 57 | |
| 59 | 58 | ); |
| 60 | - | |
| 59 | +// $tabs[ 'add-booking' ] = array( | |
| 60 | +// 'is_show_top_path' => false, // true | false. By default value is: false. | |
| 61 | +// 'left_navigation__default_view_mode' => 'min', // '' | 'min' | 'compact' | 'max' | 'none'. By default value is: ''. | |
| 62 | +// 'page_title' => __( 'Add New Booking', 'booking' ), // Header - Title. If false, than hidden. | |
| 63 | +// 'page_description' => __( 'Manually add new bookings from the Admin Panel.', 'booking' ), // Header - Title Description. If false, than hidden. | |
| 64 | +// 'title' => __( 'Add booking', 'booking' ), // Title of TAB. | |
| 65 | +// 'hint' => __( 'Add booking', 'booking' ), // Hint. | |
| 66 | +// 'position' => '', // Can be: 'left' | 'right' | ''. | |
| 67 | +// 'css_classes' => '', // this is CSS class(es). | |
| 68 | +// 'icon' => '', // Icon - link to the real PNG img. | |
| 69 | +// 'font_icon' => 'wpbc-bi-plus', // CSS definition of forn Icon. | |
| 70 | +// 'default' => false, // Is this tab disbaled: true || false. | |
| 71 | +// 'disabled' => false, // Is this tab disbaled: true || false. | |
| 72 | +// 'hided' => !false, // Is this tab hided: true || false. | |
| 73 | +// 'subtabs' => array() | |
| 74 | +// , 'link' => wpbc_get_new_booking_url__base( ) // Can be skiped, then generated link based on Page and Tab tags. Or can be extenral link | |
| 75 | +// //, 'font_icon_right' => 'wpbc-bi-question-circle' | |
| 76 | +// , 'folder_style' => 'order:101;', | |
| 77 | +// ); | |
| 78 | +// | |
| 79 | + | |
| 61 | 80 | // $subtabs = array(); |
| 62 | 81 | // $tabs[ 'bookings' ][ 'subtabs' ] = $subtabs; |
| 63 | 82 | |
| 64 | 83 | return $tabs; |
| @@ -78,9 +97,8 @@ | ||
| 78 | 97 | ?><span class="wpdevelop"><?php // BS UI CSS Class |
| 79 | 98 | |
| 80 | 99 | wpbc_js_for_bookings_page(); // JavaScript functions |
| 81 | 100 | |
| 82 | - wpbc_welcome_panel(); // Welcome Panel (links) | |
| 83 | 101 | |
| 84 | 102 | make_bk_action( 'wpbc_check_request_param__wh_booking_type' ); // Setting $_REQUEST['wh_booking_type'] - remove empty and duplicates ID of booking resources in this list |
| 85 | 103 | |
| 86 | 104 | make_bk_action( 'check_for_resources_of_notsuperadmin_in_booking_listing' ); // If "Regular User", then filter resources in $_REQUEST['wh_booking_type'] to show only resources of this user |
| @@ -85,14 +103,13 @@ | ||
| 85 | 103 | |
| 86 | 104 | make_bk_action( 'check_for_resources_of_notsuperadmin_in_booking_listing' ); // If "Regular User", then filter resources in $_REQUEST['wh_booking_type'] to show only resources of this user |
| 87 | 105 | |
| 88 | 106 | wpbc_set_request_params_for_timeline(); // Set initial $_REQUEST['view_days_num'] depend from selected booking resources |
| 89 | - | |
| 90 | - // T o o l b a r s ///////////////////////////////////////////////// | |
| 91 | - wpbc_timeline_toolbar(); | |
| 92 | - | |
| 93 | - ?><div class="clear" style="height:25px;"></div><?php | |
| 94 | 107 | |
| 108 | + // T o o l b a r s ///////////////////////////////////////////////// | |
| 109 | + wpbc_ui__timeline__resource_selection(); | |
| 110 | + | |
| 111 | + | |
| 95 | 112 | // Show T i m e L i n e /////////////////////////////////////// |
| 96 | 113 | |
| 97 | 114 | // FixIn: 9.9.0.18. |
| 98 | 115 | $server_zone = date_default_timezone_get(); // If in 'Theme' or 'other plugin' set default timezone other than UTC. Save it. |
| @@ -114,12 +131,18 @@ | ||
| 114 | 131 | @date_default_timezone_set( $server_zone ); |
| 115 | 132 | } |
| 116 | 133 | |
| 117 | 134 | //////////////////////////////////////////////////////////////////// |
| 118 | - | |
| 135 | + | |
| 136 | + wpbc_welcome_panel(); // Welcome Panel (links) | |
| 137 | + | |
| 119 | 138 | wpbc_show_booking_footer(); |
| 120 | 139 | |
| 121 | 140 | ?></span><!-- wpdevelop class --><?php |
| 141 | + | |
| 142 | + if ( class_exists( 'WPBC_Add_Booking_Modal' ) ) { | |
| 143 | + WPBC_Add_Booking_Modal::template_for_modal(); | |
| 144 | + } | |
| 122 | 145 | } |
| 123 | 146 | |
| 124 | 147 | } |
| 125 | 148 | add_action('wpbc_menu_created', array( new WPBC_Page_CalendarOverview() , '__construct') ); // Executed after creation of Menu |