Skip to content

Commit

Permalink
Merge pull request #1979 from scireum/feature/sbi/SIRI-957
Browse files Browse the repository at this point in the history
Open Search - Ensure select link in user and tenant search results works
  • Loading branch information
sabieber authored Apr 23, 2024
2 parents 6b75d54 + 71f845a commit f82c811
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/main/java/sirius/biz/tenants/TenantSearchProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ public void query(String query, int maxResults, Consumer<OpenSearchResult> resul
if (currentUser.hasPermission(TenantUserManager.PERMISSION_SELECT_TENANT)) {
openSearchResult.withTemplateFromCode("""
<i:arg name="tenant" type="sirius.biz.tenants.Tenant"/>
@tenant.getTenantData().getAddress().getZip() @tenant.getTenantData().getAddress().getCity()
<br>
<a href=/tenants/select/@tenant.getIdAsString()" class="card-link">@i18n("TenantController.select")</a>
<a href="/tenants/select/@tenant.getIdAsString()" class="card-link">@i18n("TenantController.select")</a>
""", tenant);
}
resultCollector.accept(openSearchResult);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ public void query(String query, int maxResults, Consumer<OpenSearchResult> resul
if (currentUser.hasPermission(TenantUserManager.PERMISSION_SELECT_USER_ACCOUNT)) {
openSearchResult.withTemplateFromCode("""
<i:arg name="user" type="sirius.biz.tenants.UserAccount"/>
@user (@user.getTenant().fetchValue().toString())
<br>
<a href=/user-accounts/select/@user.getIdAsString()" class="card-link">@i18n("TenantController.select")</a>
<a href="/user-accounts/select/@user.getIdAsString()" class="card-link">@i18n("TenantController.select")</a>
""", userAccount);
}
resultCollector.accept(openSearchResult);
Expand Down

0 comments on commit f82c811

Please sign in to comment.