diff --git a/src/main/java/ai/elimu/web/content/letter/LetterEditController.java b/src/main/java/ai/elimu/web/content/letter/LetterEditController.java index 399996ea1..c64a2b538 100644 --- a/src/main/java/ai/elimu/web/content/letter/LetterEditController.java +++ b/src/main/java/ai/elimu/web/content/letter/LetterEditController.java @@ -1,7 +1,6 @@ package ai.elimu.web.content.letter; import java.util.Calendar; -import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; @@ -22,7 +21,6 @@ import ai.elimu.dao.LetterDao; import ai.elimu.dao.LetterSoundDao; import ai.elimu.model.content.Letter; -import ai.elimu.model.content.LetterSound; import ai.elimu.model.contributor.Contributor; import ai.elimu.model.contributor.LetterContributionEvent; import ai.elimu.util.DiscordHelper; @@ -55,16 +53,7 @@ public String handleRequest( model.addAttribute("letterContributionEvents", letterContributionEventDao.readAll(letter)); - List letterSounds = letterSoundDao.readAllOrderedByUsage(); - model.addAttribute("letterSounds", letterSounds); - - int maxUsageCount = 0; - for (LetterSound letterSound : letterSounds) { - if (letterSound.getUsageCount() > maxUsageCount) { - maxUsageCount = letterSound.getUsageCount(); - } - } - model.addAttribute("maxUsageCount", maxUsageCount); + model.addAttribute("letterSounds", letterSoundDao.readAll()); return "content/letter/edit"; } diff --git a/src/main/webapp/WEB-INF/jsp/content/letter/edit.jsp b/src/main/webapp/WEB-INF/jsp/content/letter/edit.jsp index 0d9292865..45bb7e8a6 100644 --- a/src/main/webapp/WEB-INF/jsp/content/letter/edit.jsp +++ b/src/main/webapp/WEB-INF/jsp/content/letter/edit.jsp @@ -160,7 +160,7 @@
Hindi resources: - +
@@ -185,39 +185,48 @@
-
- (${fn:length(letterSounds)}) -
-
- -
- - - - - - - - - - - - - - - - - - - -
${letterSound.usageCount} - " ${letter.text} " - - ➞ - - / ${sound.valueIpa} / -
-
-
-
+
+ + + + + + + + + + + <%-- Check if the current letter is used by the letter-sound. --%> + + + + + + + + + + + + + + + + +
+ ${letterSound.usageCount} + + " + ${letter.text} + " + + ➞ + + / + + + ${s.valueIpa} + + / +