Changeset 4632
- Timestamp:
- 03/06/14 14:56:48 (10 years ago)
- Location:
- vlo/branches/vlo-3.0/vlo-web-app/src/main
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/model/SolrFieldModel.java
r4614 r4632 23 23 import org.apache.wicket.model.AbstractReadOnlyModel; 24 24 import org.apache.wicket.model.IModel; 25 import org.apache.wicket.model.Model; 25 26 26 27 /** … … 35 36 36 37 private final IModel<SolrDocument> documentModel; 37 private final String fieldName;38 private final IModel<String> fieldNameModel; 38 39 39 40 /** … … 43 44 */ 44 45 public SolrFieldModel(IModel<SolrDocument> documentModel, String fieldName) { 46 this(documentModel, Model.of(fieldName)); 47 } 48 49 /** 50 * 51 * @param documentModel model of document that holds the field values 52 * @param fieldNameModel model that provides the field name 53 */ 54 public SolrFieldModel(IModel<SolrDocument> documentModel, IModel<String> fieldNameModel) { 45 55 this.documentModel = documentModel; 46 this.fieldName = fieldName;56 this.fieldNameModel = fieldNameModel; 47 57 } 48 58 49 59 @Override 50 60 public Collection<T> getObject() { 51 final Collection<Object> fieldValues = documentModel.getObject().getFieldValues(fieldName );61 final Collection<Object> fieldValues = documentModel.getObject().getFieldValues(fieldNameModel.getObject()); 52 62 if (fieldValues == null) { 53 63 return null; -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/RecordPage.html
r4625 r4632 79 79 <div id="recorddetails"> 80 80 <a wicket:id="landingPageLink" id="recordlandingpage">Show this record in its original context</a> 81 <table class="recorddetailstable"> 82 <tbody class="attributesTbody"> 83 <tr> 84 <td class="attribute"> 85 <div>Name</div> 86 </td><td class="attributeValue"> 87 <div>"Chinese Democratie en de Transformatie"</div> 88 </td> 89 </tr><tr> 90 <td class="attribute"> 91 <div>Description</div> 92 </td><td class="attributeValue"> 93 <div>In China (and specifically in Beijing) of the late seventies, the call for a democracy movement was growing ever stronger, before finally being silenced by the new regime under Deng Xiaoping. This paper exmaines both the historical sources and the eventual outcome of this movement during the anxious years of '78-'79.</div> 94 </td> 95 </tr><tr> 96 <td class="attribute"> 97 <div>Collection</div> 98 </td><td class="attributeValue"> 99 <div>UBU Clarin Set <a class="recordfacetselect" title="Search for similar" href="index2.html"><span>[search for similar]</span></a></div> 100 </td> 101 </tr><tr> 102 <td class="attribute"> 103 <div>Genre</div> 104 </td><td class="attributeValue"> 105 <div>info:eu-repo/semantics/bachelorthesis <a class="recordfacetselect" title="Search for similar" href="index2.html"><span>[search for similar]</span></a></div> 106 </td> 107 </tr><tr> 108 <td class="attribute"> 109 <div>Languages</div> 110 </td><td class="attributeValue"> 111 <div>Dutch <a class="recordattributeinfo" href="http://infra.clarin.eu/service/language/info.php?code=nld"><span>[info]</span></a> <a class="recordfacetselect" title="Search for similar" href="index3.html"><span>[search for similar]</span></a></div> 112 </td> 113 </tr><tr> 114 <td class="attribute"> 115 <div>National project</div> 116 </td><td class="attributeValue"> 117 <div>CLARIN-NL <a class="recordfacetselect" title="Search for similar" href="index2.html"><span>[search for similar]</span></a></div> 118 </td> 119 </tr><tr> 120 <td class="attribute"> 121 <div>Resource type</div> 122 </td><td class="attributeValue"> 123 <div>text <a class="recordfacetselect" title="Search for similar" href="index2.html"><span>[search for similar]</span></a></div> 124 </td> 125 </tr> 126 </tbody> 127 </table> 81 <wicket:container wicket:id="documentProperties">[PROPERTIES TABLE]</wicket:container> 128 82 </div> 129 83 -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/RecordPage.java
r4625 r4632 19 19 import eu.clarin.cmdi.vlo.FacetConstants; 20 20 import eu.clarin.cmdi.vlo.pojo.QueryFacetsSelection; 21 import eu.clarin.cmdi.vlo.service.FieldFilter; 22 import eu.clarin.cmdi.vlo.wicket.components.FieldsTablePanel; 21 23 import eu.clarin.cmdi.vlo.wicket.components.SolrFieldLabel; 22 24 import eu.clarin.cmdi.vlo.wicket.model.SolrFieldStringModel; 25 import eu.clarin.cmdi.vlo.wicket.provider.DocumentFieldsProvider; 26 import java.io.Serializable; 23 27 import org.apache.solr.common.SolrDocument; 24 28 import org.apache.wicket.markup.html.WebPage; … … 32 36 public class RecordPage extends WebPage { 33 37 34 // private final IModel<SolrDocument> documentModel;35 38 private final IModel<QueryFacetsSelection> contextModel; 36 39 37 40 public RecordPage(IModel<SolrDocument> documentModel, IModel<QueryFacetsSelection> contextModel) { 38 41 super(documentModel); 39 // this.documentModel = documentModel;40 42 this.contextModel = contextModel; 41 43 42 44 add(new SolrFieldLabel("name", documentModel, FacetConstants.FIELD_NAME, "Unnamed record")); 43 45 add(createLandingPageLink("landingPageLink", documentModel)); 46 add(new FieldsTablePanel("documentProperties", new DocumentFieldsProvider(documentModel, new BasicPropertiesFieldFilter()))); 44 47 } 45 48 … … 66 69 } 67 70 71 private class BasicPropertiesFieldFilter implements FieldFilter, Serializable { 72 73 @Override 74 public boolean allowField(String fieldName) { 75 return !fieldName.startsWith("_"); 76 //TODO: Exclude excluded fields and technical fields 77 } 78 } 79 68 80 } -
vlo/branches/vlo-3.0/vlo-web-app/src/main/webapp/style/vlo-record.css
r4466 r4632 97 97 vertical-align: top; 98 98 } 99 100 ul.attributeValues { 101 margin: 0px; 102 } 103 104 ul.attributeValues li { 105 display: block; 106 list-style-type: none; 107 margin: 0px; 108 } 109 99 110 100 111 a.recordfacetselect span, a.recordattributeinfo span {
Note: See TracChangeset
for help on using the changeset viewer.