diff --git a/app/Services/Features.php b/app/Services/Features.php
index d13542df..510a07d2 100644
--- a/app/Services/Features.php
+++ b/app/Services/Features.php
@@ -106,4 +106,14 @@ public static function isCode4RomaniaSite(): bool
{
return config('website-factory.edition') === 'internal';
}
+
+ /**
+ * Determine if the application is running a government site.
+ *
+ * @return bool
+ */
+ public static function isGovernmentSite(): bool
+ {
+ return config('website-factory.edition') === 'minister';
+ }
}
diff --git a/app/View/Components/Site/BannerGovernment.php b/app/View/Components/Site/BannerGovernment.php
new file mode 100644
index 00000000..46264351
--- /dev/null
+++ b/app/View/Components/Site/BannerGovernment.php
@@ -0,0 +1,28 @@
+text = $text;
+ }
+
+ public function render(): View
+ {
+ return view('components.site.banner-government');
+ }
+
+ public function shouldRender(): bool
+ {
+ return ! config('website-factory.hide_banner') && ! \is_null($this->text);
+ }
+}
diff --git a/app/View/Components/Site/Footer.php b/app/View/Components/Site/Footer.php
index 60ccc2d0..a6f263c3 100644
--- a/app/View/Components/Site/Footer.php
+++ b/app/View/Components/Site/Footer.php
@@ -37,8 +37,8 @@ public function __construct()
public function render(): View
{
- if (config('website-factory.edition') === 'minister') {
- return view('components.site.footer-minister');
+ if (Features::isGovernmentSite()) {
+ return view('components.site.footer-government');
}
return view('components.site.footer');
@@ -52,6 +52,9 @@ public function banner(): ?string
return __('banner.external', [
'edition' => __('banner.edition.' . config('website-factory.edition')),
+ 'organization' => Features::isGovernmentSite()
+ ? 'Code for Romania'
+ : 'Commit Global',
]);
}
}
diff --git a/app/View/Components/Site/Header.php b/app/View/Components/Site/Header.php
index 598221bd..0ea6a645 100644
--- a/app/View/Components/Site/Header.php
+++ b/app/View/Components/Site/Header.php
@@ -44,6 +44,8 @@ public function banner(): ?string
return null;
}
- return __('banner.internal');
+ return __('banner.internal', [
+ 'organization' => 'Commit Global',
+ ]);
}
}
diff --git a/lang/en/banner.php b/lang/en/banner.php
index 6fe5c92c..80932a44 100644
--- a/lang/en/banner.php
+++ b/lang/en/banner.php
@@ -4,8 +4,8 @@
return [
- 'internal' => 'A Commit Global solution.',
- 'external' => 'Website built with Website Factory: :edition, a solution developed by Commit Global.',
+ 'internal' => 'A :organization solution.',
+ 'external' => 'Website built with Website Factory: :edition, a solution developed by :organization.',
'edition' => [
'primarie' => 'Primărie',
diff --git a/lang/ro/banner.php b/lang/ro/banner.php
index 90883911..f7032f42 100644
--- a/lang/ro/banner.php
+++ b/lang/ro/banner.php
@@ -4,8 +4,8 @@
return [
- 'internal' => 'O soluție Commit Global.',
- 'external' => 'Website construit cu Website Factory: :edition, soluție dezvoltată de Commit Global.',
+ 'internal' => 'O soluție :organization.',
+ 'external' => 'Website construit cu Website Factory: :edition, soluție dezvoltată de :organization.',
'edition' => [
'primarie' => 'Primărie',
diff --git a/lang/ru/banner.php b/lang/ru/banner.php
index 1a63d5b8..cc04008c 100644
--- a/lang/ru/banner.php
+++ b/lang/ru/banner.php
@@ -5,7 +5,7 @@
return [
'internal' => 'Продукт Commit Global.',
- 'external' => 'Веб-сайт создан с помощью Website Factory: :edition, решения, разработанного Commit Global.',
+ 'external' => 'Веб-сайт создан с помощью Website Factory: :edition, решения, разработанного :organization.',
'edition' => [
'primarie' => 'Primărie',
diff --git a/lang/uk/banner.php b/lang/uk/banner.php
index 843c67f1..98894ba2 100644
--- a/lang/uk/banner.php
+++ b/lang/uk/banner.php
@@ -4,8 +4,8 @@
return [
- 'internal' => 'Продукт Commit Global.',
- 'external' => 'Веб-сайт, створений за допомогою Website Factory: :edition, рішення, розроблене Commit Global.',
+ 'internal' => 'Продукт :organization.',
+ 'external' => 'Веб-сайт, створений за допомогою Website Factory: :edition, рішення, розроблене :organization.',
'edition' => [
'primarie' => 'Primărie',
diff --git a/resources/views/components/site/banner-government.blade.php b/resources/views/components/site/banner-government.blade.php
new file mode 100644
index 00000000..12a4fa65
--- /dev/null
+++ b/resources/views/components/site/banner-government.blade.php
@@ -0,0 +1,13 @@
+
diff --git a/resources/views/components/site/footer-minister.blade.php b/resources/views/components/site/footer-government.blade.php
similarity index 73%
rename from resources/views/components/site/footer-minister.blade.php
rename to resources/views/components/site/footer-government.blade.php
index 1bff17eb..b4ef0377 100644
--- a/resources/views/components/site/footer-minister.blade.php
+++ b/resources/views/components/site/footer-government.blade.php
@@ -16,7 +16,8 @@
+
© {{ date('Y') }} {{ $title }}