PluginProbe
Booking Calendar / 11.8.4
Booking Calendar v11.8.4
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
← All changes | core/admin/page-timeline.php +54 -30 10.1.311.8.4 View file →
@@ -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(
45 - 'title' => __('Calendar Overview','booking') // Title of TAB
46 - , 'hint' => __('Calendar Overview', 'booking') // Hint
47 - , 'page_title' => __('Calendar Overview', 'booking') // Title of Page
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.
46 + 'title' => __('Timeline View','booking') // Title of TAB
47 + , 'hint' => __('Timeline View', 'booking') // Hint
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 - , 'font_icon' => 'wpbc-bi-calendar2-range' // CSS definition of forn Icon //FixIn: 9.5.5.3
53 - , 'header_font_icon' => 'wpbc-bi-calendar2-range' // CSS definition of forn Icon //FixIn: 9.5.5.3
54 - , 'default' => false // Is this tab activated by default or not: true || false.
52 + , 'font_icon' => 'wpbc_icn_rotate_90 wpbc_icn_align_vertical_bottom' // CSS definition of forn Icon // FixIn: 9.5.5.3.
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;
@@ -66,22 +85,20 @@
66 85
67 86
68 87 public function content() {
69 88
70 - wpbc_check_request_paramters(); //Cleanup REQUEST parameters //FixIn:6.2.1.4
89 + wpbc_check_request_paramters(); //Cleanup REQUEST parameters // FixIn: 6.2.1.4.
71 90
72 91 do_action( 'wpbc_hook_booking_page_header', 'timeline' ); // Define Notices Section and show some static messages, if needed.
73 92
74 93 if ( ! wpbc_is_mu_user_can_be_here( 'activated_user' ) ) return false; // Check if MU user activated, otherwise show Warning message.
75 94
76 - if ( ! wpbc_set_default_resource_to__get() ) return false; // Define default booking resources for $_GET and check if booking resource belong to user.
95 + if ( ! wpbc_set_default_resource_to__get() ) return false; // Define default booking resources for $_ GET and check if booking resource belong to user.
77 96
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 -
84 101
85 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
86 103
87 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
@@ -86,23 +103,23 @@
86 103
87 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
88 105
89 106 wpbc_set_request_params_for_timeline(); // Set initial $_REQUEST['view_days_num'] depend from selected booking resources
90 -
91 - // T o o l b a r s /////////////////////////////////////////////////
92 - wpbc_timeline_toolbar();
93 -
94 - ?><div class="clear" style="height:25px;"></div><?php
95 107
108 + // T o o l b a r s /////////////////////////////////////////////////
109 + wpbc_ui__timeline__resource_selection();
110 +
111 +
96 112 // Show T i m e L i n e ///////////////////////////////////////
97 113
98 - //FixIn: 9.9.0.18
114 + // FixIn: 9.9.0.18.
99 115 $server_zone = date_default_timezone_get(); // If in 'Theme' or 'other plugin' set default timezone other than UTC. Save it.
100 116 if ( 'UTC' !== $server_zone ) { // Needed for WP date functions - set timezone to UTC
117 + // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
101 118 @date_default_timezone_set( 'UTC' );
102 119 }
103 120
104 - //FixIn: 8.6.1.13
121 + // FixIn: 8.6.1.13.
105 122 $this->timeline = new WPBC_TimelineFlex();
106 123
107 124 $this->timeline->admin_init(); // Define all REQUEST parameters and get bookings
108 125
@@ -107,18 +124,25 @@
107 124 $this->timeline->admin_init(); // Define all REQUEST parameters and get bookings
108 125
109 126 $this->timeline->show_timeline();
110 127
111 - //FixIn: 9.9.0.18
128 + // FixIn: 9.9.0.18.
112 129 if ( 'UTC' !== $server_zone ) { // Back to previos state, if it was changed.
130 + // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
113 131 @date_default_timezone_set( $server_zone );
114 132 }
115 133
116 134 ////////////////////////////////////////////////////////////////////
117 -
135 +
136 + wpbc_welcome_panel(); // Welcome Panel (links)
137 +
118 138 wpbc_show_booking_footer();
119 139
120 140 ?></span><!-- wpdevelop class --><?php
141 +
142 + if ( class_exists( 'WPBC_Add_Booking_Modal' ) ) {
143 + WPBC_Add_Booking_Modal::template_for_modal();
144 + }
121 145 }
122 146
123 147 }
124 148 add_action('wpbc_menu_created', array( new WPBC_Page_CalendarOverview() , '__construct') ); // Executed after creation of Menu