| @@ -447,22 +447,8 @@ | ||
| 447 | 447 | // $header[] = NULL; |
| 448 | 448 | // } |
| 449 | 449 | |
| 450 | 450 | $rows = array(); |
| 451 | - | |
| 452 | -// link templates to speed things up | |
| 453 | -$toParams = array( | |
| 454 | - 'calendar' => '{CID}', | |
| 455 | - 'date' => '{DATE}' | |
| 456 | -); | |
| 457 | -$thisTo = 'new'; | |
| 458 | -$thisTo = array( $thisTo, $toParams ); | |
| 459 | -$thisHref = $this->uri->makeUrl( $thisTo ); | |
| 460 | - | |
| 461 | -$linkTemplateShift = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center" href="' . $thisHref . '">+</a>'; | |
| 462 | -$linkTemplateShiftMuted = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center hc-muted3" href="' . $thisHref . '">+</a>'; | |
| 463 | -$isPrintView = $this->request->isPrintView(); | |
| 464 | - | |
| 465 | 451 | foreach( $viewCalendars as $id => $calendarView ){ |
| 466 | 452 | $row = array(); |
| 467 | 453 | |
| 468 | 454 | $this->shiftsDuration->reset(); |
| @@ -533,12 +519,9 @@ | ||
| 533 | 519 | } |
| 534 | 520 | } |
| 535 | 521 | } |
| 536 | 522 | |
| 537 | - if( $isPrintView ) $addOk = false; | |
| 538 | - | |
| 539 | 523 | if( $addOk ){ |
| 540 | -/* | |
| 541 | 524 | $link = $this->ui->makeAhref( $to, $label ) |
| 542 | 525 | ->tag('tab-link') |
| 543 | 526 | ->tag('align', 'center') |
| 544 | 527 | ->addAttr('title', '__Add New__') |
| @@ -546,15 +529,8 @@ | ||
| 546 | 529 | |
| 547 | 530 | if( $today > $date ){ |
| 548 | 531 | $link->tag('muted', 3); |
| 549 | 532 | } |
| 550 | -*/ | |
| 551 | - if( $today > $date ){ | |
| 552 | - $link = str_replace( array('{CID}', '{DATE}'), array($id, $date), $linkTemplateShiftMuted ); | |
| 553 | - } | |
| 554 | - else { | |
| 555 | - $link = str_replace( array('{CID}', '{DATE}'), array($id, $date), $linkTemplateShift ); | |
| 556 | - } | |
| 557 | 533 | |
| 558 | 534 | $cell[] = $link; |
| 559 | 535 | } |
| 560 | 536 | |
| @@ -655,19 +631,14 @@ | ||
| 655 | 631 | |
| 656 | 632 | $viewEmployees = array(); |
| 657 | 633 | foreach( $employees as $employee ){ |
| 658 | 634 | $label = $this->employeesPresenter->presentTitle( $employee ); |
| 635 | + | |
| 659 | 636 | $title = htmlspecialchars( $label ); |
| 660 | - | |
| 661 | 637 | $description = $employee->getDescription(); |
| 662 | 638 | if( strlen($description) ){ |
| 663 | - $imgpos = strpos( $description, '<img' ); | |
| 664 | - if( false !== $imgpos ){ | |
| 665 | - $label = $this->ui->makeList( array($label, $description) ); | |
| 666 | - } | |
| 667 | - else { | |
| 668 | - $title .= "\n" . htmlspecialchars( $description ); | |
| 669 | - } | |
| 639 | + $description = htmlspecialchars( $description ); | |
| 640 | + $title .= "\n" . $description; | |
| 670 | 641 | } |
| 671 | 642 | |
| 672 | 643 | $label = $this->ui->makeSpan( $label ) |
| 673 | 644 | ->tag( 'font-size', 4 ) |
| @@ -789,21 +760,8 @@ | ||
| 789 | 760 | // } |
| 790 | 761 | |
| 791 | 762 | $rows = array(); |
| 792 | 763 | |
| 793 | -// link templates to speed things up | |
| 794 | -$toParams = array( | |
| 795 | - 'employee' => '{EID}', | |
| 796 | - 'date' => '{DATE}' | |
| 797 | -); | |
| 798 | -$thisTo = 'new'; | |
| 799 | -$thisTo = array( $thisTo, $toParams ); | |
| 800 | -$thisHref = $this->uri->makeUrl( $thisTo ); | |
| 801 | - | |
| 802 | -$linkTemplateShift = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center" href="' . $thisHref . '">+</a>'; | |
| 803 | -$linkTemplateShiftMuted = '<a title="__Add New__" class="hc-block hc-theme-tab-link hc-align-center hc-muted3" href="' . $thisHref . '">+</a>'; | |
| 804 | -$isPrintView = $this->request->isPrintView(); | |
| 805 | - | |
| 806 | 764 | foreach( $viewEmployees as $id => $employeeView ){ |
| 807 | 765 | $row = array(); |
| 808 | 766 | |
| 809 | 767 | $this->shiftsDuration->reset(); |
| @@ -855,9 +813,8 @@ | ||
| 855 | 813 | } |
| 856 | 814 | |
| 857 | 815 | $comboId = 0 . '-' . $id; |
| 858 | 816 | if( isset($this->allCombos[$comboId]) ){ |
| 859 | -/* | |
| 860 | 817 | $label = '+'; |
| 861 | 818 | |
| 862 | 819 | $to = 'new'; |
| 863 | 820 | $toParams = array( |
| @@ -874,19 +831,10 @@ | ||
| 874 | 831 | |
| 875 | 832 | if( $today > $date ){ |
| 876 | 833 | $link->tag('muted', 3); |
| 877 | 834 | } |
| 878 | -*/ | |
| 879 | - if( $today > $date ){ | |
| 880 | - $link = str_replace( array('{EID}', '{DATE}'), array($id, $date), $linkTemplateShiftMuted ); | |
| 881 | - } | |
| 882 | - else { | |
| 883 | - $link = str_replace( array('{EID}', '{DATE}'), array($id, $date), $linkTemplateShift ); | |
| 884 | - } | |
| 885 | 835 | |
| 886 | - if( ! $isPrintView ){ | |
| 887 | - $cell[] = $link; | |
| 888 | - } | |
| 836 | + $cell[] = $link; | |
| 889 | 837 | } |
| 890 | 838 | |
| 891 | 839 | $cell = $this->ui->makeList( $cell ) |
| 892 | 840 | ->gutter(1) |