[TYPO3-seminars] Better Frontend Output of the registrations list
Oliver Hauser | SIVA creative
o.hauser at siva-creative.net
Tue Apr 27 11:50:35 CEST 2010
Hi,
to have a sorted frontend output of the registrations list and show the
fully number of booked seats i added the following code:
booked seats (vacancies) :
Add a marker to the template...
add the following line to the
class.tx_seminars_pi1_frontEndRegistrationsList.php
$this->setMarker('vacancies', $this->seminar->getAttendances());
registrations list sorted by last_name of fe-user :
change the following lines in
class.tx_seminars_pi1_frontEndRegistrationsList.php
private functioncreateRegistrationsList() {
$builder
=tx_oelib_ObjectFactory::make('tx_seminars_registrationBagBuilder');
$builder->limitToEvent($this->seminar->getUid());
$builder->limitToRegular();
$builder->limitToExistingUsers();
$builder->setOrderBy('crdate');
$registrationBag=$builder->build();
to
private function createRegistrationsList() {
$builder
=
tx_oelib_ObjectFactory::make('tx_seminars_registrationBagBuilder');
$builder->limitToEvent($this->seminar->getUid());
$builder->limitToRegular();
$builder->limitToExistingUsers();
// $builder->setOrderBy('crdate');
// ERGÄNZUNG SORTIERUNG NACH FE USERS - SIEHE REGISTRATION BAG BUILDER
$builder->setOrderByNameColumn('fe_users.last_name');
$registrationBag = $builder->build();
and add the following lines to the
class.tx_seminars_registrationBagBuilder.php
// EGÄNZUNG !!! --- > SORTIERUNG NACH LAST_NAME AUS DER FE_USERS
TABELLE !!!!!
public function setOrderByNameColumn($orderBy) {
$this->addAdditionalTableName('fe_users');
$this->whereClauseParts['last_name'] = ' fe_users.uid='.
SEMINARS_TABLE_ATTENDANCES . '.user' .
tx_oelib_db::enableFields('fe_users');
$this->setOrderBy($orderBy);
}
May oliver & co. can implement a better version of this into the next
official release
Regards Oliver
--
Mit freundlichen Grüßen
Oliver Hauser
SIVA creative media
Hauptstraße 141
63864 Aschaffenburg
Tel: +49(0)6021 - 404 86 71
Fax: +49(0)6093 - 99 66 88 9
Mobil: +49(0)174 - 960 27 35
E-Mail: o.hauser at siva-creative.net <mailto:o.hauser at siva-creative.net>
Web: www.siva-creative.net <http://www.siva-creative.net>
--------------------------------------------------------------------------------------------------------------
Steuernummer: 204 / 226 / 10279 | USt-IdNr.: DE252015324
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen.
Nur ordnungsgemäß signierte Dokumente unterliegen unserer Verantwortung
--------------------------------------------------------------------------------------------------------------
More information about the TYPO3-project-seminars
mailing list