[TYPO3-calendar] rendering of ALLDAY in newLargeMonth.tmpl in cal 1.7.0

Hauke Haller post at haukehaller.de
Fri Oct 24 19:37:22 CEST 2014


Am 23.10.2014 20:48, schrieb Mario Matzulla:
> The rendering is not configurable. It is done in the
> view/class.tx_cal_new_XXXview.php.

Thank you for your help, Mario.
With low-php-knowledge I changed the function renderAlldaysForMonth in class.tx_cal_new_weekview.php:

	private function renderAlldaysForMonth(&$theMatrix) {
		$classes = $this->getWeekClasses ();
		$daysKeys = array_keys ($this->days);
		$controller = &tx_cal_registry::Registry ('basic', 'controller');
		$currentMonth = $controller->getDateTimeObject->getMonth ();
		
		$sims = $rems = $wrapped = Array ();
		$template = '';
		
		$conf = &tx_cal_registry::Registry ('basic', 'conf');
		for ($j = 0; $j < $this->rowspan; $j ++) {
			$this->content .= '<tr class="' . $classes . '">';
			// added:
			$this->content .= '<td colspan=7> ';
			
			for ($i = 0; $i < 7; $i ++) {
				$currentDayClass = ' weekday' . $this->days [$daysKeys [$i]]->weekdayNumber;
				if ($this->currentDayIndex == $i) {
					$currentDayClass = ' currentDay';
				}
				if ($currentMonth != $this->days [$daysKeys [$i]]->month) {
					$currentDayClass .= ' monthOff';
				}
				if ($theMatrix [$i] [$j] == false) {
				//	$this->content .= '<td class="empty ' . $classes . $currentDayClass . '">';
				} else if (is_object ($theMatrix [$i] [$j])) {
				//	$this->content .= '<td class="event ' . $classes . $currentDayClass . '" colspan="' . ($theMatrix [$i] [$j]->matrixValue) . '">' . $theMatrix [$i] [$j]->renderEventFor ('month');
					$this->content .= '<div class="event ' . $classes . $currentDayClass . ' daysoftheweek' . ($theMatrix [$i] [$j]->matrixValue) . '">' . $theMatrix [$i] [$j]->renderEventFor ('month');
					$this->content .=  $sims ['###EDIT_EVENT_LINK###'];
					
					$this->days [$daysKeys [$i]]->hasAlldayEvents = true;
				}
			//	$this->content .= '</td>';
				$this->content .= '</div>';
			}
			// added:
			$this->content .= '</td> ';
			
			$this->content .= '</tr>';
		}
		$this->content .= '<tr class="create">';
		for ($i = 0; $i < 7; $i ++) {
			$this->days [$daysKeys [$i]]->getCreateEventLinkMarker ($template, $sims, $rems, $wrapped, $conf ['view']);
			$this->content .= '<td>' . $sims ['###CREATE_EVENT_LINK###'] . '</td>';
		}
		$this->content .= '</tr>';
		$this->rowspan ++;
	}


.. and can go on working with this overwhelming great plugin.

Hauke




More information about the TYPO3-project-calendar mailing list