Allow to hide the version number on homepage

This commit is contained in:
Jan Böhmer 2025-09-07 19:43:23 +02:00
parent 4b00697f02
commit cee6d355e8
3 changed files with 19 additions and 6 deletions

View file

@ -76,4 +76,9 @@ class CustomizationSettings
#[Assert\NotBlank()] #[Assert\NotBlank()]
#[Assert\Unique()] #[Assert\Unique()]
public array $homepageitems = [HomepageItems::SEARCH, HomepageItems::BANNER, HomepageItems::FIRST_STEPS, HomepageItems::LICENSE, HomepageItems::LAST_ACTIVITY]; 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;
} }

View file

@ -13,12 +13,14 @@
{% block item_banner %} {% block item_banner %}
<div class="rounded p-4 bg-body-secondary"> <div class="rounded p-4 bg-body-secondary">
<h1 class="display-3">{{ vars.partdb_title() }}</h1> <h1 class="display-3">{{ vars.partdb_title() }}</h1>
<h4> {% if settings_instance('customization').showVersionOnHomepage %}
{% trans %}version.caption{% endtrans %}: {{ shivas_app_version }} <h4>
{% if git_branch is not empty or git_commit is not empty %} {% trans %}version.caption{% endtrans %}: {{ shivas_app_version }}
({{ git_branch ?? '' }}/{{ git_commit ?? '' }}) {% if git_branch is not empty or git_commit is not empty %}
{% endif %} ({{ git_branch ?? '' }}/{{ git_commit ?? '' }})
</h4> {% endif %}
</h4>
{% endif %}
{% if banner is not empty %} {% if banner is not empty %}
<hr> <hr>
<div class="latex" data-controller="common--latex"> <div class="latex" data-controller="common--latex">

View file

@ -13453,5 +13453,11 @@ Please note, that you can not impersonate a disabled user. If you try you will g
<target><![CDATA[The items to show at the homepage. Order can be changed via drag & drop.]]></target> <target><![CDATA[The items to show at the homepage. Order can be changed via drag & drop.]]></target>
</segment> </segment>
</unit> </unit>
<unit id="CYw3_pS" name="settings.system.customization.showVersionOnHomepage">
<segment>
<source>settings.system.customization.showVersionOnHomepage</source>
<target>Show Part-DB version on homepage</target>
</segment>
</unit>
</file> </file>
</xliff> </xliff>