From 53ba7a2adf7a2fa69e8ff764e638296822a0802a Mon Sep 17 00:00:00 2001 From: Ivona Mircheva Date: Fri, 6 Jul 2018 16:37:29 +0300 Subject: [PATCH 1/4] Add video field to speaker. Co-authored-by: AlexLaskin Co-authored-by: MagiMarinova --- migrate-add-videos.sql | 1 + src/main/java/site/model/Speaker.java | 9 +++++++++ src/main/webapp/WEB-INF/tags/user/speaker.tag | 8 ++++++++ src/main/webapp/admin/speaker/edit.jsp | 8 ++++++++ src/main/webapp/admin/speaker/view.jsp | 2 ++ src/main/webapp/admin/submission/view.jsp | 4 ++++ src/main/webapp/speaker.jsp | 20 ++++++++++++++----- 7 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 migrate-add-videos.sql diff --git a/migrate-add-videos.sql b/migrate-add-videos.sql new file mode 100644 index 00000000..7fd71e9a --- /dev/null +++ b/migrate-add-videos.sql @@ -0,0 +1 @@ +ALTER TABLE USER ADD COLUMN VIDEOS VARCHAR(255); \ No newline at end of file diff --git a/src/main/java/site/model/Speaker.java b/src/main/java/site/model/Speaker.java index 113284a5..728589ff 100644 --- a/src/main/java/site/model/Speaker.java +++ b/src/main/java/site/model/Speaker.java @@ -38,6 +38,8 @@ public class Speaker extends User { @Lob private byte[] picture; + + private String videos; @OneToMany(mappedBy = "speaker", cascade = CascadeType.REMOVE, fetch = FetchType.LAZY, targetEntity = Submission.class) private Set submissions = new HashSet<>(); @@ -81,6 +83,13 @@ public String getBio() { public void setBio(String bio) { this.bio = bio; } + + public String getVideos() { + return videos; + } + public void setVideos(String videos) { + this.videos = videos; + } public String getTwitter() { return twitter; diff --git a/src/main/webapp/WEB-INF/tags/user/speaker.tag b/src/main/webapp/WEB-INF/tags/user/speaker.tag index d10e3964..5b6a8fe7 100644 --- a/src/main/webapp/WEB-INF/tags/user/speaker.tag +++ b/src/main/webapp/WEB-INF/tags/user/speaker.tag @@ -44,6 +44,14 @@ +
+
+ +
+
+ +
+
diff --git a/src/main/webapp/admin/speaker/edit.jsp b/src/main/webapp/admin/speaker/edit.jsp index 5b4055c2..7adeb48c 100644 --- a/src/main/webapp/admin/speaker/edit.jsp +++ b/src/main/webapp/admin/speaker/edit.jsp @@ -117,6 +117,14 @@
+
+
+ +
+
+ +
+
diff --git a/src/main/webapp/admin/speaker/view.jsp b/src/main/webapp/admin/speaker/view.jsp index b796c7a7..1e264dfc 100644 --- a/src/main/webapp/admin/speaker/view.jsp +++ b/src/main/webapp/admin/speaker/view.jsp @@ -29,6 +29,7 @@ Accepted? Branch? Picture + Video Operations @@ -42,6 +43,7 @@ ${speaker.accepted} ${speaker.branch} + ${speaker.videos} Edit   Remove diff --git a/src/main/webapp/admin/submission/view.jsp b/src/main/webapp/admin/submission/view.jsp index 83ce1167..b6b7696a 100644 --- a/src/main/webapp/admin/submission/view.jsp +++ b/src/main/webapp/admin/submission/view.jsp @@ -33,7 +33,9 @@ Level Type Speaker + Speaker video Co-Speaker + Co-Speaker video Branch Status Operations @@ -45,7 +47,9 @@ ${submission.level} ${submission.type != null ? submission.type.toString() : "Conference session"} ${submission.speaker.firstName} ${submission.speaker.lastName} + ${submission.speaker.videos} ${submission.coSpeaker.firstName} ${submission.coSpeaker.lastName} + ${submission.coSpeaker.videos} ${submission.branch} ${submission.status} diff --git a/src/main/webapp/speaker.jsp b/src/main/webapp/speaker.jsp index b5a9cf38..5c1477cf 100644 --- a/src/main/webapp/speaker.jsp +++ b/src/main/webapp/speaker.jsp @@ -50,7 +50,7 @@ Back

-
+
@@ -64,10 +64,20 @@
- -

- -

+
+

+ +

+
+
+
+ +
+ +
+