PluginProbe
ShiftController Employee Shift Scheduling / 4.9.66
ShiftController Employee Shift Scheduling v4.9.66
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
← All changes | sh4/new/view/confirm.php +4 -47 4.9.754.9.66 View file →
@@ -101,21 +101,9 @@
101 101 ;
102 102 break;
103 103 }
104 104
105 - $countDate = count( $dates );
106 - if( $countDate > 1 ){
107 - if( SH4_ShiftTypes_Model::RANGE_HOURS == $range ){
108 - $label = '__Dates__' . ' (' . $countDate . ')';
109 - }
110 - else {
111 - $label = '__Dates__';
112 - }
113 - }
114 - else {
115 - $label = '__Date__';
116 - }
117 -
105 + $label = ( count($dates) > 1 ) ? '__Dates__' : '__Date__';
118 106 $datesView = $this->ui->makeLabelled( $label, $datesView );
119 107
120 108 $shiftType = $this->shiftTypesQuery->findById( $shiftTypeId );
121 109
@@ -359,17 +347,9 @@
359 347 $employeesView[] = $thisView;
360 348 }
361 349
362 350 $employeesView = $this->ui->makeListInline( $employeesView );
363 -
364 - $countEmployee = count( $employees );
365 - if( $countEmployee > 1 ){
366 - $label = '__Employees__' . ' (' . $countEmployee . ')';
367 - }
368 - else {
369 - $label = '__Employee__';
370 - }
371 -
351 + $label = ( count($employees) > 1 ) ? '__Employees__' : '__Employee__';
372 352 $employeesView = $this->ui->makeLabelled( $label, $employeesView );
373 353
374 354 $out[] = $datesView;
375 355 $out[] = $employeesView;
@@ -447,35 +427,15 @@
447 427 public function buttons( $calendarId, $shiftTypeId, $dateString, $employeeString )
448 428 {
449 429 $ret = array();
450 430
451 - $countDate = $countEmployee = 1;
452 - if( false !== strpos($employeeString, '_') ){
453 - $countEmployee = count( HC3_Functions::unglueArray($employeeString) );
454 - }
431 + $noDraft = $this->settings->get('shifts_no_draft') ? TRUE : FALSE;
455 432
456 - if( false !== strpos($dateString, '_') ){
457 - $shiftType = $this->shiftTypesQuery->findById( $shiftTypeId );
458 - $range = $shiftType->getRange();
459 - if( SH4_ShiftTypes_Model::RANGE_HOURS == $range ){
460 - $countDate = count( HC3_Functions::unglueArray($dateString) );
461 - }
462 - }
463 -
464 - $countShift = $countDate * $countEmployee;
465 -
466 - $noDraft = $this->settings->get('shifts_no_draft') ? true : false;
467 -
468 433 // draft
469 434 if( ! $noDraft ){
470 435 $to = array( 'new', $calendarId, $shiftTypeId, $dateString, $employeeString, 'draft' );
471 436 $to = join( '/', $to );
472 - $label = '__Create Draft__';
473 - if( $countShift > 1 ){
474 - $label .= ' (' . $countShift . ')';
475 - }
476 -
477 - $btnDraft = $this->ui->makeInputSubmit( $label )
437 + $btnDraft = $this->ui->makeInputSubmit( '__Create Draft__')
478 438 ->tag('secondary')
479 439 ->setFormAction( $to )
480 440 ;
481 441 $ret['draft'] = $btnDraft;
@@ -484,11 +444,8 @@
484 444 // publish
485 445 $to = array( 'new', $calendarId, $shiftTypeId, $dateString, $employeeString, 'publish' );
486 446 $to = join( '/', $to );
487 447 $label = $noDraft ? '__Post Shift__' : '__Create Published__';
488 - if( $countShift > 1 ){
489 - $label .= ' (' . $countShift . ')';
490 - }
491 448
492 449 $btnPublish = $this->ui->makeInputSubmit( $label )
493 450 ->tag('primary')
494 451 ->setFormAction( $to )