diff --git a/viewutil/base.html b/viewutil/base.html
index 64f49fb..0e3e0b0 100644
--- a/viewutil/base.html
+++ b/viewutil/base.html
@@ -26,30 +26,7 @@
- {{block "auth" .}}
-
- {{end}}
+ {{block "auth" .}}{{end}}
diff --git a/viewutil/viewutil.go b/viewutil/viewutil.go
index 08791ca..f0b2aac 100644
--- a/viewutil/viewutil.go
+++ b/viewutil/viewutil.go
@@ -38,11 +38,36 @@ func Init() {
"inc": func(i int) int { return i + 1 },
}).ParseFS(fsys, "base.html")).
Parse(dataText))
- if !cfg.UseAuth {
- m(BaseEn.Parse(`{{define "auth"}}{{end}}`))
+ if cfg.UseAuth {
+ BaseEn = m(BaseEn.Parse(`
+{{define "auth"}}
+
+{{end}}
+`))
}
- if !cfg.AllowRegistration {
- m(BaseEn.Parse(`{{define "registration"}}{{end}}`))
+ if cfg.AllowRegistration {
+ m(BaseEn.Parse(`{{define "registration"}}
+{{if .Meta.U.Group | eq "anon"}}
+ -
+
+ {{block "register" .}}Register{{end}}
+
+
+{{end}}
+{{end}}`))
}
BaseRu = m(m(BaseEn.Clone()).Parse(ruText))
}