-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
List the letter-sound correspondences where a letter is used #1701 #1782
base: main
Are you sure you want to change the base?
Changes from all commits
034f7ae
a87be0c
0a2d4ab
59db35a
5c84b9e
b4812d4
b7cef3a
aa0b610
e09196a
93f5610
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,4 +185,48 @@ | |
</li> | ||
</ol> | ||
</div> | ||
<h5 class="center"><fmt:message key="letter.sound.correspondences" /></h5> | ||
|
||
<table class="bordered highlight"> | ||
<thead> | ||
<th><fmt:message key="frequency" /></th> | ||
<th><fmt:message key="letters" /></th> | ||
<th></th> | ||
<th><fmt:message key="sounds" /></th> | ||
</thead> | ||
<tbody> | ||
<c:forEach var="letterSound" items="${letterSounds}"> | ||
<%-- Check if the current letter is used by the letter-sound. --%> | ||
<c:set var="isUsedByLetterSound" value="false" /> | ||
<c:forEach var="l" items="${letterSound.letters}"> | ||
<c:if test="${letter.id == l.id}"> | ||
<c:set var="isUsedByLetterSound" value="true" /> | ||
</c:if> | ||
</c:forEach> | ||
<c:if test="${isUsedByLetterSound}"> | ||
<tr> | ||
<td> | ||
${letterSound.usageCount} | ||
</td> | ||
<td> | ||
" <c:forEach var="letter" items="${letterSound.letters}"> | ||
<a href="<spring:url value='/content/letter/edit/${letter.id}' />">${letter.text} </a> | ||
</c:forEach> " | ||
</td> | ||
<td> | ||
➞ | ||
</td> | ||
<td> | ||
/ <c:forEach var="s" items="${letterSound.sounds}"> | ||
<a href="<spring:url value='/content/sound/edit/${s.id}' />"> | ||
<c:if test="${s.id == sound.id}"> | ||
<span class='diff-highlight'></c:if>${s.valueIpa}<c:if test="${s.id == sound.id}"></span></c:if> | ||
</a> | ||
</c:forEach> / | ||
</td> | ||
</tr> | ||
</c:if> | ||
</c:forEach> | ||
</tbody> | ||
</table> | ||
Comment on lines
+188
to
+231
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review the new table for letter sound correspondences. The new table is well-structured with appropriate headers and data bindings. The nested loops and conditionals are correctly used to display data based on the Add checks to ensure |
||
</content:aside> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addition of
letterSounds
model attribute.The
letterSounds
attribute is added to the model, which is fetched usingletterSoundDao.readAll()
. This is a straightforward implementation but consider adding error handling or checking the result ofreadAll()
to ensure it does not return null or an unexpected result.Consider adding null checks or error handling around the DAO call to improve robustness.