|
@@ -25,6 +25,7 @@ var (
|
|
"delete": delete,
|
|
"delete": delete,
|
|
"show": show,
|
|
"show": show,
|
|
"all": all,
|
|
"all": all,
|
|
|
|
+ "execute": execute,
|
|
"isSlice": isSlice,
|
|
"isSlice": isSlice,
|
|
"toSlice": toSlice,
|
|
"toSlice": toSlice,
|
|
"string": callString,
|
|
"string": callString,
|
|
@@ -186,6 +187,14 @@ func show(model string, id uint) string {
|
|
return fmt.Sprintf("/%s/%d?%s", plural, id, q)
|
|
return fmt.Sprintf("/%s/%d?%s", plural, id, q)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func execute(model string, id uint) string {
|
|
|
|
+ action := "execute"
|
|
|
|
+ plural := inflection.Plural(strings.ToLower(model))
|
|
|
|
+ q := query("tpl_layout", "base", "tpl_content", fmt.Sprintf("%s_%s", plural, action))
|
|
|
|
+
|
|
|
|
+ return fmt.Sprintf("/%s/%d/%s?%s", plural, id, action, q)
|
|
|
|
+}
|
|
|
|
+
|
|
func update(model string, id uint) string {
|
|
func update(model string, id uint) string {
|
|
action := "update"
|
|
action := "update"
|
|
plural := inflection.Plural(strings.ToLower(model))
|
|
plural := inflection.Plural(strings.ToLower(model))
|