From 43120132dd71cffb0a97ba5449c0918a4064e957 Mon Sep 17 00:00:00 2001 From: PradnyaC11 Date: Thu, 22 Aug 2024 11:57:12 -0700 Subject: [PATCH 01/22] [CITE-163] Created collection.html page to import collection --- .../jobs/ImportCollectionsController.java | 31 ++++ .../WEB-INF/views/auth/import/collection.html | 158 ++++++++++++++++++ .../webapp/WEB-INF/views/layouts/main.html | 1 + 3 files changed, 190 insertions(+) create mode 100644 citesphere/src/main/java/edu/asu/diging/citesphere/web/user/jobs/ImportCollectionsController.java create mode 100644 citesphere/src/main/webapp/WEB-INF/views/auth/import/collection.html diff --git a/citesphere/src/main/java/edu/asu/diging/citesphere/web/user/jobs/ImportCollectionsController.java b/citesphere/src/main/java/edu/asu/diging/citesphere/web/user/jobs/ImportCollectionsController.java new file mode 100644 index 000000000..b1018e2ac --- /dev/null +++ b/citesphere/src/main/java/edu/asu/diging/citesphere/web/user/jobs/ImportCollectionsController.java @@ -0,0 +1,31 @@ +package edu.asu.diging.citesphere.web.user.jobs; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.Authentication; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +import edu.asu.diging.citesphere.core.service.ICitationManager; +import edu.asu.diging.citesphere.core.service.jobs.IUploadJobManager; +import edu.asu.diging.citesphere.user.IUser; + +@Controller +public class ImportCollectionsController { + private final Logger logger = LoggerFactory.getLogger(getClass()); + + @Autowired + private IUploadJobManager jobManager; + + @Autowired + private ICitationManager citationManager; + + @RequestMapping(value = "/auth/import/collection", method = RequestMethod.GET) + public String show(Model model, Authentication authentication) { + model.addAttribute("groups", citationManager.getGroups((IUser)authentication.getPrincipal())); + return "auth/import/collection"; + } +} diff --git a/citesphere/src/main/webapp/WEB-INF/views/auth/import/collection.html b/citesphere/src/main/webapp/WEB-INF/views/auth/import/collection.html new file mode 100644 index 000000000..53eea9b2d --- /dev/null +++ b/citesphere/src/main/webapp/WEB-INF/views/auth/import/collection.html @@ -0,0 +1,158 @@ + + + + + + + + +
+
+
+
+ Upload References +
+
+ + + + + +

Select files from your computer

+
+
+ +
+ +
+
+ +
+ +
+
+ + +

Or drag and drop files below

+
Just drag and + drop files here
+ + +
+

Processed files

+
+
+
+
+
+ +
+ + \ No newline at end of file diff --git a/citesphere/src/main/webapp/WEB-INF/views/layouts/main.html b/citesphere/src/main/webapp/WEB-INF/views/layouts/main.html index db0d1104e..bda2bff20 100644 --- a/citesphere/src/main/webapp/WEB-INF/views/layouts/main.html +++ b/citesphere/src/main/webapp/WEB-INF/views/layouts/main.html @@ -90,6 +90,7 @@