PluginProbe
ShiftController Employee Shift Scheduling / 3.2.4
ShiftController Employee Shift Scheduling v3.2.4
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
shiftcontroller / application / modules / wordpress / views / admin / shortcode.php

shortcode.php in ShiftController Employee Shift Scheduling 3.2.4, at application/modules/wordpress/views/admin/shortcode.php

160 lines 5.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 echo HC_Html::page_header(
3 HC_Html_Factory::element('h1')
4 ->add_child(
5 'Shortcode'
6 )
7 )
8 ?>
9 <p>
10 With the following shoftcode you can insert your <strong class="hc-bold">Everyone's Schedule</strong> view into a post or a page.
11 </p>
12
13 <p>
14 <code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon">
15 [<?php echo $shortcode; ?>]
16 </code>
17 </p>
18
19 <p>
20 By default, this view will display the current week shifts calendar.
21 If need to, you can adjust it by supplying additional parameters to control the display:
22 </p>
23
24 <ul>
25 <li class="hc-mb2 hc-mt1 hc-ml3">
26 <strong class="hc-bold">date</strong>: <em class="hc-italic">yyyymmdd</em>, for example <em class="hc-italic">20140901</em>. If not supplied, it will start from the current date.
27 </li>
28
29 <li class="hc-mb2 hc-mt1 hc-ml3">
30 <strong class="hc-bold">range</strong>
31 <ul class="hc-ml3">
32 <li class="hc-mb1 hc-mt1">
33 <em class="hc-italic">week</em>
34 <p class="hc-ml3">
35 It will display the week calendar with shifts starting from Sunday (or Monday) of the current week regardless of the current week day.
36 </p>
37 </li>
38 <li class="hc-mb1 hc-mt1">
39 <em class="hc-italic">month</em>
40 <p class="hc-ml3">
41 It will display the month calendar with shifts starting from the 1st of the current month regardless of the current date.
42 </p>
43 </li>
44 <li class="hc-mb1 hc-mt1">
45 Time range, for example <em class="hc-italic">5 days</em>, <em class="hc-italic">2 weeks</em>
46 <p class="hc-ml3">
47 It will display the list of shifts starting from the date specified in the <strong class="hc-bold">date</strong> parameter and within the range given. If no <strong class="hc-bold">date</strong> is giving, it will start from today.
48 </p>
49 </li>
50 </ul>
51 </li>
52
53 <li class="hc-mb2 hc-mt1 hc-ml3">
54 <strong class="hc-bold">location</strong>: <em class="hc-italic">location id</em>, for example <em class="hc-italic">2</em>. You can find out the id of a location in <em class="hc-italic">Configuration &gt; Locations</em>. If not supplied, it will display shifts of all locations.
55 You can also supply several ids separated by comma.
56 </li>
57
58 <li class="hc-mb2 hc-mt1 hc-ml3">
59 <strong class="hc-bold">staff</strong>: <em class="hc-italic">staff id</em>, for example <em class="hc-italic">3</em>. You can find out the id of an employee in <strong class="hc-bold">Users</strong>. If not supplied, it will display shifts of all employees.
60 You can also supply several ids separated by comma.
61 </li>
62
63 <li class="hc-mb2 hc-mt1 hc-ml3">
64 <strong class="hc-bold">route</strong>
65 <p>
66 This parameter defines the default area where the visitor gets to by going to the page with ShiftController shortcode.
67 </p>
68
69 <ul class="hc-ml3">
70 <li class="hc-mb1 hc-mt1">
71 <em class="hc-italic">list</em>
72 <p>
73 The only option available for not logged in visitors.
74 It will display everyone's shifts (the <strong class="hc-bold">Full Schedule</strong> page).
75 </p>
76 </li>
77 <li class="hc-mb1 hc-mt1">
78 <em class="hc-italic">listme</em>
79 <p>
80 The default option for logged in employees.
81 It will display the shifts of the currently logged in user (the <strong class="hc-bold">My Schedule</strong> page).
82 </p>
83 </li>
84 <li class="hc-mb1 hc-mt1">
85 <em class="hc-italic">list-toff</em>
86 <p>
87 Available for logged in employees only. It will display the list of the employee's timeoff requests (the <strong class="hc-bold">Timeoff Requests</strong> page).
88 </p>
89 </li>
90 </ul>
91 </li>
92
93 <li class="hc-mb2 hc-mt1 hc-ml3">
94 <strong class="hc-bold">hide-ui</strong>
95 <p>
96 Optionally you can hide certain user interface elements on the front end page. Separate several options by comma. Possible options include:
97 </p>
98
99 <ul class="hc-ml3">
100 <li class="hc-mb1 hc-mt1">
101 <em class="hc-italic">login, filter-staff, filter-location, print, download, view-type, group-by, date-navigation</em>
102 </li>
103 </ul>
104 </li>
105 </ul>
106
107 <p>
108 <h3>Examples</h3>
109 </p>
110
111 <p>
112 Month calendar for September in location #2:
113 </p>
114
115 <p>
116 <code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon">
117 [<?php echo $shortcode; ?> date="20150901" range="month" location="2"]
118 </code>
119 </p>
120
121 <p>
122 Week calendar for the current week:
123 </p>
124
125 <p>
126 <code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon">
127 [<?php echo $shortcode; ?> range="week"]
128 </code>
129 </p>
130
131 <p>
132 List shifts in the next 3 days:
133 </p>
134
135 <p>
136 <code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon">
137 [<?php echo $shortcode; ?> range="3 days"]
138 </code>
139 </p>
140
141 <p>
142 Make the Full Schedule page a default view for a logged in employee (instead of the My Schedule page):
143 </p>
144
145 <p>
146 <code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon">
147 [<?php echo $shortcode; ?> route="list"]
148 </code>
149 </p>
150
151 <p>
152 Do not show the login link and the download button:
153 </p>
154
155 <p>
156 <code class="hc-p2 hc-mt1 hc-mb1 hc-border hc-block hc-maroon">
157 [<?php echo $shortcode; ?> hide-ui="login,download"]
158 </code>
159 </p>
160