Skip to content

Commit

Permalink
Add placeholder when no extra species
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkohei13 committed Jul 16, 2024
1 parent ce309ef commit 09adc96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/controllers/participation.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ def make_taxa_html(challenge, taxa_dates_json = None):
# Load all taxa names of the higher taxon (e.g. plants)
all_taxa_names = common_helpers.load_taxon_file(taxon_file_id + "_all")

# Setup two html strings
basic_taxa_html = ""
additional_taxa_html = ""

# 1) Loop all basic_taxa_names
for taxon_id, taxon_data in basic_taxa_names.items():
Expand All @@ -101,6 +99,14 @@ def make_taxa_html(challenge, taxa_dates_json = None):


# 2) Loop remaining taxa_dates, i.e. the additional taxa user has observed

# If taxa_dates is empty, set message text
if not taxa_dates:
additional_taxa_html = "<li class='no_additional_taxa'>Ei peruslistan ulkopuolisia lajeja.</li>\n"
else:
additional_taxa_html = ""
print(taxa_dates)

for observed_taxon_id, observed_taxon_date in taxa_dates.items():

# Add to additional_taxa_html
Expand Down
4 changes: 4 additions & 0 deletions app/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,10 @@ padding: 10px;
list-style-type: none;
}

.no_additional_taxa {
color: #777;
}

@media screen and (min-width: 769px) {

#login_navi {
Expand Down

0 comments on commit 09adc96

Please sign in to comment.