Skip to content

Commit 3419b21

Browse files
committed
Fix email visibility on remote profile and exclude empty rows (fix #414)
1 parent 320bd67 commit 3419b21

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/main/resources/templates/search/user.html

+7-8
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,21 @@ <h3 class="mb-0">Basic Information</h3>
7272
th:value="${viewUser.profile.lastName}" disabled="disabled"/>
7373
</td>
7474
</tr>
75-
<tr class="edit-container">
75+
<tr th:unless="${#strings.isEmpty(viewUser.profile.organization)}" class="edit-container">
7676
<td class="align-middle"><span class="text-muted align-middle">Organization</span></td>
7777
<td>
7878
<input class="data-edit" type="text" name="organization"
7979
th:value="${viewUser.profile.organization}" disabled="disabled"/>
8080
</td>
8181
</tr>
82-
<tr class="edit-container">
82+
<tr th:unless="${#strings.isEmpty(viewUser.profile.department)}" class="edit-container">
8383
<td class="align-middle"><span class="text-muted align-middle">Department</span></td>
8484
<td>
8585
<input class="data-edit" type="text" name="department"
8686
th:value="${viewUser.profile.department}" disabled="disabled"/>
8787
</td>
8888
</tr>
89-
<tr class="edit-container">
89+
<tr th:unless="${#strings.isEmpty(viewUser.profile.website)}" class="edit-container">
9090
<td class="align-middle"><span class="text-muted align-middle">Website</span></td>
9191
<td>
9292
<input class="data-edit" type="text" name="website"
@@ -126,17 +126,16 @@ <h3 class="mb-0">Basic Information</h3>
126126
<div class="card-header">
127127
<h3 class="mb-0">Contact Information</h3>
128128
</div>
129-
<table class="table mb-0">
130-
<tr th:unless="${viewUser.origin}">
129+
<table th:if="${viewUser.verifiedContactEmail.isPresent()}" class="table mb-0">
130+
<tr>
131131
<td class="align-middle" style="width: 120px;"><span
132132
class="text-muted align-middle">Email</span></td>
133133
<td>
134-
<a th:if="${viewUser.verifiedContactEmail.isPresent()}"
135-
th:href="${'mailto:' + viewUser.verifiedContactEmail.get().address}"
134+
<a th:href="${'mailto:' + viewUser.verifiedContactEmail.get().address}"
136135
th:text="${viewUser.verifiedContactEmail.get().address}"></a>
137136
</td>
138137
</tr>
139-
<tr class="edit-container">
138+
<tr th:unless="${#strings.isEmpty(viewUser.profile.phone)}" class="edit-container">
140139
<td class="align-middle"><span class="text-muted align-middle">Phone</span></td>
141140
<td>
142141
<input class="data-edit" type="text" name="phone" th:value="${viewUser.profile.phone}"

0 commit comments

Comments
 (0)