| @@ -169,9 +169,9 @@ | ||
| 169 | 169 | { |
| 170 | 170 | return $employeeView; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | - public function renderReport( $shiftsDuration, $alignRight = true, $isVert = false ) | |
| 173 | + public function renderReport( $shiftsDuration, $alignRight = TRUE ) | |
| 174 | 174 | { |
| 175 | 175 | $return = NULL; |
| 176 | 176 | |
| 177 | 177 | $hide = $this->settings->get('datetime_hide_schedule_reports'); |
| @@ -200,20 +200,20 @@ | ||
| 200 | 200 | $return = array(); |
| 201 | 201 | // $return[] = $this->ui->makeBlockInline( $shiftsDuration->getQty() ) |
| 202 | 202 | // ->addAttr( 'title', '__Number Of Shifts__' ) |
| 203 | 203 | // ; |
| 204 | - $thisView = $shiftsDuration->formatDuration($duration); | |
| 205 | - $return[] = $this->ui->makeSpan( $thisView ) | |
| 206 | - ->addAttr( 'title', '__Hours__' . ': ' . $thisView ) | |
| 204 | + $return[] = $this->ui->makeSpan( $shiftsDuration->formatDuration($duration) ) | |
| 205 | + ->addAttr( 'title', '__Hours__' ) | |
| 207 | 206 | ; |
| 208 | 207 | $return[] = $this->ui->makeBlockInline( '(' . $qty . ')' ) |
| 209 | - ->addAttr( 'title', '__Shifts__' . ': ' . $qty ) | |
| 208 | + ->addAttr( 'title', '__Shifts__' ) | |
| 210 | 209 | ->tag('muted') |
| 211 | 210 | ->tag('font-size', 2) |
| 212 | 211 | ; |
| 212 | + $return = $this->ui->makeListInline( $return ) | |
| 213 | + ->gutter(1) | |
| 214 | + ; | |
| 213 | 215 | |
| 214 | - $return = $isVert ? $this->ui->makeList( $return )->gutter(1) : $this->ui->makeListInline( $return )->gutter(1); | |
| 215 | - | |
| 216 | 216 | if( $qtyTimeoff ){ |
| 217 | 217 | $timeoffReturn = array(); |
| 218 | 218 | $timeoffReturn[] = $this->ui->makeSpan( $shiftsDuration->formatDuration($durationTimeoff) ) |
| 219 | 219 | ->addAttr( 'title', '__Hours__' ) |
| @@ -226,23 +226,17 @@ | ||
| 226 | 226 | $timeoffReturn = $this->ui->makeListInline( $timeoffReturn ) |
| 227 | 227 | ->gutter(1) |
| 228 | 228 | ; |
| 229 | 229 | |
| 230 | - $return = $isVert ? $this->ui->makeList( array($return, $timeoffReturn) )->gutter(1) : $this->ui->makeListInline( array($return, $timeoffReturn) )->gutter(1); | |
| 230 | + $return = $this->ui->makeListInline( array($return, $timeoffReturn) ) | |
| 231 | + ->gutter(1) | |
| 232 | + ; | |
| 231 | 233 | } |
| 232 | 234 | |
| 233 | - if( $isVert ){ | |
| 234 | - $return = $this->ui->makeBlock( $return ) | |
| 235 | - // ->tag('border') | |
| 236 | - ->tag('padding', 1 ) | |
| 237 | - ; | |
| 238 | - } | |
| 239 | - else { | |
| 240 | - $return = $this->ui->makeBlockInline( $return ) | |
| 241 | - ->tag('border') | |
| 242 | - ->tag('padding', 1 ) | |
| 243 | - ; | |
| 244 | - } | |
| 235 | + $return = $this->ui->makeBlockInline( $return ) | |
| 236 | + ->tag('border') | |
| 237 | + ->tag('padding', 1 ) | |
| 238 | + ; | |
| 245 | 239 | if( $alignRight ){ |
| 246 | 240 | $return = $this->ui->makeBlock( $return ) |
| 247 | 241 | ->tag('align', 'right') |
| 248 | 242 | ; |
| @@ -761,11 +755,11 @@ | ||
| 761 | 755 | $this->request->setParam('start', $startDate); |
| 762 | 756 | $endDate = $this->t->formatDateDb(); |
| 763 | 757 | $this->request->setParam('end', $endDate); |
| 764 | 758 | |
| 765 | - $daysToShow = isset( SH4_Schedule_Html_View_Day::$daysToShow ) ? SH4_Schedule_Html_View_Day::$daysToShow : 1; | |
| 766 | - if( $daysToShow > 1 ){ | |
| 767 | - $this->t->modify( '+' . ($daysToShow - 1) . ' days' ); | |
| 759 | + $daysToShow = isset( SH4_Schedule_Html_View_Day::$daysToShow ) ? SH4_Schedule_Html_View_Day::$daysToShow : 7; | |
| 760 | + if( $daysToShow ){ | |
| 761 | + $this->t->modify( '+' . $daysToShow . ' days' ); | |
| 768 | 762 | } |
| 769 | 763 | $end = $this->t->setEndDay()->formatDateTimeDb(); |
| 770 | 764 | break; |
| 771 | 765 | |