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/fourweeks.php +4 -57 4.9.744.9.66 View file →
@@ -383,22 +383,8 @@
383 383 // $header[] = NULL;
384 384 // }
385 385
386 386 $rows = array();
387 -
388 -// link templates to speed things up
389 -$toParams = array(
390 - 'calendar' => '{CID}',
391 - 'date' => '{DATE}'
392 -);
393 -$thisTo = 'new';
394 -$thisTo = array( $thisTo, $toParams );
395 -$thisHref = $this->uri->makeUrl( $thisTo );
396 -
397 -$linkTemplateShift = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center" href="' . $thisHref . '">+</a>';
398 -$linkTemplateShiftMuted = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center hc-muted3" href="' . $thisHref . '">+</a>';
399 -$isPrintView = $this->request->isPrintView();
400 -
401 387 foreach( $viewCalendars as $id => $calendarView ){
402 388 $row = array();
403 389
404 390 $this->shiftsDuration->reset();
@@ -469,12 +455,9 @@
469 455 }
470 456 }
471 457 }
472 458
473 - if( $isPrintView ) $addOk = false;
474 -
475 459 if( $addOk ){
476 -/*
477 460 $link = $this->ui->makeAhref( $to, $label )
478 461 ->tag('tab-link')
479 462 ->tag('align', 'center')
480 463 ->addAttr('title', '__Add New__')
@@ -482,15 +465,8 @@
482 465
483 466 if( $today > $date ){
484 467 $link->tag('muted', 3);
485 468 }
486 -*/
487 - if( $today > $date ){
488 - $link = str_replace( array('{CID}', '{DATE}'), array($id, $date), $linkTemplateShiftMuted );
489 - }
490 - else {
491 - $link = str_replace( array('{CID}', '{DATE}'), array($id, $date), $linkTemplateShift );
492 - }
493 469
494 470 $cell[] = $link;
495 471 }
496 472
@@ -596,19 +572,14 @@
596 572
597 573 $viewEmployees = array();
598 574 foreach( $employees as $employee ){
599 575 $label = $this->employeesPresenter->presentTitle( $employee );
576 +
600 577 $title = htmlspecialchars( $label );
601 -
602 578 $description = $employee->getDescription();
603 579 if( strlen($description) ){
604 - $imgpos = strpos( $description, '<img' );
605 - if( false !== $imgpos ){
606 - $label = $this->ui->makeList( array($label, $description) );
607 - }
608 - else {
609 - $title .= "\n" . htmlspecialchars( $description );
610 - }
580 + $description = htmlspecialchars( $description );
581 + $title .= "\n" . $description;
611 582 }
612 583
613 584 $label = $this->ui->makeSpan( $label )
614 585 ->tag( 'font-size', 4 )
@@ -696,22 +667,8 @@
696 667 // $header[] = NULL;
697 668 // }
698 669
699 670 $rows = array();
700 -
701 -// link templates to speed things up
702 -$toParams = array(
703 - 'employee' => '{EID}',
704 - 'date' => '{DATE}'
705 -);
706 -$thisTo = 'new';
707 -$thisTo = array( $thisTo, $toParams );
708 -$thisHref = $this->uri->makeUrl( $thisTo );
709 -
710 -$linkTemplateShift = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center" href="' . $thisHref . '">+</a>';
711 -$linkTemplateShiftMuted = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center hc-muted3" href="' . $thisHref . '">+</a>';
712 -$isPrintView = $this->request->isPrintView();
713 -
714 671 foreach( $viewEmployees as $id => $employeeView ){
715 672 $row = array();
716 673
717 674 $this->shiftsDuration->reset();
@@ -763,9 +720,8 @@
763 720 }
764 721
765 722 $comboId = 0 . '-' . $id;
766 723 if( isset($this->allCombos[$comboId]) ){
767 -/*
768 724 $label = '+';
769 725
770 726 $to = 'new';
771 727 $toParams = array(
@@ -782,19 +738,10 @@
782 738
783 739 if( $today > $date ){
784 740 $link->tag('muted', 3);
785 741 }
786 -*/
787 - if( $today > $date ){
788 - $link = str_replace( array('{EID}', '{DATE}'), array($id, $date), $linkTemplateShiftMuted );
789 - }
790 - else {
791 - $link = str_replace( array('{EID}', '{DATE}'), array($id, $date), $linkTemplateShift );
792 - }
793 742
794 - if( ! $isPrintView ){
795 - $cell[] = $link;
796 - }
743 + $cell[] = $link;
797 744 }
798 745
799 746 $cell = $this->ui->makeList( $cell )
800 747 ->gutter(1)