| 1 |
<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly |
| 2 |
$shortcode = 'shiftcontroller4'; |
| 3 |
?> |
| 4 |
<p> |
| 5 |
With the following shoftcode you can insert your <strong class="hc-bold">Everyone's Schedule</strong> view into a post or a page. |
| 6 |
</p> |
| 7 |
|
| 8 |
<p> |
| 9 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block"> |
| 10 |
[<?php echo $shortcode; ?>] |
| 11 |
</code> |
| 12 |
</p> |
| 13 |
|
| 14 |
<p> |
| 15 |
By default, this view will display the current week shifts calendar for everyone. |
| 16 |
If you need, you can adjust it by supplying additional parameters to control the display: |
| 17 |
</p> |
| 18 |
|
| 19 |
<div class="hc-mb3"> |
| 20 |
<div class="hc-bold"> |
| 21 |
route |
| 22 |
</div> |
| 23 |
|
| 24 |
<div class="hc-ml3"> |
| 25 |
<ul> |
| 26 |
<li class="hc-italic"> |
| 27 |
schedule (default) |
| 28 |
</li> |
| 29 |
<li> |
| 30 |
Displays everyone's schedule. |
| 31 |
</li> |
| 32 |
</ul> |
| 33 |
|
| 34 |
<ul> |
| 35 |
<li class="hc-italic"> |
| 36 |
myschedule |
| 37 |
</li> |
| 38 |
<li> |
| 39 |
Displays the schedule of the employee which is linked to the current user if any. |
| 40 |
</li> |
| 41 |
</ul> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
|
| 45 |
<div class="hc-mb3"> |
| 46 |
<div class="hc-bold"> |
| 47 |
type |
| 48 |
</div> |
| 49 |
|
| 50 |
<div class="hc-ml3"> |
| 51 |
<ul class="hc-italic"> |
| 52 |
<li> |
| 53 |
week (default) |
| 54 |
</li> |
| 55 |
<li> |
| 56 |
month |
| 57 |
</li> |
| 58 |
<li> |
| 59 |
list |
| 60 |
</li> |
| 61 |
<li> |
| 62 |
report |
| 63 |
</li> |
| 64 |
</ul> |
| 65 |
</div> |
| 66 |
</div> |
| 67 |
|
| 68 |
<div class="hc-mb3"> |
| 69 |
<div class="hc-bold"> |
| 70 |
groupby |
| 71 |
</div> |
| 72 |
|
| 73 |
<div class="hc-ml3"> |
| 74 |
<ul class="hc-italic"> |
| 75 |
<li> |
| 76 |
none (default) |
| 77 |
</li> |
| 78 |
<li> |
| 79 |
employee |
| 80 |
</li> |
| 81 |
<li> |
| 82 |
calendar |
| 83 |
</li> |
| 84 |
</ul> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
|
| 88 |
<div class="hc-mb3"> |
| 89 |
<div class="hc-bold"> |
| 90 |
start |
| 91 |
</div> |
| 92 |
|
| 93 |
<div class="hc-ml3"> |
| 94 |
The start date, <em class="hc-italic">yyyymmdd</em>, for example <em class="hc-italic">20180901</em>. If not supplied, it will start from the current date. |
| 95 |
</div> |
| 96 |
</div> |
| 97 |
|
| 98 |
<div class="hc-mb3"> |
| 99 |
<div class="hc-bold"> |
| 100 |
end |
| 101 |
</div> |
| 102 |
|
| 103 |
<div class="hc-ml3"> |
| 104 |
The end date, <em class="hc-italic">yyyymmdd</em>, for example <em class="hc-italic">20180901</em>. |
| 105 |
You can also supply the range with the plus sign, for example <em class="hc-italic">+3 days</em>. |
| 106 |
Applicable when <strong>type</strong> is <em>list</em> or <em>report</em>. |
| 107 |
</div> |
| 108 |
</div> |
| 109 |
|
| 110 |
<div class="hc-mb3"> |
| 111 |
<div class="hc-bold"> |
| 112 |
time |
| 113 |
</div> |
| 114 |
|
| 115 |
<div class="hc-italic"> |
| 116 |
From version 4.7.5 |
| 117 |
</div> |
| 118 |
|
| 119 |
<div class="hc-ml3"> |
| 120 |
Exact time, <em class="hc-italic">yyyymmddhhmm</em>, for example <em class="hc-italic">202005281430</em>. Also <em class="hc-italic">now</em> can be used to get the current date and time. |
| 121 |
</div> |
| 122 |
</div> |
| 123 |
|
| 124 |
<div class="hc-mb3"> |
| 125 |
<div class="hc-bold"> |
| 126 |
calendar |
| 127 |
</div> |
| 128 |
|
| 129 |
<div class="hc-ml3"> |
| 130 |
Calendar id, for example <em class="hc-italic">123</em>. You can find out the id of a calendar in <em class="hc-italic">Administration > Calendars</em>. If not supplied, it will display shifts of all calendars. |
| 131 |
You can also supply several ids separated by comma. |
| 132 |
</div> |
| 133 |
|
| 134 |
<div class="hc-ml3 hc-mt1"> |
| 135 |
Not applicable when <span class="hc-italic">route="myschedule"</span>. |
| 136 |
</div> |
| 137 |
</div> |
| 138 |
|
| 139 |
<div class="hc-mb3"> |
| 140 |
<div class="hc-bold"> |
| 141 |
employee |
| 142 |
</div> |
| 143 |
|
| 144 |
<div class="hc-ml3"> |
| 145 |
Employee id, for example <em class="hc-italic">321</em>. You can find out the id of an employee in <em class="hc-italic">Administration > Employees</em>. If not supplied, it will display shifts of all employees. |
| 146 |
You can also supply several ids separated by comma. |
| 147 |
</div> |
| 148 |
|
| 149 |
<div class="hc-ml3 hc-mt1"> |
| 150 |
Not applicable when <span class="hc-italic">route="myschedule"</span>. |
| 151 |
</div> |
| 152 |
</div> |
| 153 |
|
| 154 |
<div class="hc-mb3"> |
| 155 |
<div class="hc-bold"> |
| 156 |
hideui |
| 157 |
</div> |
| 158 |
|
| 159 |
<div class="hc-ml3"> |
| 160 |
Optionally you can hide certain user interface elements on the front end page. Separate several options by comma. Possible options include: |
| 161 |
|
| 162 |
<ul class="hc-italic"> |
| 163 |
<li> |
| 164 |
type |
| 165 |
</li> |
| 166 |
<li> |
| 167 |
type-month |
| 168 |
</li> |
| 169 |
<li> |
| 170 |
type-week |
| 171 |
</li> |
| 172 |
<li> |
| 173 |
type-day |
| 174 |
</li> |
| 175 |
<li> |
| 176 |
type-list |
| 177 |
</li> |
| 178 |
<li> |
| 179 |
type-report |
| 180 |
</li> |
| 181 |
<li> |
| 182 |
groupby |
| 183 |
</li> |
| 184 |
<li> |
| 185 |
print |
| 186 |
</li> |
| 187 |
<li> |
| 188 |
download |
| 189 |
</li> |
| 190 |
<li> |
| 191 |
filter-calendar |
| 192 |
</li> |
| 193 |
<li> |
| 194 |
filter-employee |
| 195 |
</li> |
| 196 |
<li> |
| 197 |
shiftdetails |
| 198 |
</li> |
| 199 |
</ul> |
| 200 |
</div> |
| 201 |
|
| 202 |
<div class="hc-ml3 hc-mt1"> |
| 203 |
Not applicable when <span class="hc-italic">route="myschedule"</span>. |
| 204 |
</div> |
| 205 |
</div> |
| 206 |
|
| 207 |
<?php if( class_exists('SH4_Pickup_Boot') ) : ?> |
| 208 |
<div class="hc-mb3"> |
| 209 |
<div class="hc-bold"> |
| 210 |
pickup |
| 211 |
</div> |
| 212 |
|
| 213 |
<div class="hc-ml3"> |
| 214 |
<ul> |
| 215 |
<li class="hc-italic"> |
| 216 |
1 |
| 217 |
</li> |
| 218 |
<li> |
| 219 |
Display shifts with pickup request. |
| 220 |
</li> |
| 221 |
</ul> |
| 222 |
|
| 223 |
<ul> |
| 224 |
<li class="hc-italic"> |
| 225 |
-1 |
| 226 |
</li> |
| 227 |
<li> |
| 228 |
Display shifts with no pickup request. |
| 229 |
</li> |
| 230 |
</ul> |
| 231 |
|
| 232 |
<ul> |
| 233 |
<li class="hc-italic"> |
| 234 |
0 (default) |
| 235 |
</li> |
| 236 |
<li> |
| 237 |
Display all shifts. |
| 238 |
</li> |
| 239 |
</ul> |
| 240 |
</div> |
| 241 |
</div> |
| 242 |
<?php endif; ?> |
| 243 |
|
| 244 |
<div class="hc-mb3"> |
| 245 |
<div class="hc-bold"> |
| 246 |
conflict |
| 247 |
</div> |
| 248 |
|
| 249 |
<div class="hc-italic"> |
| 250 |
From version 4.9.17 |
| 251 |
</div> |
| 252 |
|
| 253 |
<div class="hc-ml3"> |
| 254 |
<ul> |
| 255 |
<li class="hc-italic">1</li> |
| 256 |
<li> |
| 257 |
Display shifts with conflicts. |
| 258 |
</li> |
| 259 |
</ul> |
| 260 |
|
| 261 |
<ul> |
| 262 |
<li class="hc-italic">-1</li> |
| 263 |
<li> |
| 264 |
Display shifts with no conflicts. |
| 265 |
</li> |
| 266 |
</ul> |
| 267 |
|
| 268 |
<ul> |
| 269 |
<li class="hc-italic">0 (default)</li> |
| 270 |
<li> |
| 271 |
Display all shifts. |
| 272 |
</li> |
| 273 |
</ul> |
| 274 |
</div> |
| 275 |
</div> |
| 276 |
|
| 277 |
<p> |
| 278 |
<h3>Examples</h3> |
| 279 |
</p> |
| 280 |
|
| 281 |
<p> |
| 282 |
Month calendar for September for calendar #12: |
| 283 |
</p> |
| 284 |
|
| 285 |
<p> |
| 286 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon"> |
| 287 |
[<?php echo $shortcode; ?> start="20180901" type="month" calendar="12"] |
| 288 |
</code> |
| 289 |
</p> |
| 290 |
|
| 291 |
<p> |
| 292 |
Week calendar for the current week: |
| 293 |
</p> |
| 294 |
|
| 295 |
<p> |
| 296 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon"> |
| 297 |
[<?php echo $shortcode; ?> type="week"] |
| 298 |
</code> |
| 299 |
</p> |
| 300 |
|
| 301 |
<p> |
| 302 |
List shifts in the next 3 days: |
| 303 |
</p> |
| 304 |
|
| 305 |
<p> |
| 306 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon"> |
| 307 |
[<?php echo $shortcode; ?> type="list" end="+3 days"] |
| 308 |
</code> |
| 309 |
</p> |
| 310 |
|
| 311 |
<p> |
| 312 |
Do not show the calendar filter and the download button: |
| 313 |
</p> |
| 314 |
|
| 315 |
<p> |
| 316 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon"> |
| 317 |
[<?php echo $shortcode; ?> hideui="filter-calendar,download"] |
| 318 |
</code> |
| 319 |
</p> |
| 320 |
|
| 321 |
<p> |
| 322 |
Show the current user schedule. |
| 323 |
</p> |
| 324 |
|
| 325 |
<p> |
| 326 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon"> |
| 327 |
[<?php echo $shortcode; ?> route="myschedule"] |
| 328 |
</code> |
| 329 |
</p> |
| 330 |
|
| 331 |
<p> |
| 332 |
Display shifts at the current moment. |
| 333 |
</p> |
| 334 |
|
| 335 |
<p> |
| 336 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon"> |
| 337 |
[<?php echo $shortcode; ?> type="list" time="now"] |
| 338 |
</code> |
| 339 |
</p> |
| 340 |
|
| 341 |
<?php if( class_exists('SH4_Pickup_Boot') ) : ?> |
| 342 |
<p> |
| 343 |
Display shifts with pickup request. |
| 344 |
</p> |
| 345 |
|
| 346 |
<p> |
| 347 |
<code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon"> |
| 348 |
[<?php echo $shortcode; ?> pickup="1"] |
| 349 |
</code> |
| 350 |
</p> |
| 351 |
<?php endif; ?> |