From 4dc78c21af7c2c9c20adc3f05069facd845cd358 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Mon, 20 May 2019 13:02:04 +0200 Subject: [PATCH] Made clubs view in the backend working generally (no CUD) --- src/admin/mymodels/club.php | 18 +++++++++--------- src/admin/views/clubs/tmpl/default.php | 20 ++++++++++++++------ src/admin/views/clubs/view.html.php | 1 + 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/admin/mymodels/club.php b/src/admin/mymodels/club.php index 0cf9959..cf2aa52 100644 --- a/src/admin/mymodels/club.php +++ b/src/admin/mymodels/club.php @@ -10,7 +10,7 @@ class ClubsClub extends AbstractClubsModel protected $name; protected $address; protected $city; - protected $homapge; + protected $homepage; protected $mail; protected $iban; protected $bic; @@ -36,9 +36,9 @@ class ClubsClub extends AbstractClubsModel /** * @return string */ - public function getHomapge() + public function getHomepage() { - return $this->homapge; + return $this->homepage; } /** @@ -110,7 +110,7 @@ class ClubsClub extends AbstractClubsModel */ public function setHomapge(string $homapge) { - $this->homapge = $homapge; + $this->homepage = $homapge; } /** @@ -209,10 +209,10 @@ class ClubsClub extends AbstractClubsModel } - public function getOffers() - { +// public function getOffers() +// { - } +// } protected function loadCustomData($assoc) @@ -232,12 +232,12 @@ class ClubsClub extends AbstractClubsModel protected function getDataMappings() { - return array('neme', 'address', 'city', 'homepage', 'mail', 'iban', 'bic', 'charitable'); + return array('name', 'address', 'city', 'homepage', 'mail', 'iban', 'bic', 'charitable'); } protected function getRequiredDataMappings() { - return array('neme', 'address', 'city', 'mail', 'iban', 'bic', 'charitable'); + return array('name', 'address', 'city', 'mail', 'iban', 'bic', 'charitable'); } private const tableName = '#__club_clubs'; diff --git a/src/admin/views/clubs/tmpl/default.php b/src/admin/views/clubs/tmpl/default.php index 433af8d..33c30ea 100644 --- a/src/admin/views/clubs/tmpl/default.php +++ b/src/admin/views/clubs/tmpl/default.php @@ -11,18 +11,26 @@ defined('_JEXEC') or die; Bezeichnung + Stadt + Homepage + E-Mail Löschen? id -offers as $offer): ?> -getId()); ?> +clubs as $club): ?> +getId()); ?> +getHomepage()); ?> +getMail()); ?> - getName()); ?> - getId()); ?>'>Del - getId()); ?> + getName()); ?> + getCity()); ?> + + + + getId()); ?> -
'>Neues Angebot anlegen
+
'>Neuen Verein anlegen
diff --git a/src/admin/views/clubs/view.html.php b/src/admin/views/clubs/view.html.php index bee4949..09de821 100644 --- a/src/admin/views/clubs/view.html.php +++ b/src/admin/views/clubs/view.html.php @@ -12,6 +12,7 @@ class ClubsViewClubs extends HtmlView function display($tpl = null) { // $this->offers = ClubsOffer::loadOffers(); + $this->clubs = ClubsClub::loadClubs(); ToolbarHelper::title('Club-Management - Clubs'); parent::display($tpl);