Bug fix, über Präferenz hinazs besetzen

This commit is contained in:
concierge committed 2026-11-19 15:57:06 +01:00
1 parent a5d4251868
commit 4b88aca958
9 files changed
+162 -48

No files matched your search

+7 -5
View File
@@ -291,7 +291,7 @@ func FullPlan(w io.Writer, r domain.DayRange, rows []domain.DayPlanRow, churches
columns = columns[:4]
}
drawHeader := func() {
drawHeader := func(showTitle bool) {
setColor(pdf, colors.accent)
pdf.SetFont("Helvetica", "B", 6.4)
pdf.SetXY(margin, margin)
@@ -299,8 +299,10 @@ func FullPlan(w io.Writer, r domain.DayRange, rows []domain.DayPlanRow, churches
setColor(pdf, colors.ink)
pdf.SetFont("Times", "B", 15.5)
pdf.SetXY(margin, margin+4.6)
pdf.CellFormat(150, 7, tr("Gottesdienstplan"), "", 0, "L", false, 0, "")
if showTitle {
pdf.SetXY(margin, margin+4.6)
pdf.CellFormat(150, 7, tr("Gottesdienstplan"), "", 0, "L", false, 0, "")
}
setColor(pdf, colors.secondary)
pdf.SetFont("Helvetica", "", 8.2)
@@ -370,7 +372,7 @@ func FullPlan(w io.Writer, r domain.DayRange, rows []domain.DayPlanRow, churches
}
pdf.AddPage()
drawHeader()
drawHeader(true)
drawColumnHeader()
page := 1
y := contentTop
@@ -388,7 +390,7 @@ func FullPlan(w io.Writer, r domain.DayRange, rows []domain.DayPlanRow, churches
drawFooter(page)
page++
pdf.AddPage()
drawHeader()
drawHeader(false)
drawColumnHeader()
y = contentTop
}
+3
View File
@@ -222,6 +222,9 @@ func TestFullPlanPaginatesWithTotalPageCount(t *testing.T) {
if strings.Contains(content, "Fortsetzung") {
t.Fatal("continuation title must not appear on later pages")
}
if got := strings.Count(content, "Gottesdienstplan"); got != 1 {
t.Fatalf("large title appears %d times, want only on the first page", got)
}
match := regexp.MustCompile(`Seite 1 von (\d+)`).FindStringSubmatch(content)
if match == nil {
t.Fatalf("first page footer is missing the total page count:\n%s", content)