mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-28 16:45:32 +00:00
Some refinements; anonymous authors
This commit is contained in:
@@ -69,15 +69,9 @@ func PageIcon(iconType string) template.HTML {
|
||||
}
|
||||
}
|
||||
|
||||
// GetPieceURL generates a piece view URL from year, issue number, page, and optional piece ID
|
||||
func GetPieceURL(year, issueNum, page int, pieceID ...string) string {
|
||||
if len(pieceID) > 0 && pieceID[0] != "" && pieceID[0] != "0" {
|
||||
// Use just the piece ID (no year/issue prefix in URL)
|
||||
return "/beitrag/" + pieceID[0]
|
||||
}
|
||||
// Fallback to old format for backward compatibility
|
||||
id := fmt.Sprintf("%d-%03d-%03d", year, issueNum, page)
|
||||
return "/beitrag/" + id
|
||||
// GetPieceURL generates a piece view URL from piece ID
|
||||
func GetPieceURL(pieceID string) string {
|
||||
return "/beitrag/" + pieceID
|
||||
}
|
||||
|
||||
// IssueContext formats an issue reference into a readable context string
|
||||
|
||||
Reference in New Issue
Block a user