Changeset 4640


Ignore:
Timestamp:
03/07/14 09:50:15 (10 years ago)
Author:
Twan Goosen
Message:

added resources overview to the record page

Location:
vlo/branches/vlo-3.0/vlo-web-app/src
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/model/CollectionListModel.java

    r4618 r4640  
    4242        if (object instanceof List) {
    4343            return (List<T>) object;
     44        } else if (object == null) {
     45            return null;
     46        } else {
     47            return Lists.newArrayList(object);
    4448        }
    45         return Lists.newArrayList(object);
    4649    }
    4750
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/RecordPage.html

    r4636 r4640  
    8282                </div>
    8383
    84                 <div id="recordresources">
    85                     <a class="writtenresource" href="http://dspace.library.uu.nl/bitstream/1874/235456/1/Bachelorscriptie+Rene+Witteveen+3375005.docx">Bachelorscriptie+Rene+Witteveen+3375005.docx</a>
    86                     <a class="audioresource" href="http://corpus1.mpi.nl/qfs1/media-archive/dobes_data/Ache/Documentaci_n_-_Documentation/Comunidades_-_Communities/Cerro_Moroti/Media/002-djawu_klluu-2011-09-01.wav">002-djawu_klluu-2011-09-01.wav</a>
    87                     <a class="annotationresource" href="http://corpus1.mpi.nl/qfs1/media-archive/dobes_data/Ache/Documentaci_n_-_Documentation/Comunidades_-_Communities/Cerro_Moroti/Annotations/002-djawu_klluu-2011-09-01.eaf">002-djawu_klluu-2011-09-01.eaf</a>
    88 
    89                     <div class="recordresourcedetails">
    90                         <h2>Bachelorscriptie+Rene+Witteveen+3375005.docx</h2>
    91                         <ul>
    92                             <li>File type: text file</li>
    93                             <li>Mime type: application/msword</li>
    94                             <li>Location: <a class="resourcedownloadlink" href="http://dspace.library.uu.nl/bitstream/1874/235456/1/Bachelorscriptie+Rene+Witteveen+3375005.docx">http://dspace.library.uu.nl/bitstream/1874/235456/1/Bachelorscriptie+Rene+Witteveen+3375005.docx</a></li>
    95                         </ul>
    96                     </div>
    97 
    98                 </div>
     84                <div wicket:id="resources" id="recordresources">[RESOURCES]</div>
    9985
    10086                <p id="recordcmditoggle" class="recordtogglelinks">
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/pages/RecordPage.java

    r4636 r4640  
    2222import eu.clarin.cmdi.vlo.service.FieldFilter;
    2323import eu.clarin.cmdi.vlo.wicket.components.FieldsTablePanel;
     24import eu.clarin.cmdi.vlo.wicket.components.ResourceLinksPanel;
    2425import eu.clarin.cmdi.vlo.wicket.components.SolrFieldLabel;
     26import eu.clarin.cmdi.vlo.wicket.model.SolrFieldModel;
    2527import eu.clarin.cmdi.vlo.wicket.model.SolrFieldStringModel;
    2628import eu.clarin.cmdi.vlo.wicket.provider.DocumentFieldsProvider;
     
    6567        add(createLandingPageLink("landingPageLink", documentModel));
    6668        add(new FieldsTablePanel("documentProperties", new DocumentFieldsProvider(documentModel, new BasicPropertiesFieldFilter())));
     69        add(new ResourceLinksPanel("resources", new SolrFieldModel<String>(documentModel, FacetConstants.FIELD_RESOURCE)));
    6770        add(new FieldsTablePanel("technicalProperties", new DocumentFieldsProvider(documentModel, new TechnicalPropertiesFieldFilter())));
    6871    }
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/webapp/style/vlo-record.css

    r4632 r4640  
    128128}
    129129
    130 #recordresources > a {
     130#recordresources a {
    131131    display: inline-block;
    132132    float: left;
     
    141141}
    142142
    143 #recordresources > a:hover {
     143#recordresources a:hover {
    144144    background-color: #ccc;
    145145}
  • vlo/branches/vlo-3.0/vlo-web-app/src/test/java/eu/clarin/cmdi/vlo/wicket/pages/TestRecordPage.java

    r4631 r4640  
    7272        tester.assertVisible("landingPageLink");
    7373    }
     74   
     75    //TODO: Add test for display of resources
    7476}
Note: See TracChangeset for help on using the changeset viewer.