mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Implemented new Userfield type "Link" (references #258)
This commit is contained in:
@@ -20,9 +20,10 @@
|
||||
- Equipment improvements/fixes
|
||||
- Fixed that the delete button not always deleted the currently selected equipment item
|
||||
- Userfield improvements/fixes
|
||||
- New userfield type "Select list" for a list of predefined values where a single or also multiple values can then be selected on the entity object
|
||||
- Fixed that the Userfield type "Preset list" had always the caption "Product group" instead of the configured one (thanks @oncleben31)
|
||||
- New Userfield type "Select list" for a list of predefined values where a single or also multiple values can then be selected on the entity object
|
||||
- New Userfield type "Link" - a single-line-textbox where the content will be rendered as a clickable link
|
||||
- Userfields of type "checkbox" are rendered as a checkmark in tables when checked (instead of "1" as till now)
|
||||
- Fixed that the Userfield type "Preset list" had always the caption "Product group" instead of the configured one (thanks @oncleben31)
|
||||
- General improvements/fixes
|
||||
- Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar)
|
||||
- Boolean settings provided via environment variables (so the strings `true` and `false`) are now parsed correctly (thanks @mduret)
|
||||
|
@@ -38,3 +38,6 @@ msgstr "Select list (a single item can be selected)"
|
||||
|
||||
msgid "preset-checklist"
|
||||
msgstr "Select list (multiple items can be selected)"
|
||||
|
||||
msgid "link"
|
||||
msgstr "Link"
|
||||
|
@@ -38,3 +38,6 @@ msgstr ""
|
||||
|
||||
msgid "preset-checklist"
|
||||
msgstr ""
|
||||
|
||||
msgid "link"
|
||||
msgstr ""
|
||||
|
@@ -13,6 +13,7 @@ class UserfieldsService extends BaseService
|
||||
const USERFIELD_TYPE_CHECKBOX = 'checkbox';
|
||||
const USERFIELD_TYPE_PRESET_LIST = 'preset-list';
|
||||
const USERFIELD_TYPE_PRESET_CHECKLIST = 'preset-checklist';
|
||||
const USERFIELD_TYPE_LINK = 'link';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -10,6 +10,8 @@
|
||||
@if($userfieldObject->value == 1)<i class="fas fa-check"></i>@endif
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_CHECKLIST)
|
||||
{!! str_replace(',', '<br>', $userfieldObject->value) !!}
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_LINK)
|
||||
<a href="{{ $userfieldObject->value }}" target="_blank">{{ $userfieldObject->value }}</a>
|
||||
@else
|
||||
{{ $userfieldObject->value }}
|
||||
@endif
|
||||
|
@@ -93,6 +93,11 @@
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_LINK)
|
||||
<div class="form-group">
|
||||
<label for="name">{{ $userfield->caption }}</label>
|
||||
<input type="link" class="form-control userfield-input" data-userfield-name="{{ $userfield->name }}">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
Reference in New Issue
Block a user