Changeset 2170467
- Timestamp:
- 10/09/2019 08:45:35 AM (6 years ago)
- Location:
- shiftcontroller/trunk
- Files:
-
- 8 edited
-
hc3/_wordpress/layout.php (modified) (1 diff)
-
hc3/ui/element/input/datepicker/assets/input.css (modified) (2 diffs)
-
hc3/ui/element/input/datepicker/assets/input.js (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
sh4/schedule/html/view/common.php (modified) (1 diff)
-
sh4/schedule/html/view/month.php (modified) (1 diff)
-
sh4/shifts/view/widget.php (modified) (1 diff)
-
shiftcontroller4.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shiftcontroller/trunk/hc3/_wordpress/layout.php
r1851180 r2170467 12 12 { 13 13 $content = '' . $content; 14 15 $content = str_replace( 'hc-table-header-wpadmin', '', $content ); 16 $content = str_replace( 'hc-table-header', '', $content ); 14 17 15 18 $body = array(); -
shiftcontroller/trunk/hc3/ui/element/input/datepicker/assets/input.css
r1851180 r2170467 487 487 margin-right: -5px; 488 488 } 489 .hc-datepicker2. dropdown-menu {489 .hc-datepicker2.hc-dropdown-menu { 490 490 position: absolute; 491 491 top: 100%; … … 523 523 524 524 } 525 .hc-datepicker2. dropdown-menu th,525 .hc-datepicker2.hc-dropdown-menu th, 526 526 .hc-datepicker2.hc-datepicker2-inline th, 527 .hc-datepicker2. dropdown-menu td,527 .hc-datepicker2.hc-dropdown-menu td, 528 528 .hc-datepicker2.hc-datepicker2-inline td { 529 529 padding: 4px 5px; -
shiftcontroller/trunk/hc3/ui/element/input/datepicker/assets/input.js
r1869916 r2170467 107 107 } 108 108 else { 109 this.picker.addClass('hc-datepicker2-dropdown dropdown-menu');109 this.picker.addClass('hc-datepicker2-dropdown hc-dropdown-menu'); 110 110 } 111 111 -
shiftcontroller/trunk/readme.txt
r2168986 r2170467 60 60 61 61 == Changelog == 62 63 = 4.4.9 = 64 * In the month schedule view the shift widget now displays abbreviated label of the calendar title or of the employee name, depending on the grouping selected. 65 * Modified the permissions part so that if an employee can't see others shifts in a calendar, so this employee can't also see others employees names. 62 66 63 67 = 4.4.8 = -
shiftcontroller/trunk/sh4/schedule/html/view/common.php
r2120574 r2170467 219 219 $return = $this->employeesQuery->findActive(); 220 220 221 $currentUser = $this->auth->getCurrentUser(); 222 $currentUserId = $currentUser->getId(); 223 $employee = $this->appQuery->findEmployeeByUser( $currentUser ); 224 $managedCalendars = $this->appQuery->findCalendarsManagedByUser( $currentUser ); 225 221 226 $allowed = array(); 227 if( $employee ){ 228 $allowed[ $employee->getId() ] = $employee; 229 } 222 230 223 231 $calendars = $this->self->findAllCalendars(); 224 232 foreach( $calendars as $calendar ){ 225 $thisReturn = $this->appQuery->findEmployeesForCalendar( $calendar ); 226 $allowed = $allowed + $thisReturn; 233 $thisCalendarId = $calendar->getId(); 234 235 $thisAllowed = $this->appQuery->findEmployeesForCalendar( $calendar ); 236 237 if( isset($managedCalendars[$thisCalendarId]) ){ 238 $allowed = $allowed + $thisAllowed; 239 continue; 240 } 241 242 // OPEN? 243 if( isset($thisAllowed[0]) ){ 244 $permNames = array(); 245 $permNames[] = 'visitor_view_open_publish'; 246 $permNames[] = 'visitor_view_open_draft'; 247 if( $employee ){ 248 $permNames[] = 'employee_view_open_publish'; 249 $permNames[] = 'employee_view_open_draft'; 250 } 251 252 reset( $permNames ); 253 foreach( $permNames as $permName ){ 254 $perm = $this->calendarsPermissions->get( $calendar, $permName ); 255 if( $perm ){ 256 $allowed[0] = $thisAllowed[0]; 257 break; 258 } 259 } 260 } 261 262 $permNames = array(); 263 $permNames[] = 'visitor_view_others_publish'; 264 $permNames[] = 'visitor_view_others_draft'; 265 if( $employee ){ 266 $permNames[] = 'employee_view_others_publish'; 267 $permNames[] = 'employee_view_others_draft'; 268 } 269 270 reset( $permNames ); 271 foreach( $permNames as $permName ){ 272 $perm = $this->calendarsPermissions->get( $calendar, $permName ); 273 if( $perm ){ 274 $allowed = $allowed + $thisAllowed; 275 break; 276 } 277 } 278 279 // PICKUP? 280 if( $employee ){ 281 $permNames = array(); 282 $permNames[] = 'employee_pickup_others'; 283 284 reset( $permNames ); 285 foreach( $permNames as $permName ){ 286 $perm = $this->calendarsPermissions->get( $calendar, $permName ); 287 if( $perm ){ 288 $allowed = $allowed + $thisAllowed; 289 break; 290 } 291 } 292 } 293 294 // $allowed = $allowed + $thisReturn; 227 295 } 228 296 -
shiftcontroller/trunk/sh4/schedule/html/view/month.php
r2149207 r2170467 701 701 foreach( $shifts as $shift ){ 702 702 $id = $shift->getId(); 703 $thisView = $this->widget->renderCompact( $shift );703 $thisView = $this->widget->renderCompact( $shift, $iknow ); 704 704 705 705 if( ! $noZoom ){ -
shiftcontroller/trunk/sh4/shifts/view/widget.php
r2134277 r2170467 164 164 } 165 165 166 public function renderCompact( SH4_Shifts_Model $model )166 public function renderCompact( SH4_Shifts_Model $model, $iknow = array() ) 167 167 { 168 168 $id = $model->getId(); 169 169 $calendar = $model->getCalendar(); 170 170 $color = $calendar->getColor(); 171 $employee = $model->getEmployee(); 171 172 172 173 $out = ' '; 173 $out = $this->ui->makeBlock( $out ) 174 175 $label = NULL; 176 177 if( ! in_array('calendar', $iknow) ){ 178 $label = $calendar->getTitle(); 179 } 180 elseif( ! in_array('employee', $iknow) ){ 181 $label = $employee->getTitle(); 182 } 183 184 if( NULL !== $label ){ 185 $label = explode( ' ', $label ); 186 187 $finalLabel = array(); 188 foreach( $label as $l ){ 189 $l = substr( $l, 0, 1 ); 190 $finalLabel[] = $l; 191 if( count($finalLabel) >= 2 ){ 192 break; 193 } 194 } 195 196 $label = join( '', $finalLabel ); 197 } 198 else { 199 $label = ' '; 200 } 201 202 $out = $this->ui->makeBlock( $label ) 174 203 ->padding(1) 175 204 ->tag('nowrap') 205 ->tag('align', 'center') 206 // ->tag('font-size', 2) 176 207 ; 177 208 -
shiftcontroller/trunk/shiftcontroller4.php
r2164188 r2170467 4 4 * Plugin URI: http://www.shiftcontroller.com/ 5 5 * Description: Staff scheduling plugin 6 * Version: 4.4. 86 * Version: 4.4.9 7 7 * Author: hitcode.com 8 8 * Author URI: http://www.shiftcontroller.com/ … … 11 11 */ 12 12 13 define( 'SH4_VERSION', 44 8);13 define( 'SH4_VERSION', 449 ); 14 14 15 15 if (! defined('ABSPATH')) exit; // Exit if accessed directly
Note: See TracChangeset
for help on using the changeset viewer.