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/schedule/html/view/month.php +4 -58 4.9.744.9.66 View file →
@@ -374,22 +374,8 @@
374 374 // $header[] = NULL;
375 375 // }
376 376
377 377 $rows = array();
378 -
379 -// link templates to speed things up
380 -$toParams = array(
381 - 'calendar' => '{CID}',
382 - 'date' => '{DATE}'
383 -);
384 -$thisTo = 'new';
385 -$thisTo = array( $thisTo, $toParams );
386 -$thisHref = $this->uri->makeUrl( $thisTo );
387 -
388 -$linkTemplateShift = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center" href="' . $thisHref . '">+</a>';
389 -$linkTemplateShiftMuted = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center hc-muted3" href="' . $thisHref . '">+</a>';
390 -$isPrintView = $this->request->isPrintView();
391 -
392 378 foreach( $viewCalendars as $id => $calendarView ){
393 379 $row = array();
394 380
395 381 $this->shiftsDuration->reset();
@@ -460,12 +446,9 @@
460 446 }
461 447 }
462 448 }
463 449
464 - if( $isPrintView ) $addOk = false;
465 -
466 450 if( $addOk ){
467 -/*
468 451 $link = $this->ui->makeAhref( $to, $label )
469 452 ->tag('tab-link')
470 453 ->tag('align', 'center')
471 454 ->addAttr('title', '__Add New__')
@@ -473,17 +456,9 @@
473 456
474 457 if( $today > $date ){
475 458 $link->tag('muted', 3);
476 459 }
477 -*/
478 460
479 - if( $today > $date ){
480 - $link = str_replace( array('{CID}', '{DATE}'), array($id, $date), $linkTemplateShiftMuted );
481 - }
482 - else {
483 - $link = str_replace( array('{CID}', '{DATE}'), array($id, $date), $linkTemplateShift );
484 - }
485 -
486 461 $cell[] = $link;
487 462 }
488 463
489 464 $cell = $this->ui->makeList( $cell )
@@ -590,19 +565,14 @@
590 565
591 566 $viewEmployees = array();
592 567 foreach( $employees as $employee ){
593 568 $label = $this->employeesPresenter->presentTitle( $employee );
569 +
594 570 $title = htmlspecialchars( $label );
595 -
596 571 $description = $employee->getDescription();
597 572 if( strlen($description) ){
598 - $imgpos = strpos( $description, '<img' );
599 - if( false !== $imgpos ){
600 - $label = $this->ui->makeList( array($label, $description) );
601 - }
602 - else {
603 - $title .= "\n" . htmlspecialchars( $description );
604 - }
573 + $description = htmlspecialchars( $description );
574 + $title .= "\n" . $description;
605 575 }
606 576
607 577 $label = $this->ui->makeSpan( $label )
608 578 ->tag( 'font-size', 4 )
@@ -688,22 +658,8 @@
688 658 // $header[] = NULL;
689 659 // }
690 660
691 661 $rows = array();
692 -
693 -// link templates to speed things up
694 -$toParams = array(
695 - 'employee' => '{EID}',
696 - 'date' => '{DATE}'
697 -);
698 -$thisTo = 'new';
699 -$thisTo = array( $thisTo, $toParams );
700 -$thisHref = $this->uri->makeUrl( $thisTo );
701 -
702 -$linkTemplateShift = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center" href="' . $thisHref . '">+</a>';
703 -$linkTemplateShiftMuted = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center hc-muted3" href="' . $thisHref . '">+</a>';
704 -$isPrintView = $this->request->isPrintView();
705 -
706 662 foreach( $viewEmployees as $id => $employeeView ){
707 663 $row = array();
708 664
709 665 $this->shiftsDuration->reset();
@@ -754,9 +710,8 @@
754 710 }
755 711
756 712 $comboId = 0 . '-' . $id;
757 713 if( isset($this->allCombos[$comboId]) ){
758 -/*
759 714 $label = '+';
760 715
761 716 $to = 'new';
762 717 $toParams = array(
@@ -773,19 +728,10 @@
773 728
774 729 if( $today > $date ){
775 730 $link->tag('muted', 3);
776 731 }
777 -*/
778 - if( $today > $date ){
779 - $link = str_replace( array('{EID}', '{DATE}'), array($id, $date), $linkTemplateShiftMuted );
780 - }
781 - else {
782 - $link = str_replace( array('{EID}', '{DATE}'), array($id, $date), $linkTemplateShift );
783 - }
784 732
785 - if( ! $isPrintView ){
786 - $cell[] = $link;
787 - }
733 + $cell[] = $link;
788 734 }
789 735
790 736 $cell = $this->ui->makeList( $cell )
791 737 ->gutter(1)