Fixed issue #2604 - Broken Edit-button in public KB interface for KB editors.
This commit is contained in:
parent
8b435e2295
commit
9949dd18dc
1 changed files with 5 additions and 3 deletions
|
@ -155,13 +155,15 @@ module KnowledgeBaseHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_kb_link(object)
|
def build_kb_link(object)
|
||||||
|
locale = params.fetch(:locale, object.translation.kb_locale)
|
||||||
|
|
||||||
path = case object
|
path = case object
|
||||||
when KnowledgeBase::Answer
|
when KnowledgeBase::Answer
|
||||||
"knowledge_base/#{object.category.knowledge_base.id}/answer/#{object.id}"
|
"knowledge_base/#{object.category.knowledge_base.id}/locale/#{locale}/answer/#{object.id}/edit"
|
||||||
when KnowledgeBase::Category
|
when KnowledgeBase::Category
|
||||||
"knowledge_base/#{object.knowledge_base.id}/category/#{object.id}"
|
"knowledge_base/#{object.knowledge_base.id}/locale/#{locale}/category/#{object.id}/edit"
|
||||||
when KnowledgeBase
|
when KnowledgeBase
|
||||||
"knowledge_base/#{object.id}"
|
"knowledge_base/#{object.id}/locale/#{locale}/edit"
|
||||||
end
|
end
|
||||||
|
|
||||||
build_zammad_link path
|
build_zammad_link path
|
||||||
|
|
Loading…
Reference in a new issue