diff --git a/src/Settings/SystemSettings/CustomizationSettings.php b/src/Settings/SystemSettings/CustomizationSettings.php index a5f40cdf..623e6187 100644 --- a/src/Settings/SystemSettings/CustomizationSettings.php +++ b/src/Settings/SystemSettings/CustomizationSettings.php @@ -76,4 +76,9 @@ class CustomizationSettings #[Assert\NotBlank()] #[Assert\Unique()] public array $homepageitems = [HomepageItems::SEARCH, HomepageItems::BANNER, HomepageItems::FIRST_STEPS, HomepageItems::LICENSE, HomepageItems::LAST_ACTIVITY]; + + #[SettingsParameter( + label: new TM("settings.system.customization.showVersionOnHomepage") + )] + public bool $showVersionOnHomepage = true; } diff --git a/templates/homepage.html.twig b/templates/homepage.html.twig index 0db7cf17..6e7aa360 100644 --- a/templates/homepage.html.twig +++ b/templates/homepage.html.twig @@ -13,12 +13,14 @@ {% block item_banner %}

{{ vars.partdb_title() }}

-

- {% trans %}version.caption{% endtrans %}: {{ shivas_app_version }} - {% if git_branch is not empty or git_commit is not empty %} - ({{ git_branch ?? '' }}/{{ git_commit ?? '' }}) - {% endif %} -

+ {% if settings_instance('customization').showVersionOnHomepage %} +

+ {% trans %}version.caption{% endtrans %}: {{ shivas_app_version }} + {% if git_branch is not empty or git_commit is not empty %} + ({{ git_branch ?? '' }}/{{ git_commit ?? '' }}) + {% endif %} +

+ {% endif %} {% if banner is not empty %}
diff --git a/translations/messages.en.xlf b/translations/messages.en.xlf index 7e2a816b..b7710f0c 100644 --- a/translations/messages.en.xlf +++ b/translations/messages.en.xlf @@ -13453,5 +13453,11 @@ Please note, that you can not impersonate a disabled user. If you try you will g + + + settings.system.customization.showVersionOnHomepage + Show Part-DB version on homepage + +