mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
BUGFIX: array initialization syntax in issues.go
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package xmlprovider
|
package xmlprovider
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@@ -48,6 +47,8 @@ func Sort[T XMLItem](i, j T) int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int_b, err := strconv.Atoi(sort_b[i])
|
int_b, err := strconv.Atoi(sort_b[i])
|
||||||
|
if err != nil {
|
||||||
|
|
||||||
if item < sort_b[i] {
|
if item < sort_b[i] {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
{{ $date := .model.Datum.When }}
|
{{ $date := .model.Datum.When }}
|
||||||
<div>
|
<div>
|
||||||
<a href="/{{- $date.Year -}}">
|
<a href="/{{- $date.Year -}}">
|
||||||
Zurück zum Jahr
|
Zum Jahr
|
||||||
{{ $date.Year }}
|
{{ $date.Year }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div>
|
<div class="flex flex-row gap-x-2">
|
||||||
{{ if $model.Prev }}
|
{{ if $model.Prev }}
|
||||||
<a href="/{{- $model.Prev.Datum.When.Year -}}/{{- $model.Prev.Number.No -}}">
|
<a href="/{{- $model.Prev.Datum.When.Year -}}/{{- $model.Prev.Number.No -}}">
|
||||||
← Zurück
|
← Zurück
|
||||||
|
|||||||
@@ -34,11 +34,7 @@ func (i Issue) Name() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (i Issue) Keys() []string {
|
func (i Issue) Keys() []string {
|
||||||
if len(i.keys) > 0 {
|
res := make([]string, 0, 2)
|
||||||
return i.keys
|
|
||||||
}
|
|
||||||
|
|
||||||
res := make([]string, 2)
|
|
||||||
res = append(res, i.Reference())
|
res = append(res, i.Reference())
|
||||||
|
|
||||||
date := i.Datum.When.String()
|
date := i.Datum.When.String()
|
||||||
@@ -46,8 +42,6 @@ func (i Issue) Keys() []string {
|
|||||||
res = append(res, date)
|
res = append(res, date)
|
||||||
}
|
}
|
||||||
|
|
||||||
i.keys = res
|
|
||||||
|
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user