[Suiviobsmer-commits] r892 - in trunk/wao-ui/src/main: java/fr/ifremer/wao/ui/pages webapp
Author: bleny Date: 2011-01-05 20:51:40 +0000 (Wed, 05 Jan 2011) New Revision: 892 Log: allow to see all observers for Contacts with a tooltip Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java trunk/wao-ui/src/main/webapp/Contacts.tml Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2011-01-05 20:26:39 UTC (rev 891) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2011-01-05 20:51:40 UTC (rev 892) @@ -921,6 +921,16 @@ return secondaryObservers; } + public String getSecondaryObserversDescription() { + StringBuilder result = new StringBuilder(); + result.append(contact.getMainObserver().getFullName()); + for (WaoUser observer : contact.getSecondaryObservers()) { + result.append(", "); + result.append(observer.getFullName()); + } + return result.toString(); + } + @Log public Zone onActionFromShowObserversForm() { contactUserId = contactEdited.getMainObserver().getTopiaId(); Modified: trunk/wao-ui/src/main/webapp/Contacts.tml =================================================================== --- trunk/wao-ui/src/main/webapp/Contacts.tml 2011-01-05 20:26:39 UTC (rev 891) +++ trunk/wao-ui/src/main/webapp/Contacts.tml 2011-01-05 20:51:40 UTC (rev 892) @@ -192,12 +192,19 @@ <input t:type="hidden" t:id="hiddenSendEmail" t:value="sendEmail" /> <div t:type="grid" t:source="contacts" t:row="contact" class="t-data-grid ${gridClass}" t:model="contactModel" t:rowClass="prop:rowClass" t:rowsPerPage="20"> - <p:createdByCell> - ${contact.mainObserver.fullName} + <p:mainObserverCell> + <t:if test="contact.secondaryObservers"> + <span t:type="ck/Tooltip" title="${message:wao.ui.field.Contact.secondaryObservers}" t:value="prop:secondaryObserversDescription" t:effect="appear"> + ${contact.mainObserver.fullName}… + </span> + <p:else> + ${contact.mainObserver.fullName} + </p:else> + </t:if> <!--t:if t:test="editionMode"> <a t:type="actionlink" t:id="showObserversForm" t:zone="observersFormZone" context="${contact.topiaId}" class="display-form" title="Modifier les observateurs associés à ce contact">...</a> </t:if--> - </p:createdByCell> + </p:mainObserverCell> <p:sampleRowCell> <span t:type="ck/Tooltip" title="Infos" t:value="prop:sampleRowDescription" t:effect="appear"> ${contact.sampleRow.code}
participants (1)
-
bleny@users.labs.libre-entreprise.org