Skip to content

Commit 18c602a

Browse files
committed
Introduced new sub categories frontend:tab and frontent:sidebar. Changed categories for related modules, fixed #45
1 parent 1aeac18 commit 18c602a

3 files changed

Lines changed: 44 additions & 38 deletions

File tree

src/Configuration/ModuleUpdateServiceConfiguration.php

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,29 @@ class ModuleUpdateServiceConfiguration
7171

7272

7373
//Categories for custom modules
74-
public const CATEGORY = 'category';
75-
public const CATEGORY_ADMIN = 'admin';
76-
public const CATEGORY_CHARTS = 'charts';
77-
public const CATEGORY_CLIPPINGS_CART = 'clippings_cart';
78-
public const CATEGORY_DATA_VALIDATION = 'data_validation';
79-
public const CATEGORY_FACT = 'fact';
80-
public const CATEGORY_FOOTER = 'footer';
81-
public const CATEGORY_FRONTEND = 'frontend';
82-
public const CATEGORY_GEDCOM = 'gedcom';
83-
public const CATEGORY_LANGUAGE = 'language';
84-
public const CATEGORY_MAP = 'maps';
85-
public const CATEGORY_MEDIA = 'media';
86-
public const CATEGORY_MENU = 'menu';
87-
public const CATEGORY_MESSAGES = 'messages';
88-
public const CATEGORY_NONE = 'none';
89-
public const CATEGORY_PLACES = 'places';
90-
public const CATEGORY_REPORTS = 'reports';
91-
public const CATEGORY_SIGNIN = 'signin';
92-
public const CATEGORY_SOURCES = 'sources';
93-
public const CATEGORY_TAGS = 'tags';
94-
public const CATEGORY_THEME = 'theme';
74+
public const CATEGORY = 'category';
75+
public const CATEGORY_ADMIN = 'admin';
76+
public const CATEGORY_CHARTS = 'charts';
77+
public const CATEGORY_CLIPPINGS_CART = 'clippings_cart';
78+
public const CATEGORY_DATA_VALIDATION = 'data_validation';
79+
public const CATEGORY_FACT = 'fact';
80+
public const CATEGORY_FOOTER = 'footer';
81+
public const CATEGORY_FRONTEND = 'frontend';
82+
public const CATEGORY_FRONTEND_TAB = 'frontend_tab';
83+
public const CATEGORY_FRONTEND_SIDEBAR = 'frontend_sidebar';
84+
public const CATEGORY_GEDCOM = 'gedcom';
85+
public const CATEGORY_LANGUAGE = 'language';
86+
public const CATEGORY_MAP = 'maps';
87+
public const CATEGORY_MEDIA = 'media';
88+
public const CATEGORY_MENU = 'menu';
89+
public const CATEGORY_MESSAGES = 'messages';
90+
public const CATEGORY_NONE = 'none';
91+
public const CATEGORY_PLACES = 'places';
92+
public const CATEGORY_REPORTS = 'reports';
93+
public const CATEGORY_SIGNIN = 'signin';
94+
public const CATEGORY_SOURCES = 'sources';
95+
public const CATEGORY_TAGS = 'tags';
96+
public const CATEGORY_THEME = 'theme';
9597

9698

9799
//The configuration for the module update services
@@ -108,7 +110,7 @@ class ModuleUpdateServiceConfiguration
108110
'_webtrees-api_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'Jefferson49/webtrees-API', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_ADMIN]],
109111

110112
'_jc-fancy-imagebar_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'JustCarmen/webtrees-fancy-imagebar', self::CATEGORY => self::CATEGORY_FRONTEND]],
111-
'_jc-fancy-research-links_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'JustCarmen/webtrees-fancy-research-links', self::CATEGORY => self::CATEGORY_FRONTEND]],
113+
'_jc-fancy-research-links_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'JustCarmen/webtrees-fancy-research-links', self::CATEGORY => self::CATEGORY_FRONTEND_SIDEBAR]],
112114
'_jc-fancy-treeview_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'JustCarmen/webtrees-fancy-treeview', self::CATEGORY => self::CATEGORY_FRONTEND]],
113115
'_jc-theme-justlight_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'JustCarmen/webtrees-theme-justlight', 'is_theme' => true, self::CATEGORY => self::CATEGORY_THEME]],
114116
'_jc-simple-footer_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'JustCarmen/webtrees-simple-footer', self::CATEGORY => self::CATEGORY_FOOTER]],
@@ -139,18 +141,18 @@ class ModuleUpdateServiceConfiguration
139141
'_vesta_clippings_cart_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_clippings_cart', self::CATEGORY => self::CATEGORY_CLIPPINGS_CART]],
140142
'_vesta_common_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_common', self::CATEGORY => self::CATEGORY_NONE]],
141143
'_vesta_extended_relationships_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_extended_relationships', self::CATEGORY => self::CATEGORY_CHARTS]],
142-
'_vesta_personal_facts_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_personal_facts', self::CATEGORY => self::CATEGORY_FRONTEND]],
143-
'_vesta_relatives_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_relatives', self::CATEGORY => self::CATEGORY_FRONTEND]],
144+
'_vesta_personal_facts_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_personal_facts', self::CATEGORY => self::CATEGORY_FRONTEND_TAB]],
145+
'_vesta_relatives_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_relatives', self::CATEGORY => self::CATEGORY_FRONTEND_TAB]],
144146
'_vesta_gov4webtrees_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_gov4webtrees', self::CATEGORY => self::CATEGORY_PLACES]],
145147
'_vesta_places_and_pedigree_map_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_places_and_pedigree_map', self::CATEGORY => self::CATEGORY_PLACES]],
146148
'_vesta_research_suggestions_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_research_suggestions', self::CATEGORY => self::CATEGORY_SOURCES]],
147149
'_vesta_shared_places_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_shared_places', self::CATEGORY => self::CATEGORY_PLACES]],
148150
'_vesta_location_data_' => ['update_service' => 'VestaModuleUpdate', 'params' => ['github_repo' => 'vesta-webtrees-2-custom-modules/vesta_location_data', self::CATEGORY => self::CATEGORY_PLACES]],
149151

150-
'_sosa20_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'gustine/sosa20', self::CATEGORY => self::CATEGORY_FRONTEND]],
152+
'_sosa20_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'gustine/sosa20', self::CATEGORY => self::CATEGORY_FRONTEND_SIDEBAR]],
151153
'_gustine-history22_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'gustine/gustine-history22', 'no_release' => true, 'default_branch' => 'master', self::CATEGORY => self::CATEGORY_FACT]],
152154

153-
'_hh_extended_family_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'hartenthaler/hh_extended_family', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_FRONTEND]],
155+
'_hh_extended_family_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'hartenthaler/hh_extended_family', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_FRONTEND_TAB]],
154156
'_hh_legal_notice_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'hartenthaler/hh_legal_notice', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_FOOTER]],
155157
'_german-chancellors-presidents_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'hartenthaler/german-chancellors-presidents', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_FACT]],
156158
'_german-wars-battles-worldwide_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'hartenthaler/german-wars-battles-worldwide', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_FACT]],
@@ -165,7 +167,7 @@ class ModuleUpdateServiceConfiguration
165167

166168
'_topola_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'PeWu/topola-webtrees', self::CATEGORY => self::CATEGORY_CHARTS]],
167169

168-
'_mitalteli-show-xref_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'elysch/webtrees-mitalteli-show-xref', self::CATEGORY => self::CATEGORY_FRONTEND]],
170+
'_mitalteli-show-xref_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'elysch/webtrees-mitalteli-show-xref', self::CATEGORY => self::CATEGORY_FRONTEND_SIDEBAR]],
169171
'_mitalteli-chart-family-book_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'elysch/webtrees-mitalteli-chart-family-book', self::CATEGORY => self::CATEGORY_CHARTS]],
170172
'_mitalteli-report-researchtasks_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'elysch/webtrees-mitalteli-report-researchtasks', self::CATEGORY => self::CATEGORY_REPORTS]],
171173

@@ -186,15 +188,15 @@ class ModuleUpdateServiceConfiguration
186188

187189
'_finnish-historical-facts_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'ardhtu/finnish-historical-facts', 'no_release' => true, 'default_branch' => 'master', self::CATEGORY => self::CATEGORY_FACT]],
188190

189-
'_fam-nav-parents-last_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'tronsmit/fam-nav-parents-last', 'no_release' => true, 'default_branch' => 'main', self::CATEGORY => self::CATEGORY_FRONTEND]],
191+
'_fam-nav-parents-last_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'tronsmit/fam-nav-parents-last', 'no_release' => true, 'default_branch' => 'main', self::CATEGORY => self::CATEGORY_FRONTEND_SIDEBAR]],
190192

191193
'_linkenhancer_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'bschwede/linkenhancer', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_FRONTEND]],
192194

193195
'_polish-historic-events_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'p-ja/polish-historic-events', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_FACT]],
194196

195197
'_WeEt-main_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => '08ah15/WeEt', 'no_release' => true, 'default_branch' => 'main', self::CATEGORY => self::CATEGORY_SOURCES]],
196198

197-
'_vytux_cousins_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'vytux-com/vytux_cousins', self::CATEGORY => self::CATEGORY_FRONTEND]],
199+
'_vytux_cousins_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'vytux-com/vytux_cousins', self::CATEGORY => self::CATEGORY_FRONTEND_TAB]],
198200

199201
'_svajana-master_' => ['update_service' => 'GithubModuleUpdate', 'params' => ['github_repo' => 'baskar-yahoo/webtrees-svajana', 'no_release' => true, 'default_branch' => 'master', 'tag_prefix' => 'v', self::CATEGORY => self::CATEGORY_THEME]],
200202

src/Configuration/module_update_service_configuration.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"update_service": "GithubModuleUpdate",
9393
"params": {
9494
"github_repo": "JustCarmen\/webtrees-fancy-research-links",
95-
"category": "frontend",
95+
"category": "frontend_sidebar",
9696
"title": "Fancy Research Links",
9797
"description": "A sidebar tool to provide quick links to popular research web sites."
9898
}
@@ -101,7 +101,7 @@
101101
"update_service": "GithubModuleUpdate",
102102
"params": {
103103
"github_repo": "JustCarmen\/webtrees-fancy-treeview",
104-
"category": "charts",
104+
"category": "frontend",
105105
"title": "Fancy Treeview",
106106
"description": "A narrative overview of the descendants or ancestors of one family (branch)."
107107
}
@@ -332,7 +332,7 @@
332332
"update_service": "VestaModuleUpdate",
333333
"params": {
334334
"github_repo": "vesta-webtrees-2-custom-modules\/vesta_personal_facts",
335-
"category": "frontend",
335+
"category": "frontend_tab",
336336
"title": "\u26b6 Vesta Facts and events",
337337
"description": "A tab showing the facts and events of an individual. Replacement for the original 'Facts and events' module. Also extends facts and events on the family page. Also provides additional map links."
338338
}
@@ -341,7 +341,7 @@
341341
"update_service": "VestaModuleUpdate",
342342
"params": {
343343
"github_repo": "vesta-webtrees-2-custom-modules\/vesta_relatives",
344-
"category": "frontend",
344+
"category": "frontend_tab",
345345
"title": "\u26b6 Vesta Families",
346346
"description": "A tab showing the close relatives of an individual. Replacement for the original 'Families' module."
347347
}
@@ -395,7 +395,7 @@
395395
"update_service": "GithubModuleUpdate",
396396
"params": {
397397
"github_repo": "gustine\/sosa20",
398-
"category": "frontend",
398+
"category": "frontend_sidebar",
399399
"title": "Sosa-Stradonitz (Ahnentafel)",
400400
"description": "A sidebar showing Sosa-Stradonitz number of individuals."
401401
}
@@ -416,7 +416,7 @@
416416
"params": {
417417
"github_repo": "hartenthaler\/hh_extended_family",
418418
"tag_prefix": "v",
419-
"category": "frontend",
419+
"category": "frontend_tab",
420420
"title": "Extended family",
421421
"description": "A tab showing the extended family of an individual."
422422
}
@@ -515,7 +515,7 @@
515515
"update_service": "GithubModuleUpdate",
516516
"params": {
517517
"github_repo": "elysch\/webtrees-mitalteli-show-xref",
518-
"category": "frontend",
518+
"category": "frontend_sidebar",
519519
"title": "XREF and UID values module.",
520520
"description": "A sidebar to show XREF and UID values."
521521
}
@@ -667,7 +667,7 @@
667667
"github_repo": "tronsmit\/fam-nav-parents-last",
668668
"no_release": true,
669669
"default_branch": "main",
670-
"category": "frontend",
670+
"category": "frontend_sidebar",
671671
"title": "Family navigator - show parent families last",
672672
"description": "Family navigator - show parent families last"
673673
}
@@ -707,7 +707,7 @@
707707
"update_service": "GithubModuleUpdate",
708708
"params": {
709709
"github_repo": "vytux-com\/vytux_cousins",
710-
"category": "frontend",
710+
"category": "frontend_tab",
711711
"title": "Cousins",
712712
"description": "A tab showing cousins of an individual."
713713
}

src/ModuleUpdates/AbstractModuleUpdate.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ public function getCategory(): string {
153153
return MoreI18N::xlate('Footer');
154154
case ModuleUpdateServiceConfiguration::CATEGORY_FRONTEND:
155155
return I18N::translate('Frontend');
156+
case ModuleUpdateServiceConfiguration::CATEGORY_FRONTEND_TAB:
157+
return I18N::translate('Frontend') . ' ' . MoreI18N::xlate('Tab');
158+
case ModuleUpdateServiceConfiguration::CATEGORY_FRONTEND_SIDEBAR:
159+
return I18N::translate('Frontend') . ' ' . MoreI18N::xlate('Sidebar');
156160
case ModuleUpdateServiceConfiguration::CATEGORY_GEDCOM:
157161
return MoreI18N::xlate('GEDCOM');
158162
case ModuleUpdateServiceConfiguration::CATEGORY_LANGUAGE:

0 commit comments

Comments
 (0)