Add info about bound resource in user edition
FEA: ItEr76S27ResourceBinding
This commit is contained in:
parent
c775cd952b
commit
cfb85fe2b1
2 changed files with 44 additions and 0 deletions
|
|
@ -307,4 +307,28 @@ public class UserCRUDController extends BaseCRUDController<User> implements
|
|||
return usersRenderer;
|
||||
}
|
||||
|
||||
public String hasBoundResource() {
|
||||
User user = getUser();
|
||||
if (user != null && user.isBound()) {
|
||||
return _("Yes");
|
||||
}
|
||||
return _("No");
|
||||
}
|
||||
|
||||
public String getBoundResource() {
|
||||
User user = getUser();
|
||||
if (user != null && user.isBound()) {
|
||||
return user.getWorker().getShortDescription();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public boolean isBound() {
|
||||
User user = getUser();
|
||||
if (user != null) {
|
||||
return user.isBound();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,26 @@
|
|||
</grid>
|
||||
</groupbox>
|
||||
|
||||
<groupbox closable="false">
|
||||
<caption label="${i18n:_('Bound resource')}" />
|
||||
<grid fixedLayout="false" span="true">
|
||||
<columns>
|
||||
<column width="200px" />
|
||||
<column />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<label value="${i18n:_('Has bound resource')}" />
|
||||
<label value="@{controller.hasBoundResource}" />
|
||||
</row>
|
||||
<row visible="@{controller.bound}">
|
||||
<label value="${i18n:_('Bound resource')}" />
|
||||
<label value="@{controller.boundResource}" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</groupbox>
|
||||
|
||||
<!-- Associated UserRoles -->
|
||||
<groupbox closable="false">
|
||||
<caption label="${i18n:_('Association with roles')}" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue