mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2025-10-30 09:45:31 +00:00
Beitragsansicht
This commit is contained in:
@@ -3,6 +3,7 @@ package dbmodels
|
||||
import (
|
||||
"slices"
|
||||
|
||||
"github.com/Theodor-Springmann-Stiftung/musenalm/helpers/datatypes"
|
||||
"golang.org/x/text/collate"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
@@ -41,3 +42,9 @@ func Sort_REntriesSeries_Year(entries []*REntriesSeries, entriesMap map[string]*
|
||||
return ientry.Year() - jentry.Year()
|
||||
})
|
||||
}
|
||||
|
||||
func Sort_Contents_Numbering(contents []*Content) {
|
||||
slices.SortFunc(contents, func(i, j *Content) int {
|
||||
return datatypes.CompareFloat(i.Numbering(), j.Numbering())
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user