Skip to content

Commit

Permalink
now sorting city lists alphabetically instead of reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
misaugstad committed Sep 21, 2023
1 parent ebc2299 commit 977ca40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/gallery.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<span id="city-type-holder">
<h4><b>@Messages("navbar.city")</b></h4>
<select id="city-select" class="gallery-filter" disabled>
@for(city <- cityInfo.filter(c => c.visibility == "public" || c.cityId == currentCity.cityId).sortBy(c => (c.countryId, c.cityId)).reverse) {
@for(city <- cityInfo.filter(c => c.visibility == "public" || c.cityId == currentCity.cityId).sortBy(c => (c.countryId, c.cityId))) {
@if(currentCity.cityId == city.cityId) {
<option value="@city.URL" selected>@city.cityNameFormatted</option>
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/views/navbar.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<b class="caret"></b>
</a>
<ul id="nav-city-menu" class="dropdown-menu" role="menu" aria-label="City options">
@for(cityInfo <- cityInfo.sortBy(c => (c.countryId, c.cityId)).reverse) {
@for(cityInfo <- cityInfo.sortBy(c => (c.countryId, c.cityId))) {
<li>
@if(cityInfo.cityId == currentCityId) {
<a id="@cityInfo.cityId" role="menuitem" class="current-city" href='javascript:void(0);'>
Expand Down

0 comments on commit 977ca40

Please sign in to comment.