[TYPO3-project-seminars] Hintergrundfarbe für Seminare je nach Belegung
Michael Knoll
mimi at kaktusteam.de
Fri Feb 9 02:12:28 CET 2007
Hi Oliver,
I kind of fixed the bug, just put the following lines into the
class.tx_seminars_pi1.php file and everything works fine:
...
function createListRow(...) {
...
$rowClass = array();
$oddEvenClass = ($rowCounter % 2) ? 'listrow-odd' : '';
if ($oddEvenClass != '') { $rowClass[] = $oddEvenClass; }
$vacanciesClass = $this->getVacanciesClasses($this->seminar);
if ($vacanciesClass != '') { $rowClass[] = $vacanciesClass; }
$canceledClass = ($this->seminar->isCanceled()) ?
$this->pi_getClassName('canceled') : '';
if ($canceledClass != '') { $rowClass[] = $canceledClass; }
// Only use the class construct if we actually have a class.
$rowClass = implode(' ', $rowClass);
if ($rowClass != '' ) { $completeClass = 'style="'. $rowClass .'"'; }
$this->setMarkerContent('class_itemrow', $completeClass);
...
Unfortunately I don't have an SVN account and I'm not a very good
programmer, but perhaps you can use this and fix the row-class bug.
Thanks for this great Extension!
Michael
Oliver Klee schrieb:
> Hi,
>
> Michael Knoll schrieb:
>> does this mean, that only if there are only one or two places left, the
>> table row can be styled?
>
> Currently, the table *row* can not be styled depending on the number of
> vacancies. That's what the bug/feature report is about
>
>> Can I set the number of vacancies when the
>> classes are set? If there are more than 3 vacancies, is there no class
>> that is set?
>
> The class for the "vacancies" table *cell* is set for any number of
> vacancies:
>
> tx-seminars-pi1-vacancies-2 for 2 vacancies
> tx-seminars-pi1-vacancies-12 for 12 vacancies
> tx-seminars-pi1-vacancies-999 for 999 vacancies
>
> etc.
>
>
> Oliver
More information about the TYPO3-project-seminars
mailing list