Simplify reader header, fix bold/italic rendering, section title label in backend
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,3 +35,4 @@ $GLOBALS['TL_LANG']['tl_survey_content']['mandatoryBadge'] = 'Pflicht';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['inactiveBadge'] = 'inaktiv';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['rangeMaxBelowMin'] = 'Der größte Wert muss mindestens so groß sein wie der kleinste Wert.';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['rangeStepInvalid'] = 'Die Schrittweite muss mindestens 1 sein.';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['sectionTitle'] = ['Titel des Themenbereichs', 'Überschrift, die den folgenden Fragen vorangestellt wird.'];
|
||||
|
||||
@@ -35,3 +35,4 @@ $GLOBALS['TL_LANG']['tl_survey_content']['mandatoryBadge'] = 'mandatory';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['inactiveBadge'] = 'inactive';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['rangeMaxBelowMin'] = 'The largest value must not be smaller than the smallest value.';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['rangeStepInvalid'] = 'The step must be at least 1.';
|
||||
$GLOBALS['TL_LANG']['tl_survey_content']['sectionTitle'] = ['Title of the topic section', 'Heading shown above the following questions.'];
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
>
|
||||
<span class="survey-accordion-heading">
|
||||
{% if isSection %}
|
||||
<span class="survey-accordion-index survey-accordion-index--section" aria-hidden="true">§</span>
|
||||
<span class="survey-accordion-copy">
|
||||
<span class="survey-section-kicker">{{ 'survey.edit.section_badge'|trans }}</span>
|
||||
<strong>{{ question.question|striptags|trim ?: ('survey.edit.section_fallback'|trans) }}</strong>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<div class="survey-meta">
|
||||
<h3>{{ survey.title|striptags|trim }}</h3>
|
||||
{% if isPreview %}<span class="survey-badge warning">{{ 'survey.survey.preview_badge'|trans }}</span>{% endif %}
|
||||
{% if progress.total > 0 %}<span class="survey-badge neutral">{{ progress.current }}/{{ progress.total }}</span>{% endif %}
|
||||
</div>
|
||||
|
||||
{# Der Einleitungstext erscheint nur auf der ersten Seite. #}
|
||||
@@ -59,12 +58,10 @@
|
||||
<article class="survey-card">
|
||||
{% if progress.sectionTitle %}
|
||||
<div class="survey-section-context">
|
||||
<span class="survey-section-kicker">{{ 'survey.survey.section_kicker'|trans({'%number%': progress.sectionNumber, '%count%': progress.sectionCount}) }}</span>
|
||||
<strong>{{ progress.sectionTitle }}</strong>
|
||||
<span class="survey-section-counter">{{ 'survey.survey.section_progress'|trans({'%current%': progress.sectionCurrent, '%total%': progress.sectionTotal, '%section%': progress.sectionTitle}) }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="survey-meta"><span class="survey-badge neutral">{{ 'survey.survey.overall_progress'|trans({'%current%': progress.current, '%total%': progress.total}) }}</span></div>
|
||||
<h3>{{ question.question|striptags|trim }}</h3>
|
||||
{% if question.description|survey_has_text %}<div class="survey-rich-text">{{ question.description|survey_rich }}</div>{% endif %}
|
||||
|
||||
|
||||
@@ -1288,9 +1288,17 @@
|
||||
.survey-section-context {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 0.35rem 0.9rem;
|
||||
margin-bottom: 0.5rem;
|
||||
gap: 0.35rem 1rem;
|
||||
margin-bottom: 0.75rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid rgba(162, 168, 180, 0.3);
|
||||
}
|
||||
|
||||
.survey-section-context .survey-section-counter {
|
||||
margin-left: auto;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.survey-section-context .survey-section-kicker {
|
||||
@@ -1326,3 +1334,18 @@
|
||||
.survey-results-section-head .survey-section-kicker {
|
||||
margin-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
/* --- Rich-Text: Fett/Kursiv explizit (die globale font-style-Rückstellung der Shell überschreiben) --- */
|
||||
.survey-shell .survey-rich-text strong,
|
||||
.survey-shell .survey-rich-text b,
|
||||
.survey-shell .ql-editor strong,
|
||||
.survey-shell .ql-editor b {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.survey-shell .survey-rich-text em,
|
||||
.survey-shell .survey-rich-text i,
|
||||
.survey-shell .ql-editor em,
|
||||
.survey-shell .ql-editor i {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -430,6 +430,10 @@ final class SurveyDcaListener
|
||||
$type = (string) Input::post('type');
|
||||
}
|
||||
|
||||
if (SurveyQuestionRepository::TYPE_SECTION === $type) {
|
||||
$GLOBALS['TL_DCA']['tl_survey_content']['fields']['question']['label'] = &$GLOBALS['TL_LANG']['tl_survey_content']['sectionTitle'];
|
||||
}
|
||||
|
||||
return match ($type) {
|
||||
'range' => (string) ($GLOBALS['TL_DCA']['tl_survey_content']['palettes']['range'] ?? $palette),
|
||||
'text' => (string) ($GLOBALS['TL_DCA']['tl_survey_content']['palettes']['text'] ?? $palette),
|
||||
|
||||
Reference in New Issue
Block a user