Changeset 3462665
- Timestamp:
- 02/16/2026 03:57:16 PM (6 weeks ago)
- Location:
- occupancy-plan/trunk
- Files:
-
- 6 edited
-
admin/class-occupancy-plan-admin.php (modified) (7 diffs)
-
admin/controller/class-occupancy-plan-blocks.php (modified) (2 diffs)
-
admin/partials/occupancy-plan-block.php (modified) (1 diff)
-
admin/partials/occupancy-plan-plan.php (modified) (4 diffs)
-
occupancy-plan.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
occupancy-plan/trunk/admin/class-occupancy-plan-admin.php
r3398617 r3462665 928 928 * 1.4.3 - Add 'checkblockconflict' column 929 929 * 1.4.13 - Add 'priority' column 930 * 1.4.17 - CSV Import of schedules and blocks 930 931 */ 931 932 public function csv_import($planID, $importblocks) … … 947 948 if (isset($planID)) 948 949 { 949 $message = __('Competition', 'occupancy-plan') . ' ' . $this->plans->get_plan($planID)->name. '<br/>';950 $message = __('Competition', 'occupancy-plan') . ': ' . $this->plans->get_plan($planID)->name. '<br/>'; 950 951 } 951 952 else … … 956 957 if (empty($filename) == true) 957 958 { 958 return $message . __('Missing file name', 'occupancy-plan') ;959 return $message . __('Missing file name', 'occupancy-plan') . '<br/>' . __('Import cancelled', 'occupancy-plan'); 959 960 } 960 961 else … … 1107 1108 if (($courtname != "0") && ($courtname != "")) 1108 1109 { 1109 $court = $wpdb->get_row("SELECT * FROM $table_court_name WHERE planid = $planID AND name = $courtname");1110 $court = $wpdb->get_row("SELECT * FROM $table_court_name WHERE planid = $planID AND name = '$courtname'"); 1110 1111 } 1111 1112 … … 1179 1180 } 1180 1181 1182 $preparedblock = $wpdb->get_row("SELECT * FROM $table_prepared_block WHERE planid = $planID AND name = '$csvdata[2]'"); 1183 if (isset($preparedblock)) 1184 { 1185 $message .= __('Row', 'occupancy-plan') . $row . ': ' 1186 . __('Prepared block skipped.', 'occupancy-plan') . '<br/>'; 1187 break; 1188 } 1189 1181 1190 $blockdata = array( 1182 1191 'planid' => $planID, … … 1219 1228 } 1220 1229 1230 $court = $wpdb->get_row("SELECT * FROM $table_court_name WHERE planid = $planID AND name = '$csvdata[2]'"); 1231 if (isset($court)) 1232 { 1233 $message .= __('Row', 'occupancy-plan') . $row . ': ' 1234 . __('Existimg court skipped.', 'occupancy-plan') . '<br/>'; 1235 break; 1236 } 1237 1221 1238 $blockdata = array( 1222 1239 'planid' => $planID, … … 1256 1273 $message .= __('Row', 'occupancy-plan') . $row . ': ' 1257 1274 . __('Time slot contains not enough elements.', 'occupancy-plan') . '<br/>'; 1275 break; 1276 } 1277 1278 $timeslot = $wpdb->get_row("SELECT * FROM $table_time_slot WHERE planid = $planID AND starttime = '$csvdata[1]'"); 1279 if (isset($timeslot)) 1280 { 1281 $message .= __('Row', 'occupancy-plan') . $row . ': ' 1282 . __('Existimg time slot skipped.', 'occupancy-plan') . '<br/>'; 1258 1283 break; 1259 1284 } -
occupancy-plan/trunk/admin/controller/class-occupancy-plan-blocks.php
r3422796 r3462665 24 24 * 1.4.13 - Add column priority 25 25 * 1.4.15 - Change default for prioritry to 9 26 * 1.4.17 - Set court if only one court is available 26 27 */ 27 28 public function new_block($plan) … … 33 34 $block->name = ''; 34 35 $block->description = ''; 35 $block->court = 0;36 $block->court = ($plan->courts > 1)? 0:1; 36 37 $block->childcourt = 1; 37 38 $block->weekday = date("w"); -
occupancy-plan/trunk/admin/partials/occupancy-plan-block.php
r3398617 r3462665 182 182 <div class="op-admin-form-col-8"> 183 183 <?php if (isset($mode)) { ?> 184 <select class="op-admin-input-100 op-courtselect" name="court" width="150" style="width: 150px"> 185 <option value="0" <?php echo ($block->court == 0) ? 'selected' : ''?>><?php echo __('Complete', 'occupancy-plan') ?></option> 186 <?php foreach($courts as $court) { ?> 187 <option value="<?php echo $court->id ?>" <?php echo ($court->id == $block->court) ? 'selected' : ''?>><?php echo $court->name ?></option> 188 <?php } ?> 189 </select> 184 <?php if (count($courts) > 2) { ?> 185 <select class="op-admin-input-100 op-courtselect" name="court" width="150" style="width: 150px"> 186 <option value="0" <?php echo ($block->court == 0) ? 'selected' : ''?>><?php echo __('Complete', 'occupancy-plan') ?></option> 187 <?php foreach($courts as $court) { ?> 188 <option value="<?php echo $court->id ?>" <?php echo ($court->id == $block->court) ? 'selected' : ''?>><?php echo $court->name ?></option> 189 <?php } ?> 190 </select> 191 <?php } else { ?> 192 <input class="op-admin-input-100" type="text" name="court" value="<?php echo esc_attr($this->blocks->get_court_label($plan, $block->court))?>" readonly /> 193 <?php } ?> 190 194 <?php } else { ?> 191 195 <input class="op-admin-input-100" type="text" name="court" value="<?php echo esc_attr($this->blocks->get_court_label($plan, $block->court))?>" readonly /> -
occupancy-plan/trunk/admin/partials/occupancy-plan-plan.php
r3414331 r3462665 77 77 $message = (isset($state["op_msgid"]))? $this->plans->get_message(intval($state["op_msgid"])) : NULL; 78 78 $errormessage = (isset($state["op_msgid"]))? $this->plans->get_error_message(intval($state["op_msgid"])) : NULL; 79 $tab = (isset($state['op_ tabid']))? intval($state['op_tabid']) : 1;79 $tab = (isset($state['op_plan_tabid']))? intval($state['op_plan_tabid']) : 1; 80 80 } 81 81 else … … 83 83 $errormessage = __('Schedule not found!', 'occupancy-plan'); 84 84 $state["op_planid"] = 0; 85 } 86 87 $state["op_tabid"] = 0; 85 $tab = 1; 86 } 87 88 if (isset($_POST['csvimport'])) 89 { 90 $message = $this->csv_import($planID, 1); 91 } 92 93 $state["op_plan_tabid"] = $tab; 88 94 $state["op_msgid"] = 0; 89 95 $lastpage = (isset($state["op_lastpage"]))? $state["op_lastpage"] : 'plan'; … … 107 113 <div id="message" class="updated notice is-dismissible"> 108 114 <p> 109 <?php echo esc_html($message)?>115 <?php echo $message ?> 110 116 </p> 111 117 </div> … … 661 667 </div> 662 668 </div> 669 <div class="op-admin-action-panel-bottom-1"> 670 <div class="op-admin-form-group"> 671 <div class="op-admin-form-col-4"> 672 </div> 673 <div class="op-admin-form-col-8"> 674 <form method="post" enctype="multipart/form-data"> 675 <label for="import_file"><?php echo __('CSV Import', 'occupancy-plan');?></label> 676 <input type="file" accept=".csv" name="import_file" > 677 <?php submit_button(__('CSV Import', 'occupancy-plan'), 'secondary', 'csvimport', false); ?> 678 </form> 679 </div> 680 </div> 681 </div> 663 682 </div> 664 683 <div class="op-provisional-bookings-tab"> -
occupancy-plan/trunk/occupancy-plan.php
r3429196 r3462665 16 16 * Plugin URI: https://www.software-kunze.de/plugins/occupancy-plan/ 17 17 * Description: Management of Occupancy Plans 18 * Version: 1.4.1 618 * Version: 1.4.17 19 19 * Author: Alexander Kunze Software Consulting 20 20 * Author URI: https://www.software-kunze.de … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define('Occupancy_Plan', '1.4.1 6');38 define('Occupancy_Plan', '1.4.17'); 39 39 40 40 /** -
occupancy-plan/trunk/readme.txt
r3429196 r3462665 2 2 Contributors: tharkun69 3 3 Donate link: https://www.software-kunze.de/ 4 Tags: Occupancy Plan, Belegungsplan, Booking, Buchungen, Hallenbelegung , Reservierung4 Tags: Occupancy Plan, Belegungsplan, Booking, Buchungen, Hallenbelegung 5 5 Requires at least: 4.9 6 Tested up to: 6.9 7 Stable tag: 1.4.1 66 Tested up to: 6.9.1 7 Stable tag: 1.4.17 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later … … 52 52 == Changelog == 53 53 54 = 1.4.17 = 55 * Fix: CSV Import of schedules and blocks 56 * Tested with WordPress version 6.9.1 57 54 58 = 1.4.16 = 55 59 * Fix: Display of the correct week when the first week begins in the previous year
Note: See TracChangeset
for help on using the changeset viewer.