forked from x/ContextOS
fix wiki bug
Change-Id: Ieaa79c89007739f8292e03f93c93965f5468acdd
This commit is contained in:
parent
89bffe8ea4
commit
8ec00f1002
@ -1000,7 +1000,7 @@ func (m *Message) Table(cbs ...interface{}) *Message {
|
||||
return m
|
||||
}
|
||||
func (m *Message) Sort(key string, arg ...string) *Message {
|
||||
cmp := "string"
|
||||
cmp := "str"
|
||||
if len(arg) > 0 {
|
||||
cmp = arg[0]
|
||||
}
|
||||
|
@ -244,13 +244,10 @@ var Index = &ctx.Context{Name: "code", Help: "代码中心",
|
||||
}
|
||||
}
|
||||
|
||||
m.Log("fuck", "what %v", p)
|
||||
if _, e = os.Stat(p); e != nil {
|
||||
list := strings.Split(key, "/")
|
||||
m.Log("fuck", "what %v", list)
|
||||
p = m.Cmdx("nfs.path", m.Conf("upgrade", []string{"file", list[len(list)-1]}))
|
||||
}
|
||||
m.Log("fuck", "what %v", p)
|
||||
|
||||
m.Log("info", "upgrade %s %s", p, m.Cmdx("aaa.hash", "file", p))
|
||||
http.ServeFile(m.Optionv("response").(http.ResponseWriter), m.Optionv("request").(*http.Request), p)
|
||||
|
@ -21,29 +21,29 @@ var Index = &ctx.Context{Name: "wiki", Help: "文档中心",
|
||||
Configs: map[string]*ctx.Config{
|
||||
"wiki_dir": &ctx.Config{Name: "wiki_dir", Value: "usr/wiki", Help: "路由数量"},
|
||||
"wiki_favor": &ctx.Config{Name: "wiki_favor", Value: "lamp.md", Help: "路由数量"},
|
||||
"wiki_list": &ctx.Config{Name: "wiki_list", Value: []interface{}{}, Help: "路由数量"},
|
||||
|
||||
"wiki_list": &ctx.Config{Name: "wiki_list", Value: []interface{}{}, Help: "路由数量"},
|
||||
"wiki_list_show": &ctx.Config{Name: "wiki_list_show", Value: map[string]interface{}{
|
||||
"md": true,
|
||||
}, Help: "路由数量"},
|
||||
"bench_disable": &ctx.Config{Name: "bench_disable", Value: "true", Help: "工作流"},
|
||||
"login_right": &ctx.Config{Name: "login_right", Value: "1", Help: "默认组件"},
|
||||
|
||||
"bench_disable": &ctx.Config{Name: "bench_disable", Value: "true", Help: "工作流"},
|
||||
"login_right": &ctx.Config{Name: "login_right", Value: "1", Help: "默认组件"},
|
||||
"componet_group": &ctx.Config{Name: "component_group", Value: "index", Help: "默认组件"},
|
||||
"componet": &ctx.Config{Name: "componet", Value: map[string]interface{}{
|
||||
"index": []interface{}{
|
||||
map[string]interface{}{"componet_name": "head", "template": "head"},
|
||||
map[string]interface{}{"componet_name": "header", "template": "header"},
|
||||
map[string]interface{}{"componet_name": "list", "template": "list",
|
||||
map[string]interface{}{"name": "head", "template": "head"},
|
||||
map[string]interface{}{"name": "header", "template": "header"},
|
||||
map[string]interface{}{"name": "list", "template": "list",
|
||||
"componet_ctx": "web.wiki", "componet_cmd": "wiki_list", "arguments": []interface{}{"h2", "int_r"},
|
||||
"pre_run": true,
|
||||
},
|
||||
map[string]interface{}{"componet_name": "text", "template": "text",
|
||||
map[string]interface{}{"name": "text", "template": "text",
|
||||
"componet_ctx": "web.wiki", "componet_cmd": "wiki_body", "arguments": []interface{}{"@wiki_favor"},
|
||||
"pre_run": true,
|
||||
},
|
||||
map[string]interface{}{"componet_name": "footer", "template": "footer"},
|
||||
map[string]interface{}{"componet_name": "tail", "template": "tail"},
|
||||
map[string]interface{}{"name": "footer", "template": "footer"},
|
||||
map[string]interface{}{"name": "tail", "template": "tail"},
|
||||
},
|
||||
}, Help: "组件列表"},
|
||||
},
|
||||
|
@ -213,7 +213,7 @@ footer .title {
|
||||
{{end}}
|
||||
|
||||
{{define "tail"}}
|
||||
<script src="/librarys/context.js"></script>
|
||||
<script src="/librarys/wiki.js"></script>
|
||||
<script src="/static/librarys/context.js"></script>
|
||||
<script src="/static/librarys/wiki.js"></script>
|
||||
</body>
|
||||
{{end}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user