markdown editor, image manager, [ok]

This commit is contained in:
lealife
2015-10-14 18:53:29 +08:00
parent 6a35f98f89
commit 413be4a6d0
7 changed files with 60 additions and 42 deletions

View File

@ -180,6 +180,16 @@ func init() {
return template.HTML(tagStr)
}
// 不用revel的msg
revel.TemplateFuncs["leaMsg"] = func(renderArgs map[string]interface{}, key string) template.HTML {
locale, _ := renderArgs[revel.CurrentLocaleRenderArg].(string)
str := revel.Message(locale, key)
if strings.HasPrefix(str, "???") {
str = key
}
return template.HTML(str);
}
// lea++
revel.TemplateFuncs["blogTagsLea"] = func(renderArgs map[string]interface{}, tags []string, typeStr string) template.HTML {
if tags == nil || len(tags) == 0 {