Skip to content

Commit

Permalink
Update export view names
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Aug 15, 2023
1 parent d9d2396 commit aaa8bea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,16 @@ public ResponseEntity<StreamingResponseBody> export(

@Override
public IndividualModel process(IndividualModel resource) {
// TODO: figure out how to add links from appropriate display view export views
Individual individual = resource.getContent();
if (individual != null) {
if (individual.getProxy().equals(Person.class.getSimpleName())) {
addResource(resource, new ResourceLink(individual, "docx", "Single Page Bio", "Individual single page bio export"));
addResource(resource, new ResourceLink(individual, "docx", "Profile Summary", "Individual profile summary export"));
addResource(resource, new ResourceLink(individual, "zip", "5 Year Publications", "Individual 5 year publications export"));
addResource(resource, new ResourceLink(individual, "zip", "8 Year Publications", "Individual 8 year publications export"));
addResource(resource, new ResourceLink(individual, "zip", "Last 5 Years", "Individual 5 year publications export"));
addResource(resource, new ResourceLink(individual, "zip", "Last 8 Years", "Individual 8 year publications export"));
} else if (individual.getProxy().equals(Organization.class.getSimpleName())) {
addResource(resource, new ResourceLink(individual, "zip", "5 Year Publications", "Organization 5 year publications export"));
addResource(resource, new ResourceLink(individual, "zip", "8 Year Publications", "Organization 8 year publications export"));
addResource(resource, new ResourceLink(individual, "zip", "Last 5 Years", "Organization 5 year publications export"));
addResource(resource, new ResourceLink(individual, "zip", "Last 8 Years", "Organization 8 year publications export"));
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/defaults/displayViews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
- field: class
value: Relationship AND type:Grant
opKey: EXPRESSION
- name: 5 Year Publications
- name: Last 5 Years
contentTemplate: "defaults/displayViews/persons/5YearPublicationsContentTemplate.html"
headerTemplate: "defaults/displayViews/emptyHeaderTemplate.html"
lazyReferences:
Expand Down Expand Up @@ -127,7 +127,7 @@
- field: class
value: Relationship AND type:Grant
opKey: EXPRESSION
- name: 8 Year Publications
- name: Last 8 Years
contentTemplate: "defaults/displayViews/persons/8YearPublicationsContentTemplate.html"
headerTemplate: "defaults/displayViews/emptyHeaderTemplate.html"
lazyReferences:
Expand Down Expand Up @@ -930,7 +930,7 @@
asideTemplate: "defaults/displayViews/organizations/asideTemplate.html"
asideLocation: RIGHT
exportViews:
- name: 5 Year Publications
- name: Last 5 Years
contentTemplate: "defaults/displayViews/persons/5YearPublicationsContentTemplate.html"
headerTemplate: "defaults/displayViews/emptyHeaderTemplate.html"
multipleReference:
Expand Down Expand Up @@ -987,7 +987,7 @@
- field: class
value: Relationship AND type:Grant
opKey: EXPRESSION
- name: 8 Year Publications
- name: Last 8 Years
contentTemplate: "defaults/displayViews/persons/8YearPublicationsContentTemplate.html"
headerTemplate: "defaults/displayViews/emptyHeaderTemplate.html"
multipleReference:
Expand Down

0 comments on commit aaa8bea

Please sign in to comment.