Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add search language selector #309

Merged
merged 23 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
67e524f
add search language selector
haddadzineddine Jul 28, 2023
a906323
add language in the ajax request
haddadzineddine Aug 1, 2023
bd0da30
add flags to search select
haddadzineddine Aug 4, 2023
e7c34b4
Merge branch 'development' into feat/multilingual
haddadzineddine Aug 4, 2023
5e9f0f5
Merge branch 'development' into feat/multilingual
haddadzineddine Aug 4, 2023
f90a463
Merge branch 'development' into feat/multilingual
haddadzineddine Aug 10, 2023
e408c01
customizing TomSelect controller
haddadzineddine Aug 10, 2023
7eabe5a
use tomselect
haddadzineddine Aug 10, 2023
9a9f9fc
remove bootstrap select
haddadzineddine Aug 10, 2023
074e5ba
SelectComponent
haddadzineddine Aug 17, 2023
148154e
remove flag-icon and use his cdn instead
haddadzineddine Aug 17, 2023
05c2bee
use flag-icon cdn
haddadzineddine Aug 17, 2023
18377c7
remove flag icon import statement
haddadzineddine Aug 17, 2023
d53eab9
change id for select lang
haddadzineddine Aug 17, 2023
f8cff9f
Merge branch 'development' into feat/multilingual
haddadzineddine Aug 27, 2023
71fa2f6
remove << HEAD
haddadzineddine Aug 27, 2023
f1e2f34
update tom select component to use options inner HTML text to show icons
syphax-bouazzouni Sep 4, 2023
4c1f6b1
add lag-icons-rails and iso-639 gems to handle flags display and upda…
syphax-bouazzouni Sep 5, 2023
40d9bf2
add language selector component
syphax-bouazzouni Sep 5, 2023
77820f8
Merge branch 'development' into feat/multilingual
syphax-bouazzouni Sep 5, 2023
97f64e0
remove tooltipster dependecies
syphax-bouazzouni Sep 5, 2023
7478c14
fix flag size in the summary page
syphax-bouazzouni Sep 5, 2023
dbb8213
add selected argument to LanguageSelector component
syphax-bouazzouni Sep 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ gem 'will_paginate', '~> 3.0'
gem 'inline_svg'
gem "lookbook", '~> 1.5.5'
gem 'ontologies_api_client', git: 'https://github.com/ontoportal-lirmm/ontologies_api_ruby_client.git', branch: 'development'
gem "flag-icons-rails", "~> 3.4"
gem "iso-639", "~> 0.3.6"

# Multi-Provider Authentication
gem 'omniauth'
Expand Down
7 changes: 7 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ GEM
multipart-post (~> 2)
faraday-net_http (2.1.0)
ffi (1.15.5)
flag-icons-rails (3.4.6.1)
sass-rails
flamegraph (0.9.5)
globalid (1.2.0)
activesupport (>= 6.1)
Expand Down Expand Up @@ -195,6 +197,7 @@ GEM
io-console (0.6.0)
irb (1.7.4)
reline (>= 0.3.6)
iso-639 (0.3.6)
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand Down Expand Up @@ -425,6 +428,8 @@ GEM
ruby_parser (3.20.3)
sexp_processor (~> 4.16)
rubyzip (2.3.2)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
Expand Down Expand Up @@ -526,6 +531,7 @@ DEPENDENCIES
dalli
debug
ed25519 (>= 1.2, < 2.0)
flag-icons-rails (~> 3.4)
flamegraph
graphql-client
haml (~> 5.1)
Expand All @@ -534,6 +540,7 @@ DEPENDENCIES
iconv
importmap-rails
inline_svg
iso-639 (~> 0.3.6)
jquery-rails
jquery-ui-rails
jsbundling-rails
Expand Down
Binary file removed app/assets/images/flags32.png
Binary file not shown.
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
//= require_tree ./components
//= require ontologies
//= require projects
//= require tooltipster.bundle.min
//= require application_esbuild
customElements.define('data-table-loader', DataTableLoader );
customElements.define('data-table', DataTable );
Expand Down
6 changes: 5 additions & 1 deletion app/assets/javascripts/bp_search.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ function currentSearchParams() {
params.require_definition = jQuery("#search_require_definition").is(":checked");
params.exact_match = jQuery("#search_exact_match").is(":checked");
params.categories = jQuery("#search_categories").val() || "";
params.lang = jQuery("#select_search_language").val() || "";

return params;
}

Expand Down Expand Up @@ -325,7 +327,8 @@ function performSearch() {
includeNonProduction = jQuery("#search_include_non_production").is(":checked"),
includeOnlyDefinitions = jQuery("#search_require_definition").is(":checked"),
exactMatch = jQuery("#search_exact_match").is(":checked"),
categories = jQuery("#search_categories").val() || "";
categories = jQuery("#search_categories").val() || "",
language = jQuery("#select_search_language").val() || "";

// Set the list of search words to be blacklisted for the ontology ownership algorithm
blacklistSearchWordsArr = query.split(/\s+/);
Expand All @@ -336,6 +339,7 @@ function performSearch() {
url: determineHTTPS(jQuery(document).data().bp.config.rest_url) + "/search",
data: {
q: query,
lang: language,
include_properties: includeProps,
include_views: includeViews,
obsolete: includeObsolete,
Expand Down
2 changes: 0 additions & 2 deletions app/assets/javascripts/tooltipster.bundle.min.js

This file was deleted.

1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*= require thickbox
*= require select2
*= require trumbowyg
*= require flag-icon
*= require theme-variables
*= require summary
*/
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/summary.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
display: flex;
justify-content: center;
flex-wrap: wrap;
.flag-icon{
width: 30px;
height: 30px;
}
}

.summary-page-center .card_title{
Expand Down
245 changes: 0 additions & 245 deletions app/assets/stylesheets/themes/lirmm/flags32.scss

This file was deleted.

7 changes: 0 additions & 7 deletions app/assets/stylesheets/themes/lirmm/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
@import "annotator";
@import "app";
@import "bootstrap_overrides";
@import "flags32";
@import "jqcloud";
@import "landscape";
@import "ontologies";
@import "recommender";
@import "search";
@import "tooltipster.bundle.min";
@import "plugins/tooltipster/sideTip/themes/tooltipster-sideTip-borderless.min";
@import "plugins/tooltipster/sideTip/themes/tooltipster-sideTip-light.min";
@import "plugins/tooltipster/sideTip/themes/tooltipster-sideTip-noir.min";
@import "plugins/tooltipster/sideTip/themes/tooltipster-sideTip-punk.min";
@import "plugins/tooltipster/sideTip/themes/tooltipster-sideTip-shadow.min";


/************************************
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading