package template import ( "strconv" "git.thomasvoss.com/euro-cash.eu/lib" "git.thomasvoss.com/euro-cash.eu/lib/mintage" ) const muntrolpakketLinkStart = `` var denoms = [...]float64{ 0.01, 0.02, 0.05, 0.10, 0.20, 0.50, 1.00, 2.00, } templ CoinsMintages() { {{ code := ctx.Value("code").(string) data := ctx.Value("mintages").(mintage.Data) ctype := ctx.Value("type").(string) p := ctx.Value("printer").(lib.Printer) }}
@navbar()

{ p.T("Euro Coin Mintages") }

{ p.T("Here you’ll be able to view all the known mintages for all coins. You’ll also be able to filter on country, denomination, etc. If you have any mintage data that’s missing from our site, feel free to contact us.") }


if code == "nl" {

{ p.T("Additional Notes") }

}
@coinTypeRadio(ctype, "circ", p.T("Circulation Coins")) @coinTypeRadio(ctype, "nifc", p.T("NIFC / BU Sets")) @coinTypeRadio(ctype, "proof", p.T("Proof Coins"))
{ p.T("Standard Issue Coins") }
for _, x := range denoms { } for _, row := range data.Standard { for _, col := range row.Mintages[strToCtype(ctype)] { switch col { case mintage.Unknown: case 0: default: } } }
{ p.T("Year") }{ p.Money(x, false) }
if len(row.Mintmark) != 0 { { strconv.Itoa(row.Year) } { row.Mintmark } } else { { strconv.Itoa(row.Year) } } { p.T("Unknown") }{ p.N(col) }
if len(data.Commemorative) != 0 {
{ p.T("Commemorative Coins") }
for _, row := range data.Commemorative { switch row.Mintage[strToCtype(ctype)] { case mintage.Unknown: case 0: default: } }
{ p.T("Year") } { p.T("Commemorated Issue") } { p.T("Mintage") }
if len(row.Mintmark) != 0 { { strconv.Itoa(row.Year) } { row.Mintmark } } else { { strconv.Itoa(row.Year) } } { row.Name }{ p.T("Unknown") }{ p.N(row.Mintage[strToCtype(ctype)]) }
}
} templ coinTypeRadio(ctype, short, long string) { } func strToCtype(s string) int { switch s { case "circ": return mintage.TypeCirc case "nifc": return mintage.TypeNIFC case "proof": return mintage.TypeProof } /* Should never happen, but just incase */ return mintage.TypeCirc }