Changeset 5020
- Timestamp:
- 04/22/14 14:46:14 (10 years ago)
- Location:
- vlo/branches/vlo-3.0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.0/vlo-commons/src/main/resources/VloConfig.xml
r4935 r5020 97 97 <searchResultField>name</searchResultField> 98 98 <searchResultField>country</searchResultField> 99 <searchResultField>language </searchResultField>99 <searchResultField>languages</searchResultField> 100 100 <searchResultField>modality</searchResultField> 101 101 <searchResultField>subject</searchResultField> -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/config/VloSpringConfig.java
r4987 r5020 210 210 FacetConstants.FIELD_DESCRIPTION, 211 211 FacetConstants.FIELD_COLLECTION, 212 FacetConstants.FIELD_LANGUAGE ,212 FacetConstants.FIELD_LANGUAGES, 213 213 FacetConstants.FIELD_MODALITY, 214 214 FacetConstants.FIELD_CONTINENT, -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/panels/record/FieldsTablePanel.java
r5013 r5020 17 17 package eu.clarin.cmdi.vlo.wicket.panels.record; 18 18 19 import com.google.common.collect.ImmutableSet; 20 import eu.clarin.cmdi.vlo.FacetConstants; 19 21 import eu.clarin.cmdi.vlo.config.VloConfig; 20 22 import eu.clarin.cmdi.vlo.pojo.DocumentField; … … 24 26 import eu.clarin.cmdi.vlo.wicket.model.SolrFieldNameModel; 25 27 import eu.clarin.cmdi.vlo.wicket.pages.FacetedSearchPage; 28 import java.util.Collection; 26 29 import java.util.Collections; 27 30 import java.util.List; … … 46 49 public class FieldsTablePanel extends Panel { 47 50 51 /** 52 * List of fields that should be rendered unescaped, {@literal i.e.} HTML 53 * contained in the field should be preserved 54 */ 55 private final static Collection<String> UNESCAPED_VALUE_FIELDS = ImmutableSet.of(FacetConstants.FIELD_LANGUAGES); 56 48 57 @SpringBean 49 58 private VloConfig vloConfig; … … 66 75 @Override 67 76 protected void populateItem(final ListItem fieldValueItem) { 68 fieldValueItem.add(new Label("value", fieldValueItem.getModel())); 77 // add a label for the facet value 78 final Label fieldLabel = new Label("value", fieldValueItem.getModel()); 79 // some selected fields may have HTML that needs to be preserved... 80 fieldLabel.setEscapeModelStrings(!UNESCAPED_VALUE_FIELDS.contains(fieldNameModel.getObject())); 81 fieldValueItem.add(fieldLabel); 82 83 // add a link for selecting the value in the search 69 84 fieldValueItem.add(createFacetSelectLink("facetSelect", fieldNameModel, fieldValueItem.getModel())); 70 85 } -
vlo/branches/vlo-3.0/vlo-web-app/src/main/resources/fieldNames.properties
r4992 r5020 18 18 field.name=Name 19 19 field.language=Language 20 field.languages=Language 20 21 field.genre=Genre 21 22 field.description=Description
Note: See TracChangeset
for help on using the changeset viewer.