Closed kirkkwang closed 10 months ago
@laritakr Client is fine with the ;
as the delimeter for multiple values. There was an ask to have the xml reference the schema (dc or edm terms). I've asked for more details on how they want it but I think we can handle that in another ticket. The ask for this ticket is complete.
Story
🎁 Add xml exporter
37b90890b2c4f1daedc5c57d22ebb3755b0a86b4
This commit will add an xml exporter in addition to the csv exporter. A bit of refactoring was needed to get the exporter to work. We have to use a different approach than using the CatalogController#index because there's already a default feature when doing
/catalog.xml
. Instead we use an#export
action for both exporters. To DRY up the code we introduce theExportResultsPresenter
to handle the shared logic. Also we add a little bit of CSS to make the button look like the others as well as change the button to a dropdown menu.Ref:
✅ Add xml exporter test and refactor
a2079be022c74deb6cbb8c5e51661dc25539b42a
This commit will add the test for
ExportXmlPresenter
. It will also refactor theExportCsvPresenter
to use the same shared context as theExportXmlPresenter
.♻️ Refactor to use
ExportResultsPresenter
8bc430866e92bc57fb9919d6279ab6671f3b6508
This commit will combine the exporters into a single one and adjust specs accordingly.
Expected Behavior After Changes
Catalog results has an
Export
dropdown button where the user can choose to export the search results to CSV or XML.Screenshots / Video
Example XML export:
```xml