Hide lot document edit segment in view mode
This commit is contained in:
1 parent
683327c240
commit
0d03de8ff2
1 file changed
+3
-2
@@ -300,8 +300,9 @@ function auth_format_lager_quantity(float $value): string
|
||||
|
||||
function auth_render_lager_documents(array $documents, bool $editable, string $scope): string
|
||||
{
|
||||
$segmentState = $editable ? ' sg-card-segment--gray hidden data-lager-edit-documents="' . auth_escape_html($scope) . '"' : '';
|
||||
$html = '<div class="sg-card-segment sg-card-segment--body' . $segmentState . '" data-lager-documents="' . auth_escape_html($scope) . '"><section class="sg-form-sections-card__chapter"><h2 class="sg-strong sg-form-sections-card__chapter-title">Dokumente</h2>';
|
||||
$segmentClass = $editable ? ' sg-card-segment--gray' : '';
|
||||
$segmentState = $editable ? ' hidden data-lager-edit-documents="' . auth_escape_html($scope) . '"' : '';
|
||||
$html = '<div class="sg-card-segment sg-card-segment--body' . $segmentClass . '" data-lager-documents="' . auth_escape_html($scope) . '"' . $segmentState . '><section class="sg-form-sections-card__chapter"><h2 class="sg-strong sg-form-sections-card__chapter-title">Dokumente</h2>';
|
||||
if (!$editable) {
|
||||
$html .= '<div data-lager-documents-read="' . auth_escape_html($scope) . '">';
|
||||
if ($documents === []) {
|
||||
|
||||
Reference in new issue
Block a user