From c3c5bb79d89ffe86bb81badbe02fdf16cb038332 Mon Sep 17 00:00:00 2001 From: diya17 Date: Tue, 8 Aug 2023 16:30:14 -0400 Subject: [PATCH 01/24] [CITE-173] Frontend for reprocessing --- .../citesphere/web/user/ItemController.java | 17 +++++ .../webapp/WEB-INF/views/auth/group/item.html | 75 ++++++++++++++++++- 2 files changed, 89 insertions(+), 3 deletions(-) diff --git a/citesphere/src/main/java/edu/asu/diging/citesphere/web/user/ItemController.java b/citesphere/src/main/java/edu/asu/diging/citesphere/web/user/ItemController.java index a2b6a692b..c6bb3eb7b 100644 --- a/citesphere/src/main/java/edu/asu/diging/citesphere/web/user/ItemController.java +++ b/citesphere/src/main/java/edu/asu/diging/citesphere/web/user/ItemController.java @@ -5,16 +5,22 @@ import java.util.List; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; +import org.springframework.social.zotero.exception.ZoteroConnectionException; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import edu.asu.diging.citesphere.core.exceptions.CannotFindCitationException; +import edu.asu.diging.citesphere.core.exceptions.CitationIsOutdatedException; import edu.asu.diging.citesphere.core.exceptions.GroupDoesNotExistException; import edu.asu.diging.citesphere.core.exceptions.ZoteroHttpStatusException; +import edu.asu.diging.citesphere.core.exceptions.ZoteroItemCreationFailedException; import edu.asu.diging.citesphere.core.search.service.SearchEngine; import edu.asu.diging.citesphere.core.service.ICitationManager; import edu.asu.diging.citesphere.core.service.impl.CitationPage; @@ -66,4 +72,15 @@ public String getItem(Authentication authentication, Model model, @PathVariable( } return "auth/group/item"; } + + @RequestMapping(value = "/auth/group/{zoteroGroupId}/file/reprocess", method = RequestMethod.POST) + public ResponseEntity deleteFile(Authentication authentication, + @PathVariable("zoteroGroupId") String zoteroGroupId, + @RequestParam(value = "documentId", required = false) String documentId, + @RequestParam(value = "itemId", required = false) String itemId) + throws GroupDoesNotExistException, CannotFindCitationException, ZoteroHttpStatusException, + ZoteroConnectionException, CitationIsOutdatedException, ZoteroItemCreationFailedException { + + return new ResponseEntity<>(HttpStatus.OK); + } } diff --git a/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html b/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html index 428bfe38b..c1d66aa9b 100644 --- a/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html +++ b/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html @@ -1,5 +1,7 @@ + + @@ -360,10 +410,11 @@

Files

From 3cee57b844f8c6047f626f70ddecaa09a051fafb Mon Sep 17 00:00:00 2001 From: diya17 Date: Wed, 13 Sep 2023 13:00:22 -0700 Subject: [PATCH 09/24] [CITE-173] Making css changes and adding tests --- .../webapp/WEB-INF/views/auth/group/item.html | 4 ++- .../resources/bootstrap/css/word-wrap.css | 3 ++ .../service/impl/CitationManagerTest.java | 36 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 citesphere/src/main/webapp/resources/bootstrap/css/word-wrap.css diff --git a/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html b/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html index 5fd0758a0..2355408ce 100644 --- a/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html +++ b/citesphere/src/main/webapp/WEB-INF/views/auth/group/item.html @@ -2,6 +2,8 @@ +