From f62a45444d2c43cffe24a2b36c8fa93371fb7a5f Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Thu, 23 Jun 2016 12:08:13 +0100 Subject: [PATCH 01/15] Prototype mark-up and styles. --- services/web/app/views/contact-us-modal.jade | 12 +++++ .../public/stylesheets/app/contact-us.less | 49 ++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/services/web/app/views/contact-us-modal.jade b/services/web/app/views/contact-us-modal.jade index 46090eec1b..da899cbaac 100644 --- a/services/web/app/views/contact-us-modal.jade +++ b/services/web/app/views/contact-us-modal.jade @@ -12,6 +12,18 @@ script(type='text/ng-template', id='supportModalTemplate') | #{translate("subject")} .form-group input.field.text.medium.span8.form-control(ng-model="form.subject", maxlength='255', tabindex='1', onkeyup='') + .contact-suggestions + p.contact-suggestion-label Have you checked our knowledge base? + ul.contact-suggestion-list + li: a.contact-suggestion-list-item + span Item 1 - subsection lorem + i.fa.fa-angle-right + li: a.contact-suggestion-list-item + span Item 2 - subsection dolor + i.fa.fa-angle-right + li: a.contact-suggestion-list-item + span Item 3 - subsection sit + i.fa.fa-angle-right label.desc(ng-show="'#{getUserEmail()}'.length < 1") | #{translate("email")} .form-group(ng-show="'#{getUserEmail()}'.length < 1") diff --git a/services/web/public/stylesheets/app/contact-us.less b/services/web/public/stylesheets/app/contact-us.less index 06747b5412..157f23ddbe 100644 --- a/services/web/public/stylesheets/app/contact-us.less +++ b/services/web/public/stylesheets/app/contact-us.less @@ -3,4 +3,51 @@ textarea { height: 120px; } -} \ No newline at end of file +} + +.contact-suggestions { + margin: -5px -20px 10px; + padding: 10px 0; + color: @gray-dark; + background-color: @gray-lightest; + border-top: solid 1px @gray-lighter; + border-bottom: solid 1px @gray-lighter; + font-size: 0.9rem; +} + + .contact-suggestion-label { + margin-bottom: 10px; + padding: 0 20px; + } + + .contact-suggestion-list { + .list-unstyled(); + background-color: #FFF; + border-top: solid 1px @gray-lighter; + border-bottom: solid 1px @gray-lighter; + + li:last-child .contact-suggestion-list-item { + border-bottom: none; + } + } + + .contact-suggestion-list-item { + display: table; + width: 100%; + color: @dropdown-link-color; + padding: 10px 20px; + border-bottom: solid 1px lighten(@gray-lighter, 10%); + cursor: pointer; + + &:hover, + &:focus { + text-decoration: none; + color: @dropdown-link-hover-color; + background-color: @dropdown-link-hover-bg; + } + + i { + display: table-cell; + text-align: right; + } + } \ No newline at end of file From e51bdaaaafa825159c329db468ec4284d4983009 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Thu, 23 Jun 2016 15:01:07 +0100 Subject: [PATCH 02/15] Fine tuning of styles. --- services/web/public/stylesheets/app/contact-us.less | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/web/public/stylesheets/app/contact-us.less b/services/web/public/stylesheets/app/contact-us.less index 157f23ddbe..616e38eec8 100644 --- a/services/web/public/stylesheets/app/contact-us.less +++ b/services/web/public/stylesheets/app/contact-us.less @@ -25,6 +25,7 @@ background-color: #FFF; border-top: solid 1px @gray-lighter; border-bottom: solid 1px @gray-lighter; + margin: 0; li:last-child .contact-suggestion-list-item { border-bottom: none; @@ -44,10 +45,15 @@ text-decoration: none; color: @dropdown-link-hover-color; background-color: @dropdown-link-hover-bg; + + .fa { + color: inherit; + } } - i { + .fa { display: table-cell; text-align: right; + color: @gray-lighter; } } \ No newline at end of file From a587d5ddba6b40a9e64fb428ee481a295d39d6c1 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Fri, 24 Jun 2016 11:02:29 +0100 Subject: [PATCH 03/15] Set up model options. --- services/web/app/views/contact-us-modal.jade | 9 +++++++-- services/web/public/coffee/main/contact-us.coffee | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/services/web/app/views/contact-us-modal.jade b/services/web/app/views/contact-us-modal.jade index da899cbaac..f8663a87c2 100644 --- a/services/web/app/views/contact-us-modal.jade +++ b/services/web/app/views/contact-us-modal.jade @@ -11,9 +11,14 @@ script(type='text/ng-template', id='supportModalTemplate') label | #{translate("subject")} .form-group - input.field.text.medium.span8.form-control(ng-model="form.subject", maxlength='255', tabindex='1', onkeyup='') + input.field.text.medium.span8.form-control( + ng-model="form.subject", + ng-model-options="{ updateOn: 'default blur', debounce: {'default': 350, 'blur': 0} }" + maxlength='255', + tabindex='1', + onkeyup='') .contact-suggestions - p.contact-suggestion-label Have you checked our knowledge base? + p.contact-suggestion-label Have you checked our knowledge base? {{ form.subject }} ul.contact-suggestion-list li: a.contact-suggestion-list-item span Item 1 - subsection lorem diff --git a/services/web/public/coffee/main/contact-us.coffee b/services/web/public/coffee/main/contact-us.coffee index 08bf5bfa45..b70b0f7a69 100644 --- a/services/web/public/coffee/main/contact-us.coffee +++ b/services/web/public/coffee/main/contact-us.coffee @@ -36,6 +36,9 @@ define [ $scope.sent = true $scope.$apply() + $scope.$watch 'form.subject', (newVal, oldVal) -> + console.log newVal, oldVal + $scope.close = () -> $modalInstance.close() From 2c9812f62f6b03229e529fb7f83330ff8b8205cd Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Fri, 24 Jun 2016 17:10:07 +0100 Subject: [PATCH 04/15] Add algolia search. --- .../web/public/coffee/main/contact-us.coffee | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/services/web/public/coffee/main/contact-us.coffee b/services/web/public/coffee/main/contact-us.coffee index b70b0f7a69..60441d0282 100644 --- a/services/web/public/coffee/main/contact-us.coffee +++ b/services/web/public/coffee/main/contact-us.coffee @@ -3,6 +3,18 @@ define [ "libs/platform" ], (App, platform) -> + App.factory "algoliaSearch", -> + if window.sharelatex?.algolia? and window.sharelatex.algolia?.indexes?.wiki? + client = new AlgoliaSearch(window.sharelatex.algolia?.app_id, window.sharelatex.algolia?.api_key) + wikiIdx = client.initIndex(window.sharelatex.algolia?.indexes?.wiki) + kbIdx = client.initIndex(window.sharelatex.algolia?.indexes?.kb) + + service = + searchWiki: wikiIdx.search.bind(wikiIdx) + searchKB: kbIdx.search.bind(kbIdx) + + return service + App.controller 'ContactModal', ($scope, $modal) -> $scope.contactUsModal = () -> @@ -11,10 +23,24 @@ define [ controller: "SupportModalController" ) - App.controller 'SupportModalController', ($scope, $modalInstance) -> + App.controller 'SupportModalController', ($scope, $modalInstance, algoliaSearch) -> $scope.form = {} $scope.sent = false $scope.sending = false + $scope.suggestions = []; + + _handleSearchResults = (success, results) -> + suggestions = for hit in results.hits + page_underscored = hit.pageName.replace(/\s/g,'_') + section_underscored = hit.sectionName.replace(/\s/g,'_') + + suggestion = + url :"/learn/#{page_underscored}##{section_underscored}" + name : hit._highlightResult.pageName.value + " - " + hit._highlightResult.sectionName.value + + $scope.$applyAsync () -> + $scope.suggestions = suggestions + $scope.contactUs = -> if !$scope.form.email? console.log "email not set" @@ -36,8 +62,11 @@ define [ $scope.sent = true $scope.$apply() - $scope.$watch 'form.subject', (newVal, oldVal) -> - console.log newVal, oldVal + $scope.$watch "form.subject", (newVal, oldVal) -> + if newVal and newVal != oldVal + algoliaSearch.searchWiki newVal, _handleSearchResults + + $scope.$watch "suggestions", (newVal) -> console.log newVal $scope.close = () -> $modalInstance.close() From c82f4481e4eaf3f163d73849f6523b248c90b599 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Fri, 24 Jun 2016 17:10:18 +0100 Subject: [PATCH 05/15] Show search results. --- services/web/app/views/contact-us-modal.jade | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/services/web/app/views/contact-us-modal.jade b/services/web/app/views/contact-us-modal.jade index f8663a87c2..012ce5365b 100644 --- a/services/web/app/views/contact-us-modal.jade +++ b/services/web/app/views/contact-us-modal.jade @@ -17,18 +17,13 @@ script(type='text/ng-template', id='supportModalTemplate') maxlength='255', tabindex='1', onkeyup='') - .contact-suggestions - p.contact-suggestion-label Have you checked our knowledge base? {{ form.subject }} + .contact-suggestions(ng-show="suggestions.length") + p.contact-suggestion-label Have you checked our knowledge base? ul.contact-suggestion-list - li: a.contact-suggestion-list-item - span Item 1 - subsection lorem - i.fa.fa-angle-right - li: a.contact-suggestion-list-item - span Item 2 - subsection dolor - i.fa.fa-angle-right - li: a.contact-suggestion-list-item - span Item 3 - subsection sit - i.fa.fa-angle-right + li(ng-repeat="suggestion in suggestions") + a.contact-suggestion-list-item(ng-href="{{ suggestion.url }}", target="_blank") + span(ng-bind-html="suggestion.name") + i.fa.fa-angle-right label.desc(ng-show="'#{getUserEmail()}'.length < 1") | #{translate("email")} .form-group(ng-show="'#{getUserEmail()}'.length < 1") From c2ace9a0a043d4fd49c7a21a6a09b36711b31d89 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 27 Jun 2016 10:21:36 +0100 Subject: [PATCH 06/15] Restrict # of hits returned; clear results on empty search string. --- services/web/public/coffee/main/contact-us.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/web/public/coffee/main/contact-us.coffee b/services/web/public/coffee/main/contact-us.coffee index 60441d0282..6f9ca36266 100644 --- a/services/web/public/coffee/main/contact-us.coffee +++ b/services/web/public/coffee/main/contact-us.coffee @@ -29,7 +29,7 @@ define [ $scope.sending = false $scope.suggestions = []; - _handleSearchResults = (success, results) -> + _handleSearchResults = (success, results) -> suggestions = for hit in results.hits page_underscored = hit.pageName.replace(/\s/g,'_') section_underscored = hit.sectionName.replace(/\s/g,'_') @@ -64,9 +64,9 @@ define [ $scope.$watch "form.subject", (newVal, oldVal) -> if newVal and newVal != oldVal - algoliaSearch.searchWiki newVal, _handleSearchResults - - $scope.$watch "suggestions", (newVal) -> console.log newVal + algoliaSearch.searchWiki newVal, _handleSearchResults, { hitsPerPage: 3 } + else + $scope.suggestions = []; $scope.close = () -> $modalInstance.close() From 0551f27c83fff2cd977590067e0d52e8fa0478ed Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 27 Jun 2016 14:46:34 +0100 Subject: [PATCH 07/15] Extra search options; only search after three chars have been entered. --- services/web/public/coffee/main/contact-us.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/main/contact-us.coffee b/services/web/public/coffee/main/contact-us.coffee index 6f9ca36266..18170952b6 100644 --- a/services/web/public/coffee/main/contact-us.coffee +++ b/services/web/public/coffee/main/contact-us.coffee @@ -63,8 +63,12 @@ define [ $scope.$apply() $scope.$watch "form.subject", (newVal, oldVal) -> - if newVal and newVal != oldVal - algoliaSearch.searchWiki newVal, _handleSearchResults, { hitsPerPage: 3 } + if newVal and newVal != oldVal and newVal.length > 3 + # TODO Search the KB index instead; Wiki is used for testing purposes. + algoliaSearch.searchWiki newVal, _handleSearchResults, { + hitsPerPage: 3 + typoTolerance: 'strict' + } else $scope.suggestions = []; From d7f67e79315ed9d0e79a438eb8261d0acf6b11eb Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 27 Jun 2016 15:38:13 +0100 Subject: [PATCH 08/15] Integrate translations. --- services/web/app/views/contact-us-modal.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/views/contact-us-modal.jade b/services/web/app/views/contact-us-modal.jade index 012ce5365b..33780592ce 100644 --- a/services/web/app/views/contact-us-modal.jade +++ b/services/web/app/views/contact-us-modal.jade @@ -18,7 +18,7 @@ script(type='text/ng-template', id='supportModalTemplate') tabindex='1', onkeyup='') .contact-suggestions(ng-show="suggestions.length") - p.contact-suggestion-label Have you checked our knowledge base? + p.contact-suggestion-label #{translate("kb_suggestions_enquiry")} ul.contact-suggestion-list li(ng-repeat="suggestion in suggestions") a.contact-suggestion-list-item(ng-href="{{ suggestion.url }}", target="_blank") From f50c73642a9a5cc226c56c55b9b0ed02e66fbb86 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Wed, 29 Jun 2016 11:57:43 +0100 Subject: [PATCH 09/15] Integrate with KB index. --- services/web/public/coffee/main/contact-us.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/services/web/public/coffee/main/contact-us.coffee b/services/web/public/coffee/main/contact-us.coffee index 18170952b6..fd1e720dd4 100644 --- a/services/web/public/coffee/main/contact-us.coffee +++ b/services/web/public/coffee/main/contact-us.coffee @@ -32,11 +32,10 @@ define [ _handleSearchResults = (success, results) -> suggestions = for hit in results.hits page_underscored = hit.pageName.replace(/\s/g,'_') - section_underscored = hit.sectionName.replace(/\s/g,'_') suggestion = - url :"/learn/#{page_underscored}##{section_underscored}" - name : hit._highlightResult.pageName.value + " - " + hit._highlightResult.sectionName.value + url :"/learn/kb/#{page_underscored}" + name : hit._highlightResult.pageName.value $scope.$applyAsync () -> $scope.suggestions = suggestions @@ -64,8 +63,7 @@ define [ $scope.$watch "form.subject", (newVal, oldVal) -> if newVal and newVal != oldVal and newVal.length > 3 - # TODO Search the KB index instead; Wiki is used for testing purposes. - algoliaSearch.searchWiki newVal, _handleSearchResults, { + algoliaSearch.searchKB newVal, _handleSearchResults, { hitsPerPage: 3 typoTolerance: 'strict' } From bf67fedc73b74b26730b099d75af4c6aaefd513d Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 11 Jul 2016 12:24:48 +0100 Subject: [PATCH 10/15] Centralize Algolia methods in a common factory. --- services/web/public/coffee/main/contact-us.coffee | 15 +-------------- .../public/coffee/services/algolia-search.coffee | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 services/web/public/coffee/services/algolia-search.coffee diff --git a/services/web/public/coffee/main/contact-us.coffee b/services/web/public/coffee/main/contact-us.coffee index fd1e720dd4..c8f0306c3c 100644 --- a/services/web/public/coffee/main/contact-us.coffee +++ b/services/web/public/coffee/main/contact-us.coffee @@ -1,21 +1,8 @@ define [ "base" + "services/algolia-search" "libs/platform" ], (App, platform) -> - - App.factory "algoliaSearch", -> - if window.sharelatex?.algolia? and window.sharelatex.algolia?.indexes?.wiki? - client = new AlgoliaSearch(window.sharelatex.algolia?.app_id, window.sharelatex.algolia?.api_key) - wikiIdx = client.initIndex(window.sharelatex.algolia?.indexes?.wiki) - kbIdx = client.initIndex(window.sharelatex.algolia?.indexes?.kb) - - service = - searchWiki: wikiIdx.search.bind(wikiIdx) - searchKB: kbIdx.search.bind(kbIdx) - - return service - - App.controller 'ContactModal', ($scope, $modal) -> $scope.contactUsModal = () -> modalInstance = $modal.open( diff --git a/services/web/public/coffee/services/algolia-search.coffee b/services/web/public/coffee/services/algolia-search.coffee new file mode 100644 index 0000000000..d62bc6389d --- /dev/null +++ b/services/web/public/coffee/services/algolia-search.coffee @@ -0,0 +1,14 @@ +define [ + "base" +], (App) -> + App.factory "algoliaSearch", -> + if window.sharelatex?.algolia? and window.sharelatex.algolia?.indexes?.wiki? + client = new AlgoliaSearch(window.sharelatex.algolia?.app_id, window.sharelatex.algolia?.api_key) + wikiIdx = client.initIndex(window.sharelatex.algolia?.indexes?.wiki) + kbIdx = client.initIndex(window.sharelatex.algolia?.indexes?.kb) + + service = + searchWiki: wikiIdx.search.bind(wikiIdx) + searchKB: kbIdx.search.bind(kbIdx) + + return service \ No newline at end of file From fb7c43709884589d0b95a438b089158a7ce44f00 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 11 Jul 2016 12:31:52 +0100 Subject: [PATCH 11/15] Make other Algolia clients use the common factory. --- services/web/public/coffee/main/learn.coffee | 12 +++--------- services/web/public/coffee/main/templates.coffee | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/services/web/public/coffee/main/learn.coffee b/services/web/public/coffee/main/learn.coffee index 28026be508..eeae4219b8 100644 --- a/services/web/public/coffee/main/learn.coffee +++ b/services/web/public/coffee/main/learn.coffee @@ -1,15 +1,9 @@ define [ "base" + "services/algolia-search" ], (App) -> - - App.factory "algoliawiki", -> - if window.sharelatex?.algolia? and window.sharelatex.algolia?.indexes?.wiki? - client = new AlgoliaSearch(window.sharelatex.algolia?.app_id, window.sharelatex.algolia?.api_key) - index = client.initIndex(window.sharelatex.algolia?.indexes?.wiki) - return index - App.controller "SearchWikiController", ($scope, algoliawiki, _, $modal) -> - algolia = algoliawiki + App.controller "SearchWikiController", ($scope, algoliaSearch, _, $modal) -> $scope.hits = [] $scope.clearSearchText = -> @@ -54,7 +48,7 @@ define [ updateHits [] return - algolia.search query, (err, response)-> + algoliaSearch.searchWiki query, (err, response)-> if response.hits.length == 0 updateHits [] else diff --git a/services/web/public/coffee/main/templates.coffee b/services/web/public/coffee/main/templates.coffee index 3d05d4ea0f..45919d623a 100644 --- a/services/web/public/coffee/main/templates.coffee +++ b/services/web/public/coffee/main/templates.coffee @@ -1,15 +1,9 @@ define [ "base" + "services/algolia-search" ], (App) -> - - App.factory "algoliawiki", -> - if window.sharelatex?.algolia? and window.sharelatex.algolia?.indexes?.wiki? - client = new AlgoliaSearch(window.sharelatex.algolia?.app_id, window.sharelatex.algolia?.api_key) - index = client.initIndex(window.sharelatex.algolia?.indexes?.wiki) - return index - App.controller "SearchWikiController", ($scope, algoliawiki, _) -> - algolia = algoliawiki + App.controller "SearchWikiController", ($scope, algoliaSearch, _) -> $scope.hits = [] $scope.clearSearchText = -> @@ -54,7 +48,7 @@ define [ updateHits [] return - algolia.search query, (err, response)-> + algoliaSearch.searchWiki query, (err, response)-> if response.hits.length == 0 updateHits [] else From af93ac4413bbfbd488b3e7897d353a879931ab60 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 11 Jul 2016 14:27:07 +0100 Subject: [PATCH 12/15] Track suggestions usage. --- services/web/app/views/contact-us-modal.jade | 2 +- services/web/public/coffee/main/contact-us.coffee | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/services/web/app/views/contact-us-modal.jade b/services/web/app/views/contact-us-modal.jade index 33780592ce..1b6c8078de 100644 --- a/services/web/app/views/contact-us-modal.jade +++ b/services/web/app/views/contact-us-modal.jade @@ -21,7 +21,7 @@ script(type='text/ng-template', id='supportModalTemplate') p.contact-suggestion-label #{translate("kb_suggestions_enquiry")} ul.contact-suggestion-list li(ng-repeat="suggestion in suggestions") - a.contact-suggestion-list-item(ng-href="{{ suggestion.url }}", target="_blank") + a.contact-suggestion-list-item(ng-href="{{ suggestion.url }}", ng-click="clickSuggestionLink(suggestion.url);" target="_blank") span(ng-bind-html="suggestion.name") i.fa.fa-angle-right label.desc(ng-show="'#{getUserEmail()}'.length < 1") diff --git a/services/web/public/coffee/main/contact-us.coffee b/services/web/public/coffee/main/contact-us.coffee index c8f0306c3c..2868fca3c8 100644 --- a/services/web/public/coffee/main/contact-us.coffee +++ b/services/web/public/coffee/main/contact-us.coffee @@ -10,7 +10,7 @@ define [ controller: "SupportModalController" ) - App.controller 'SupportModalController', ($scope, $modalInstance, algoliaSearch) -> + App.controller 'SupportModalController', ($scope, $modalInstance, algoliaSearch, event_tracking) -> $scope.form = {} $scope.sent = false $scope.sending = false @@ -24,6 +24,8 @@ define [ url :"/learn/kb/#{page_underscored}" name : hit._highlightResult.pageName.value + event_tracking.sendCountly "contact-form-suggestions-shown" if results.hits.length + $scope.$applyAsync () -> $scope.suggestions = suggestions @@ -57,6 +59,9 @@ define [ else $scope.suggestions = []; + $scope.clickSuggestionLink = (url) -> + event_tracking.sendCountly "contact-form-suggestions-clicked", { url } + $scope.close = () -> $modalInstance.close() From 02ba277473e95a52264125f89744750bd2e32200 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 11 Jul 2016 16:21:35 +0100 Subject: [PATCH 13/15] Small styling fixes. --- services/web/public/stylesheets/app/contact-us.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/public/stylesheets/app/contact-us.less b/services/web/public/stylesheets/app/contact-us.less index 616e38eec8..37577f60e0 100644 --- a/services/web/public/stylesheets/app/contact-us.less +++ b/services/web/public/stylesheets/app/contact-us.less @@ -6,7 +6,7 @@ } .contact-suggestions { - margin: -5px -20px 10px; + margin: 0 -20px 10px; padding: 10px 0; color: @gray-dark; background-color: @gray-lightest; From 785bf1b5a2bf3624590f932095f62373773be60f Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 11 Jul 2016 16:24:06 +0100 Subject: [PATCH 14/15] New key for the message label. --- services/web/app/views/contact-us-modal.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/views/contact-us-modal.jade b/services/web/app/views/contact-us-modal.jade index 1b6c8078de..16a168e8c1 100644 --- a/services/web/app/views/contact-us-modal.jade +++ b/services/web/app/views/contact-us-modal.jade @@ -33,7 +33,7 @@ script(type='text/ng-template', id='supportModalTemplate') .form-group input.field.text.medium.span8.form-control(ng-model="form.project_url", tabindex='3', onkeyup='') label.desc - | #{translate("suggestion")} + | #{translate("contact_message_label")} .form-group textarea.field.text.medium.span8.form-control(ng-model="form.message",type='text', value='', tabindex='4', onkeyup='') .form-group.text-center From 1e62ce679b0e35ca1f95b3d84807726dc0cc6ee0 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Tue, 12 Jul 2016 11:44:48 +0100 Subject: [PATCH 15/15] Make 'knowledge base' a link to the KB index page. --- services/web/app/views/contact-us-modal.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/views/contact-us-modal.jade b/services/web/app/views/contact-us-modal.jade index 16a168e8c1..f4fd8938b7 100644 --- a/services/web/app/views/contact-us-modal.jade +++ b/services/web/app/views/contact-us-modal.jade @@ -18,7 +18,7 @@ script(type='text/ng-template', id='supportModalTemplate') tabindex='1', onkeyup='') .contact-suggestions(ng-show="suggestions.length") - p.contact-suggestion-label #{translate("kb_suggestions_enquiry")} + p.contact-suggestion-label !{translate("kb_suggestions_enquiry", { kbLink: "__kb__", kb: translate("knowledge_base") })} ul.contact-suggestion-list li(ng-repeat="suggestion in suggestions") a.contact-suggestion-list-item(ng-href="{{ suggestion.url }}", ng-click="clickSuggestionLink(suggestion.url);" target="_blank")