Skip to content

Commit 1dfd427

Browse files
committed
#433 fix(support case-insensitive when select lang)
1 parent 59a1e63 commit 1dfd427

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

grails-app/assets/stylesheets/application.css

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@
2121
*= require commonui-bs3-2019/css/ala-styles.css
2222
*= require spatial-hub.css
2323
*= require commonui-bs3-2019.css
24+
*= require flag-icons-master/css/flag-icon.css
2425
*/

grails-app/assets/stylesheets/spatial-hub.css

+6
Original file line numberDiff line numberDiff line change
@@ -1116,3 +1116,9 @@ ul.errors {
11161116
padding-top: 20px;
11171117
font-style: italic;
11181118
}
1119+
1120+
#lang {
1121+
color: #FFFFFF;
1122+
background-color: #000000;
1123+
border-width: 0;
1124+
}

grails-app/services/au/org/ala/spatial/portal/PropertiesService.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class PropertiesService {
2626
def grailsApplication
2727

2828
def get(type) {
29-
def name = "messages" + (type == "default" ? "" : "_" + type)
29+
def name = "messages" + (type == "default" ? "" : "_" + type.toLowerCase())
3030
def defaultFile = "${name}.properties";
3131
def properties = new Properties()
3232

grails-app/views/layouts/portal.gsp

+8-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@
118118
<div class="horizontal-line"></div>
119119
<span class="collapse visible-on-show" aria-hidden="true">&times;</span>
120120
</button>
121+
<select class="form-select" id="lang" aria-label="Region" onchange="location = this.value;">
122+
<option selected value="/">EN</option>
123+
<option value="?lang=ES" ${params.lang?.toLowerCase()=='es' ? 'selected' : ''}>ES</option>
124+
</select>
121125
</div>
122126
</div>
123127

@@ -311,6 +315,7 @@
311315
</li>
312316
</ul>
313317
</div>
318+
314319
<button class="search-trigger hidden-xs hidden-sm collapsed collapse-trigger-button"
315320
data-toggle="collapse"
316321
data-target="#autocompleteSearchALA" onclick="focusOnClickSearchButton()">
@@ -360,8 +365,11 @@
360365
</form>
361366
</div>
362367
</div>
368+
363369
</nav><!-- .site-navigation -->
364370

371+
372+
365373
</div>
366374
<script type="text/html" id="autoCompleteTemplate">
367375
<li class="autocomplete-item striped">
@@ -405,6 +413,5 @@
405413
</script>
406414
</g:if>
407415
<!-- End Google Analytics -->
408-
409416
</body>
410417
</html>

0 commit comments

Comments
 (0)