default.php
5 days ago
default_details.php
5 days ago
default_details_calendar.php
5 days ago
default_details_calendar_modal.php
5 days ago
default_details_contact.php
5 days ago
default_details_employee.php
5 days ago
default_details_notifications.php
5 days ago
default_details_visibility.php
5 days ago
default_fields.php
5 days ago
default_workdays.php
5 days ago
default_workdays_import.php
5 days ago
default_workdays_import_sample.php
5 days ago
default_workdays_import_upload.php
5 days ago
default_workdays_modal.php
5 days ago
index.html
5 days ago
default_details.php
307 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package VikAppointments |
| 4 | * @subpackage core |
| 5 | * @author E4J s.r.l. |
| 6 | * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved. |
| 7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 | * @link https://vikwp.com |
| 9 | */ |
| 10 | |
| 11 | // No direct access |
| 12 | defined('ABSPATH') or die('No script kiddies please!'); |
| 13 | |
| 14 | $employee = $this->employee; |
| 15 | |
| 16 | $vik = VAPApplication::getInstance(); |
| 17 | |
| 18 | /** |
| 19 | * Trigger event to display custom HTML. |
| 20 | * In case it is needed to include any additional fields, |
| 21 | * it is possible to create a plugin and attach it to an event |
| 22 | * called "onDisplayViewEmployeeDetails". |
| 23 | * It is also possible to use "onDisplayViewEmployeeDetailsSidebar" |
| 24 | * to include any additional fieldsets within the right sidebar. |
| 25 | * The event method receives the view instance as argument. |
| 26 | * |
| 27 | * @since 1.7 |
| 28 | */ |
| 29 | $detailsForms = $this->onDisplayView('Details'); |
| 30 | $sidebarForms = $this->onDisplayView('DetailsSidebar'); |
| 31 | |
| 32 | ?> |
| 33 | |
| 34 | <div class="row-fluid"> |
| 35 | |
| 36 | <!-- MAIN --> |
| 37 | |
| 38 | <div class="span7"> |
| 39 | |
| 40 | <!-- EMPLOYEE --> |
| 41 | |
| 42 | <div class="row-fluid"> |
| 43 | <div class="span12"> |
| 44 | <?php |
| 45 | echo $vik->openFieldset(JText::translate('VAPMANAGERESERVATION3')); |
| 46 | echo $this->loadTemplate('details_employee'); |
| 47 | ?> |
| 48 | |
| 49 | <!-- Define role to detect the supported hook --> |
| 50 | <!-- {"rule":"customizer","event":"onDisplayViewEmployee","key":"employee","type":"field"} --> |
| 51 | |
| 52 | <?php |
| 53 | /** |
| 54 | * Look for any additional fields to be pushed within |
| 55 | * the "Employee" fieldset (left-side). |
| 56 | * |
| 57 | * NOTE: retrieved from "onDisplayViewEmployee" hook. |
| 58 | * |
| 59 | * @since 1.7 |
| 60 | */ |
| 61 | if (isset($this->forms['employee'])) |
| 62 | { |
| 63 | echo $this->forms['employee']; |
| 64 | |
| 65 | // unset details form to avoid displaying it twice |
| 66 | unset($this->forms['employee']); |
| 67 | } |
| 68 | |
| 69 | echo $vik->closeFieldset(); |
| 70 | ?> |
| 71 | </div> |
| 72 | </div> |
| 73 | |
| 74 | <!-- Define role to detect the supported hook --> |
| 75 | <!-- {"rule":"customizer","event":"onDisplayViewEmployeeDetails","type":"fieldset"} --> |
| 76 | |
| 77 | <?php |
| 78 | /** |
| 79 | * Iterate remaining forms to be displayed within |
| 80 | * the main panel (below "employee" fieldset). |
| 81 | * |
| 82 | * @since 1.7 |
| 83 | */ |
| 84 | foreach ($detailsForms as $formName => $formHtml) |
| 85 | { |
| 86 | $title = JText::translate($formName); |
| 87 | ?> |
| 88 | <div class="row-fluid"> |
| 89 | <div class="span12"> |
| 90 | <?php |
| 91 | echo $vik->openFieldset($title); |
| 92 | echo $formHtml; |
| 93 | echo $vik->closeFieldset(); |
| 94 | ?> |
| 95 | </div> |
| 96 | </div> |
| 97 | <?php |
| 98 | } |
| 99 | ?> |
| 100 | |
| 101 | <!-- DESCRIPTION --> |
| 102 | |
| 103 | <div class="row-fluid"> |
| 104 | <div class="span12"> |
| 105 | <?php |
| 106 | echo $vik->openFieldset(JText::translate('VAPMANAGEEMPLOYEE11')); |
| 107 | echo $vik->getEditor()->display('note', $employee->note, '100%', 550, 40, 20); |
| 108 | ?> |
| 109 | |
| 110 | <!-- Define role to detect the supported hook --> |
| 111 | <!-- {"rule":"customizer","event":"onDisplayViewEmployee","key":"description","type":"field"} --> |
| 112 | |
| 113 | <?php |
| 114 | /** |
| 115 | * Look for any additional fields to be pushed within |
| 116 | * the "Description" fieldset (left-side). |
| 117 | * |
| 118 | * NOTE: retrieved from "onDisplayViewEmployee" hook. |
| 119 | * |
| 120 | * @since 1.6.6 |
| 121 | */ |
| 122 | if (isset($this->forms['description'])) |
| 123 | { |
| 124 | echo $this->forms['description']; |
| 125 | |
| 126 | // unset details form to avoid displaying it twice |
| 127 | unset($this->forms['description']); |
| 128 | } |
| 129 | |
| 130 | echo $vik->closeFieldset(); |
| 131 | ?> |
| 132 | </div> |
| 133 | </div> |
| 134 | |
| 135 | </div> |
| 136 | |
| 137 | <!-- SIDEBAR --> |
| 138 | |
| 139 | <div class="span5 full-width"> |
| 140 | |
| 141 | <!-- CONTACT --> |
| 142 | |
| 143 | <div class="row-fluid"> |
| 144 | <div class="span12"> |
| 145 | <?php |
| 146 | echo $vik->openFieldset(JText::translate('VAPCONTACT')); |
| 147 | echo $this->loadTemplate('details_contact'); |
| 148 | ?> |
| 149 | |
| 150 | <!-- Define role to detect the supported hook --> |
| 151 | <!-- {"rule":"customizer","event":"onDisplayViewEmployee","key":"contact","type":"field"} --> |
| 152 | |
| 153 | <?php |
| 154 | /** |
| 155 | * Look for any additional fields to be pushed within |
| 156 | * the "Contact" fieldset (sidebar). |
| 157 | * |
| 158 | * NOTE: retrieved from "onDisplayViewEmployee" hook. |
| 159 | * |
| 160 | * @since 1.7 |
| 161 | */ |
| 162 | if (isset($this->forms['contact'])) |
| 163 | { |
| 164 | echo $this->forms['contact']; |
| 165 | |
| 166 | // unset details form to avoid displaying it twice |
| 167 | unset($this->forms['contact']); |
| 168 | } |
| 169 | |
| 170 | echo $vik->closeFieldset(); |
| 171 | ?> |
| 172 | </div> |
| 173 | </div> |
| 174 | |
| 175 | <!-- VISIBILITY --> |
| 176 | |
| 177 | <div class="row-fluid"> |
| 178 | <div class="span12"> |
| 179 | <?php |
| 180 | echo $vik->openFieldset(JText::translate('VAPVISIBILITY')); |
| 181 | echo $this->loadTemplate('details_visibility'); |
| 182 | ?> |
| 183 | |
| 184 | <!-- Define role to detect the supported hook --> |
| 185 | <!-- {"rule":"customizer","event":"onDisplayViewEmployee","key":"visibility","type":"field"} --> |
| 186 | |
| 187 | <?php |
| 188 | /** |
| 189 | * Look for any additional fields to be pushed within |
| 190 | * the "Visibility" fieldset (sidebar). |
| 191 | * |
| 192 | * NOTE: retrieved from "onDisplayViewEmployee" hook. |
| 193 | * |
| 194 | * @since 1.7 |
| 195 | */ |
| 196 | if (isset($this->forms['visibility'])) |
| 197 | { |
| 198 | echo $this->forms['visibility']; |
| 199 | |
| 200 | // unset details form to avoid displaying it twice |
| 201 | unset($this->forms['visibility']); |
| 202 | } |
| 203 | |
| 204 | echo $vik->closeFieldset(); |
| 205 | ?> |
| 206 | </div> |
| 207 | </div> |
| 208 | |
| 209 | <!-- NOTIFICATIONS --> |
| 210 | |
| 211 | <div class="row-fluid"> |
| 212 | <div class="span12"> |
| 213 | <?php |
| 214 | echo $vik->openFieldset(JText::translate('VAPNOTIFICATIONS')); |
| 215 | echo $this->loadTemplate('details_notifications'); |
| 216 | ?> |
| 217 | |
| 218 | <!-- Define role to detect the supported hook --> |
| 219 | <!-- {"rule":"customizer","event":"onDisplayViewEmployee","key":"notifications","type":"field"} --> |
| 220 | |
| 221 | <?php |
| 222 | /** |
| 223 | * Look for any additional fields to be pushed within |
| 224 | * the "Notifications" fieldset (sidebar). |
| 225 | * |
| 226 | * NOTE: retrieved from "onDisplayViewEmployee" hook. |
| 227 | * |
| 228 | * @since 1.7 |
| 229 | */ |
| 230 | if (isset($this->forms['notifications'])) |
| 231 | { |
| 232 | echo $this->forms['notifications']; |
| 233 | |
| 234 | // unset details form to avoid displaying it twice |
| 235 | unset($this->forms['notifications']); |
| 236 | } |
| 237 | |
| 238 | echo $vik->closeFieldset(); |
| 239 | ?> |
| 240 | </div> |
| 241 | </div> |
| 242 | |
| 243 | <!-- CALENDAR --> |
| 244 | |
| 245 | <div class="row-fluid"> |
| 246 | <div class="span12"> |
| 247 | <?php |
| 248 | echo $vik->openFieldset(JText::translate('VAPMENUCALENDAR')); |
| 249 | echo $this->loadTemplate('details_calendar'); |
| 250 | ?> |
| 251 | |
| 252 | <!-- Define role to detect the supported hook --> |
| 253 | <!-- {"rule":"customizer","event":"onDisplayViewEmployee","key":"calendar","type":"field"} --> |
| 254 | |
| 255 | <?php |
| 256 | /** |
| 257 | * Look for any additional fields to be pushed within |
| 258 | * the "Calendar" fieldset (sidebar). |
| 259 | * |
| 260 | * NOTE: retrieved from "onDisplayViewEmployee" hook. |
| 261 | * |
| 262 | * @since 1.7 |
| 263 | */ |
| 264 | if (isset($this->forms['calendar'])) |
| 265 | { |
| 266 | echo $this->forms['calendar']; |
| 267 | |
| 268 | // unset details form to avoid displaying it twice |
| 269 | unset($this->forms['calendar']); |
| 270 | } |
| 271 | |
| 272 | echo $vik->closeFieldset(); |
| 273 | ?> |
| 274 | </div> |
| 275 | </div> |
| 276 | |
| 277 | <!-- Define role to detect the supported hook --> |
| 278 | <!-- {"rule":"customizer","event":"onDisplayViewEmployeeDetailsSidebar","type":"fieldset"} --> |
| 279 | |
| 280 | <?php |
| 281 | /** |
| 282 | * Iterate remaining forms to be displayed within |
| 283 | * the sidebar (below "calendar" fieldset). |
| 284 | * |
| 285 | * @since 1.7 |
| 286 | */ |
| 287 | foreach ($sidebarForms as $formName => $formHtml) |
| 288 | { |
| 289 | $title = JText::translate($formName); |
| 290 | ?> |
| 291 | <div class="row-fluid"> |
| 292 | <div class="span12"> |
| 293 | <?php |
| 294 | echo $vik->openFieldset($title); |
| 295 | echo $formHtml; |
| 296 | echo $vik->closeFieldset(); |
| 297 | ?> |
| 298 | </div> |
| 299 | </div> |
| 300 | <?php |
| 301 | } |
| 302 | ?> |
| 303 | |
| 304 | </div> |
| 305 | |
| 306 | </div> |
| 307 |