feat: Add search functionality for public portal (#5683)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2022-10-20 05:39:32 +05:30
committed by GitHub
parent bce0bb8acb
commit 1fb1be3ddc
16 changed files with 378 additions and 13 deletions

View File

@@ -17,6 +17,7 @@ By default, it renders:
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1">
<meta name= "turbolinks-cache-control" content= "no-cache">
<%= javascript_pack_tag 'portal' %>
<%= stylesheet_pack_tag 'portal' %>
<%= csrf_meta_tags %>
@@ -35,4 +36,16 @@ By default, it renders:
</main>
</div>
</body>
<script>
window.portalConfig = {
portalSlug: '<%= @portal.slug %>',
localeCode: '<%= @locale %>',
searchTranslations: {
searchPlaceholder: '<%= I18n.t('public_portal.search.search_placeholder') %>',
emptyPlaceholder: '<%= I18n.t('public_portal.search.empty_placeholder') %>',
loadingPlaceholder: '<%= I18n.t('public_portal.search.loading_placeholder') %>',
resultsTitle: '<%= I18n.t('public_portal.search.results_title') %>'
}
};
</script>
</html>