diff --git a/boot.php b/boot.php index 8988777..2aff0b5 100644 --- a/boot.php +++ b/boot.php @@ -258,7 +258,7 @@ function ($a) { } ); $list->setColumnFormat( - 'event_category_id', + 'category_id', 'custom', function ($a) { $_csrf_key = rex_yform_manager_table::get('rex_event_category')->getCSRFKey(); diff --git a/docs/10_forcal_migration.md b/docs/10_forcal_migration.md index 33d3e54..588dbfd 100644 --- a/docs/10_forcal_migration.md +++ b/docs/10_forcal_migration.md @@ -11,7 +11,7 @@ name_1 AS name, teaser_1 AS teaser, text_1 AS description, lang_1 AS lang_id, -category AS event_category_id, +category AS category_id, start_date AS startDate, start_time AS startTime, full_time AS all_day, diff --git a/docs/11_yform_table_manager.md b/docs/11_yform_table_manager.md index e7aa89a..86a1d3b 100644 --- a/docs/11_yform_table_manager.md +++ b/docs/11_yform_table_manager.md @@ -16,7 +16,7 @@ In der Termin-Tabelle werden einzelne Daten festgehalten. Nach der Installation | value | text | name | Name | | validate | empty | name | | | value | textarea | description | Beschreibung | -| value | be_manager_relation | event_category_id | Kategorie | +| value | be_manager_relation | category_id | Kategorie | | value | be_manager_relation | location | Veranstaltungsort | | value | be_media | image | Bild | | value | text | url | URL | diff --git a/install.php b/install.php index bc34710..355da68 100644 --- a/install.php +++ b/install.php @@ -117,7 +117,7 @@ ->ensureColumn(new rex_sql_column('teaser', 'text')) ->ensureColumn(new rex_sql_column('description', 'text')) ->ensureColumn(new rex_sql_column('lang_id', 'int(11)')) -->ensureColumn(new rex_sql_column('event_category_id', 'varchar(191)')) +->ensureColumn(new rex_sql_column('category_id', 'varchar(191)')) ->ensureColumn(new rex_sql_column('startDate', 'date')) ->ensureColumn(new rex_sql_column('all_day', 'tinyint(1)', false, '0')) ->ensureColumn(new rex_sql_column('doorTime', 'time')) diff --git a/install/rex_event.tableset.json b/install/rex_event.tableset.json index 46afa03..26dddf6 100644 --- a/install/rex_event.tableset.json +++ b/install/rex_event.tableset.json @@ -287,7 +287,7 @@ "table": "rex_event_date", "empty_option": "1", "size": "", - "field": "event_category_id", + "field": "category_id", "type": "4", "empty_value": "", "relation_table": "rex_event_date", @@ -451,8 +451,8 @@ "db_type": "varchar(191)", "list_hidden": 0, "search": 1, - "name": "event_category_id", - "label": "translate:event_date_event_category_id", + "name": "category_id", + "label": "translate:event_date_category_id", "not_required": "", "attributes": "", "notice": "", @@ -473,7 +473,7 @@ "db_type": "", "list_hidden": 1, "search": 0, - "name": "event_category_id", + "name": "category_id", "label": "", "not_required": "", "message": "Bitte geben Sie eine Kategorie an." diff --git a/install/rex_url_profile_events_date.sql b/install/rex_url_profile_events_date.sql index 56adadf..ac22e3d 100644 --- a/install/rex_url_profile_events_date.sql +++ b/install/rex_url_profile_events_date.sql @@ -1,4 +1,4 @@ SET NAMES utf8mb4; INSERT INTO `rex_url_generator_profile` (`namespace`, `article_id`, `clang_id`, `ep_pre_save_called`, `table_name`, `table_parameters`, `relation_1_table_name`, `relation_1_table_parameters`, `relation_2_table_name`, `relation_2_table_parameters`, `relation_3_table_name`, `relation_3_table_parameters`, `createdate`, `createuser`, `updatedate`, `updateuser`) VALUES -('event-date-id', 1, 1, 0, '1_xxx_rex_event_date', '{\"column_id\":\"id\",\"column_clang_id\":\"\",\"restriction_1_column\":\"\",\"restriction_1_comparison_operator\":\"=\",\"restriction_1_value\":\"\",\"restriction_2_logical_operator\":\"\",\"restriction_2_column\":\"\",\"restriction_2_comparison_operator\":\"=\",\"restriction_2_value\":\"\",\"restriction_3_logical_operator\":\"\",\"restriction_3_column\":\"\",\"restriction_3_comparison_operator\":\"=\",\"restriction_3_value\":\"\",\"column_segment_part_1\":\"name\",\"column_segment_part_2_separator\":\"\\/\",\"column_segment_part_2\":\"\",\"column_segment_part_3_separator\":\"\\/\",\"column_segment_part_3\":\"\",\"relation_1_column\":\"event_category_id\",\"relation_1_position\":\"BEFORE\",\"relation_2_column\":\"\",\"relation_2_position\":\"BEFORE\",\"relation_3_column\":\"\",\"relation_3_position\":\"BEFORE\",\"append_user_paths\":\"\",\"append_structure_categories\":\"0\",\"column_seo_title\":\"name\",\"column_seo_description\":\"teaser\",\"column_seo_image\":\"image_poster\",\"sitemap_add\":\"1\",\"sitemap_frequency\":\"always\",\"sitemap_priority\":\"1.0\",\"column_sitemap_lastmod\":\"updatedate\"}', 'relation_1_xxx_1_xxx_rex_event_category', '{\"column_id\":\"id\",\"column_clang_id\":\"\",\"column_segment_part_1\":\"name\",\"column_segment_part_2_separator\":\"\\/\",\"column_segment_part_2\":\"\",\"column_segment_part_3_separator\":\"\\/\",\"column_segment_part_3\":\"\"}', '', '[]', '', '[]', NOW(), 'events', NOW(), 'events'); +('event-date-id', 1, 1, 0, '1_xxx_rex_event_date', '{\"column_id\":\"id\",\"column_clang_id\":\"\",\"restriction_1_column\":\"\",\"restriction_1_comparison_operator\":\"=\",\"restriction_1_value\":\"\",\"restriction_2_logical_operator\":\"\",\"restriction_2_column\":\"\",\"restriction_2_comparison_operator\":\"=\",\"restriction_2_value\":\"\",\"restriction_3_logical_operator\":\"\",\"restriction_3_column\":\"\",\"restriction_3_comparison_operator\":\"=\",\"restriction_3_value\":\"\",\"column_segment_part_1\":\"name\",\"column_segment_part_2_separator\":\"\\/\",\"column_segment_part_2\":\"\",\"column_segment_part_3_separator\":\"\\/\",\"column_segment_part_3\":\"\",\"relation_1_column\":\"category_id\",\"relation_1_position\":\"BEFORE\",\"relation_2_column\":\"\",\"relation_2_position\":\"BEFORE\",\"relation_3_column\":\"\",\"relation_3_position\":\"BEFORE\",\"append_user_paths\":\"\",\"append_structure_categories\":\"0\",\"column_seo_title\":\"name\",\"column_seo_description\":\"teaser\",\"column_seo_image\":\"image_poster\",\"sitemap_add\":\"1\",\"sitemap_frequency\":\"always\",\"sitemap_priority\":\"1.0\",\"column_sitemap_lastmod\":\"updatedate\"}', 'relation_1_xxx_1_xxx_rex_event_category', '{\"column_id\":\"id\",\"column_clang_id\":\"\",\"column_segment_part_1\":\"name\",\"column_segment_part_2_separator\":\"\\/\",\"column_segment_part_2\":\"\",\"column_segment_part_3_separator\":\"\\/\",\"column_segment_part_3\":\"\"}', '', '[]', '', '[]', NOW(), 'events', NOW(), 'events'); diff --git a/lang/da_da.lang b/lang/da_da.lang index e18500a..971d720 100644 --- a/lang/da_da.lang +++ b/lang/da_da.lang @@ -123,7 +123,7 @@ event_date_name = Navn event_date_teaser = Teaser event_date_description = Beskrivelse event_date_lang_id = Sprog ID -event_date_event_category_id = Kategori(er) +event_date_category_id = Kategori(er) event_date_startdate = Startdato event_date_all_day = hele dagen? event_date_doortime = Adgangstid diff --git a/lang/de_de.lang b/lang/de_de.lang index 3a15e93..5fc789b 100644 --- a/lang/de_de.lang +++ b/lang/de_de.lang @@ -125,7 +125,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Beschreibung event_date_lang_id = Sprach ID -event_date_event_category_id = Kategorie(n) +event_date_category_id = Kategorie(n) event_date_startdate = Beginn Datum event_date_all_day = ganztägig? event_date_doortime = Einlass-Uhrzeit diff --git a/lang/el_el.lang b/lang/el_el.lang index a4239a3..f57402e 100644 --- a/lang/el_el.lang +++ b/lang/el_el.lang @@ -123,7 +123,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/en_gb.lang b/lang/en_gb.lang index a4239a3..f57402e 100644 --- a/lang/en_gb.lang +++ b/lang/en_gb.lang @@ -123,7 +123,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/es_es.lang b/lang/es_es.lang index ddc55f7..2937a2b 100644 --- a/lang/es_es.lang +++ b/lang/es_es.lang @@ -123,7 +123,7 @@ event_date_name = Nombre event_date_teaser = Teaser event_date_description = Descripción event_date_lang_id = ID de idioma -event_date_event_category_id = Categoría(s) +event_date_category_id = Categoría(s) event_date_startdate = Fecha de inicio event_date_all_day = ¿todo el día? event_date_doortime = Hora de admisión diff --git a/lang/fi_fi.lang b/lang/fi_fi.lang index cff88ae..f8aa633 100644 --- a/lang/fi_fi.lang +++ b/lang/fi_fi.lang @@ -123,7 +123,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/fr_fr.lang b/lang/fr_fr.lang index 03df4a3..48d8765 100644 --- a/lang/fr_fr.lang +++ b/lang/fr_fr.lang @@ -123,7 +123,7 @@ event_date_name = Nom event_date_teaser = Teaser event_date_description = Description event_date_lang_id = ID de langue -event_date_event_category_id = Catégorie(s) +event_date_category_id = Catégorie(s) event_date_startdate = Date de début event_date_all_day = toute la journée? event_date_doortime = Heure d'ouverture diff --git a/lang/it_it.lang b/lang/it_it.lang index f9b7267..2a8a283 100644 --- a/lang/it_it.lang +++ b/lang/it_it.lang @@ -124,7 +124,7 @@ event_date_name = Nome event_date_teaser = Anteprima event_date_description = Descrizione event_date_lang_id = ID lingua -event_date_event_category_id = Categoria(e) +event_date_category_id = Categoria(e) event_date_startdate = Data di inizio event_date_all_day = tutto il giorno? event_date_doortime = Ora di ingresso diff --git a/lang/nl_nl.lang b/lang/nl_nl.lang index 5c18a2b..e9e1a61 100644 --- a/lang/nl_nl.lang +++ b/lang/nl_nl.lang @@ -122,7 +122,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/no_no.lang b/lang/no_no.lang index a4239a3..f57402e 100644 --- a/lang/no_no.lang +++ b/lang/no_no.lang @@ -123,7 +123,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/pl_pl.lang b/lang/pl_pl.lang index 70aba15..942882f 100644 --- a/lang/pl_pl.lang +++ b/lang/pl_pl.lang @@ -123,7 +123,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/ro_ro.lang b/lang/ro_ro.lang index 4e6824e..ba7894e 100644 --- a/lang/ro_ro.lang +++ b/lang/ro_ro.lang @@ -123,7 +123,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/sk_sk.lang b/lang/sk_sk.lang index a4239a3..f57402e 100644 --- a/lang/sk_sk.lang +++ b/lang/sk_sk.lang @@ -123,7 +123,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/sv_se.lang b/lang/sv_se.lang index 7a2d0cb..61c979c 100644 --- a/lang/sv_se.lang +++ b/lang/sv_se.lang @@ -122,7 +122,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lang/tr_tr.lang b/lang/tr_tr.lang index 17a6db9..b655c5f 100644 --- a/lang/tr_tr.lang +++ b/lang/tr_tr.lang @@ -124,7 +124,7 @@ event_date_name = İsim event_date_teaser = Özet event_date_description = Açıklama event_date_lang_id = Dil ID -event_date_event_category_id = Kategori(ler) +event_date_category_id = Kategori(ler) event_date_startdate = Başlangıç Tarihi event_date_all_day = tüm gün? event_date_doortime = Kapı Açılış Saati diff --git a/lang/uk_uk.lang b/lang/uk_uk.lang index 2b77f1d..42f5307 100644 --- a/lang/uk_uk.lang +++ b/lang/uk_uk.lang @@ -122,7 +122,7 @@ event_date_name = Name event_date_teaser = Teaser event_date_description = Description event_date_lang_id = Language ID -event_date_event_category_id = Category(ies) +event_date_category_id = Category(ies) event_date_startdate = Start date event_date_all_day = all day? event_date_doortime = Admission time diff --git a/lib/Category.php b/lib/Category.php index 68f1214..17551e0 100644 --- a/lib/Category.php +++ b/lib/Category.php @@ -239,7 +239,7 @@ public function setUrl(string $url): self */ public function getDateWhere($whereRaw = ''): ?rex_yform_manager_collection { - return Date::query()->joinRelation('event_category_id', 'c')->where('c.id', $this->getId())->whereRaw($whereRaw)->orderBy('startDate', 'ASC')->orderBy('startTime', "ASC")->find(); + return Date::query()->joinRelation('category_id', 'c')->where('c.id', $this->getId())->whereRaw($whereRaw)->orderBy('startDate', 'ASC')->orderBy('startTime', "ASC")->find(); } /** diff --git a/lib/Date.php b/lib/Date.php index 926dc87..7af45c4 100644 --- a/lib/Date.php +++ b/lib/Date.php @@ -105,7 +105,7 @@ public static function generateuuid($id = null) :string */ public function getCategory(): ?Category { - $this->category = Category::get((int)$this->getValue('event_category_id')); + $this->category = Category::get((int)$this->getValue('category_id')); return $this->category; } @@ -132,7 +132,7 @@ public function getCategory(): ?Category */ public function getCategories(): rex_yform_manager_collection { - $this->categories = $this->getRelatedCollection('event_category_id'); + $this->categories = $this->getRelatedCollection('category_id'); return $this->categories; } /** @@ -1142,7 +1142,7 @@ public function getLang() : ?rex_yform_manager_dataset { /* Kategorie(n) */ /** @api */ public function getEventCategory() : ?rex_yform_manager_collection { - return $this->getRelatedCollection("event_category_id"); + return $this->getRelatedCollection("category_id"); } /* Beginn Datum */