From 5fdf2c0055a9da72fbb2d090a03def8dcdbefe13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dzieko=C5=84ski?= Date: Tue, 5 Jul 2022 00:24:08 +0200 Subject: [PATCH] GH-230 Create GalaxyPlanetLink component --- common/_includes.php | 2 ++ .../GalaxyPlanetLink.component.php | 26 +++++++++++++++++++ common/components/GalaxyPlanetLink/index.php | 5 ++++ common/components/index.php | 5 ++++ 4 files changed, 38 insertions(+) create mode 100644 common/components/GalaxyPlanetLink/GalaxyPlanetLink.component.php create mode 100644 common/components/GalaxyPlanetLink/index.php create mode 100644 common/components/index.php diff --git a/common/_includes.php b/common/_includes.php index 7ca0e71b7..183aa41a6 100644 --- a/common/_includes.php +++ b/common/_includes.php @@ -4,6 +4,8 @@ include($includePath . './exceptions.php'); +include($includePath . './components/GalaxyPlanetLink/GalaxyPlanetLink.component.php'); + include($includePath . './modules/uni/utils/isEmailDomainBanned.util.php'); include($includePath . './utils/routing/galaxy.routing.php'); diff --git a/common/components/GalaxyPlanetLink/GalaxyPlanetLink.component.php b/common/components/GalaxyPlanetLink/GalaxyPlanetLink.component.php new file mode 100644 index 000000000..57db16bd2 --- /dev/null +++ b/common/components/GalaxyPlanetLink/GalaxyPlanetLink.component.php @@ -0,0 +1,26 @@ + 'a', + 'contentHTML' => $linkText, + 'attrs' => [ + 'href' => Routing\getGalaxyTargetUrl($props['coords']), + ], + ]); +} + +?> diff --git a/common/components/GalaxyPlanetLink/index.php b/common/components/GalaxyPlanetLink/index.php new file mode 100644 index 000000000..bc99142d1 --- /dev/null +++ b/common/components/GalaxyPlanetLink/index.php @@ -0,0 +1,5 @@ + diff --git a/common/components/index.php b/common/components/index.php new file mode 100644 index 000000000..bc99142d1 --- /dev/null +++ b/common/components/index.php @@ -0,0 +1,5 @@ +