Author: bleny Date: 2014-06-17 10:11:44 +0200 (Tue, 17 Jun 2014) New Revision: 2034 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2034 Log: fixes #5211 Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java =================================================================== --- trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-06-13 09:33:43 UTC (rev 2033) +++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-06-17 08:11:44 UTC (rev 2034) @@ -294,4 +294,8 @@ return ! userProfile.isGuest(); } + public boolean isAuthorizedToFilterOnBoats() { + return ! userProfile.isGuest() && ! userProfile.isProfessional(); + } + } Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp 2014-06-13 09:33:43 UTC (rev 2033) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/boats.jsp 2014-06-17 08:11:44 UTC (rev 2034) @@ -33,13 +33,16 @@ $(document).ready(function () { var boatFilterMappings = [ + + <s:if test="authenticatedWaoUser.authorizedToFilterOnBoats"> + { + filterName: 'boatIds', + filterLabel: "<s:text name="wao.ui.entity.Boat"/>", + filterValuesField: 'boats', + minimumInputLength: 3 + }, + </s:if> { - filterName: 'boatIds', - filterLabel: "<s:text name="wao.ui.entity.Boat"/>", - filterValuesField: 'boats', - minimumInputLength: 3 - }, - { filterName: 'elligibleForSampleRowsFilter.fishingZoneFacadeNames', filterLabel: "<s:text name="wao.ui.field.FishingZone.facadeName"/>", filterValuesField: 'elligibleForSampleRowsFilterValues.fishingZoneFacadeNames' Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp =================================================================== --- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp 2014-06-13 09:33:43 UTC (rev 2033) +++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/contacts.jsp 2014-06-17 08:11:44 UTC (rev 2034) @@ -70,13 +70,15 @@ filterLabel: "<s:text name="wao.ui.entity.targetSpeciesDCF"/>", filterValuesField: 'sampleRowsFilterValues.targetSpeciesDcfs', }, + <s:if test="authenticatedWaoUser.authorizedToFilterOnBoats"> + { + filterName: 'boatFilter.boatIds', + filterLabel: "<s:text name="wao.ui.entity.Boat"/>", + filterValuesField: 'boatsFilterValues.boats', + minimumInputLength: 3 + }, + </s:if> { - filterName: 'boatFilter.boatIds', - filterLabel: "<s:text name="wao.ui.entity.Boat"/>", - filterValuesField: 'boatsFilterValues.boats', - minimumInputLength: 3 - }, - { filterName: 'boatFilter.districtIds', filterLabel: "<s:text name="wao.ui.field.Boat.district"/>", filterValuesField: 'boatsFilterValues.districts'
participants (1)
-
bleny@users.forge.codelutin.com