diff --git a/app/assets/javascripts/app/controllers/knowledge_base/search_item.coffee b/app/assets/javascripts/app/controllers/knowledge_base/search_item.coffee index a042d1ce2..25476bcc1 100644 --- a/app/assets/javascripts/app/controllers/knowledge_base/search_item.coffee +++ b/app/assets/javascripts/app/controllers/knowledge_base/search_item.coffee @@ -11,13 +11,16 @@ class App.KnowledgeBaseSearchItem extends App.Controller @render() data: -> + extraAttributes = @object.parent().attributesForRendering(App.KnowledgeBaseLocale.localeFor(@object)) + output = @details || {} - output['url'] = @object?.uiUrl("search-return/#{@pathSuffix}") || '#' - output['state'] = @object.parent().attributesForRendering(App.KnowledgeBaseLocale.localeFor(@object)).state + output.url = @object?.uiUrl("search-return/#{@pathSuffix}") || '#' + output.state = extraAttributes.state + output.iconFont = extraAttributes.iconFont output render: -> - @html App.view('knowledge_base/search_item')(data: @data()) + @html App.view('knowledge_base/search_item')(data: @data(), iconset: @object.parent().knowledge_base().iconset) searchLinkClicked: -> # setup history and let it continue, no need to prevent default action or bubbling if window.history? and @return_path? diff --git a/app/assets/javascripts/app/lib/mixins/view_helpers.coffee b/app/assets/javascripts/app/lib/mixins/view_helpers.coffee index 213aba1be..ccad90de6 100644 --- a/app/assets/javascripts/app/lib/mixins/view_helpers.coffee +++ b/app/assets/javascripts/app/lib/mixins/view_helpers.coffee @@ -232,3 +232,10 @@ App.ViewHelpers = replacePlaceholder: (template, items, encodeLink = false) -> App.Utils.replaceTags(template, items, encodeLink) + + # prints value depending on direction of active locale + dir: (ltr, rtl) -> + if App.i18n.dir() == 'ltr' + ltr + else + rtl diff --git a/app/assets/javascripts/app/views/knowledge_base/_reader_pagination.jst.eco b/app/assets/javascripts/app/views/knowledge_base/_reader_pagination.jst.eco index cb6c0b011..4eaa997a9 100644 --- a/app/assets/javascripts/app/views/knowledge_base/_reader_pagination.jst.eco +++ b/app/assets/javascripts/app/views/knowledge_base/_reader_pagination.jst.eco @@ -1,6 +1,7 @@ <% if @previousAnswer: %> <%- @Icon('arrow-left') %> + <%= @previousAnswer.title %> <% end %> @@ -8,6 +9,7 @@ <% if @nextAnswer: %> <%= @nextAnswer.title %> + <%- @Icon('arrow-right') %> <% end %> diff --git a/app/assets/javascripts/app/views/knowledge_base/navigation.jst.eco b/app/assets/javascripts/app/views/knowledge_base/navigation.jst.eco index 8ce1e0555..10fe6e7ee 100644 --- a/app/assets/javascripts/app/views/knowledge_base/navigation.jst.eco +++ b/app/assets/javascripts/app/views/knowledge_base/navigation.jst.eco @@ -36,7 +36,7 @@