mirror of
https://github.com/documize/community.git
synced 2025-07-21 06:09:42 +02:00
sidebar position
This commit is contained in:
parent
9e20a5f085
commit
d45aa70157
3 changed files with 7 additions and 6 deletions
|
@ -748,7 +748,9 @@ func (h *Handler) GetMeta(w http.ResponseWriter, r *http.Request) {
|
||||||
meta, err := h.Store.Page.GetPageMeta(ctx, pageID)
|
meta, err := h.Store.Page.GetPageMeta(ctx, pageID)
|
||||||
if err == sql.ErrNoRows {
|
if err == sql.ErrNoRows {
|
||||||
response.WriteNotFoundError(w, method, pageID)
|
response.WriteNotFoundError(w, method, pageID)
|
||||||
h.Runtime.Log.Error(method, err)
|
h.Runtime.Log.Info(method + " no record")
|
||||||
|
meta = page.Meta{}
|
||||||
|
response.WriteJSON(w, meta)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -278,7 +278,8 @@ func (s Scope) Documents(ctx domain.RequestContext, keywords string) (results []
|
||||||
keywords = strings.Replace(keywords, " ", "", -1)
|
keywords = strings.Replace(keywords, " ", "", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
keywords = strings.ToLower(strings.TrimSpace(keywords))
|
keywords = strings.TrimSpace(keywords)
|
||||||
|
// keywords = strings.ToLower(keywords)
|
||||||
|
|
||||||
if len(keywords) > 0 {
|
if len(keywords) > 0 {
|
||||||
keywordQuery = "AND MATCH(pagetitle,body) AGAINST('" + keywords + "' in boolean mode)"
|
keywordQuery = "AND MATCH(pagetitle,body) AGAINST('" + keywords + "' in boolean mode)"
|
||||||
|
@ -292,8 +293,6 @@ func (s Scope) Documents(ctx domain.RequestContext, keywords string) (results []
|
||||||
(SELECT refid from label WHERE orgid=? AND type=2 AND userid=?
|
(SELECT refid from label WHERE orgid=? AND type=2 AND userid=?
|
||||||
UNION ALL SELECT refid FROM label a where orgid=? AND type=1 AND refid IN (SELECT labelid from labelrole WHERE orgid=? AND userid='' AND (canedit=1 OR canview=1))
|
UNION ALL SELECT refid FROM label a where orgid=? AND type=1 AND refid IN (SELECT labelid from labelrole WHERE orgid=? AND userid='' AND (canedit=1 OR canview=1))
|
||||||
UNION ALL SELECT refid FROM label a where orgid=? AND type=3 AND refid IN (SELECT labelid from labelrole WHERE orgid=? AND userid=? AND (canedit=1 OR canview=1))) ` + keywordQuery
|
UNION ALL SELECT refid FROM label a where orgid=? AND type=3 AND refid IN (SELECT labelid from labelrole WHERE orgid=? AND userid=? AND (canedit=1 OR canview=1))) ` + keywordQuery
|
||||||
// AND MATCH(pagetitle,body)
|
|
||||||
// AGAINST('` + keywords + "' in boolean mode)"
|
|
||||||
|
|
||||||
err = s.Runtime.Db.Select(&results,
|
err = s.Runtime.Db.Select(&results,
|
||||||
sql,
|
sql,
|
||||||
|
|
|
@ -104,7 +104,7 @@ export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
|
||||||
target: $(".delete-attachment-" + id)[0],
|
target: $(".delete-attachment-" + id)[0],
|
||||||
content: $(".delete-attachment-dialog")[0],
|
content: $(".delete-attachment-dialog")[0],
|
||||||
classes: 'drop-theme-basic',
|
classes: 'drop-theme-basic',
|
||||||
position: "bottom right",
|
position: "bottom left",
|
||||||
openOn: "always",
|
openOn: "always",
|
||||||
tetherOptions: {
|
tetherOptions: {
|
||||||
offset: "5px 0",
|
offset: "5px 0",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue