From 1ae0ba5addbcf3d527f1e75cc895aaf023063a7d Mon Sep 17 00:00:00 2001
From: Tyler Schicke <tyler_schicke@brown.edu>
Date: Mon, 18 Mar 2019 14:05:37 -0400
Subject: Cleaned up field view

---
 src/client/views/nodes/FieldView.tsx | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

(limited to 'src/client/views/nodes/FieldView.tsx')

diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx
index 49f4cefce..e84c5f933 100644
--- a/src/client/views/nodes/FieldView.tsx
+++ b/src/client/views/nodes/FieldView.tsx
@@ -16,6 +16,7 @@ import { WebBox } from "./WebBox";
 import { VideoBox } from "./VideoBox";
 import { AudioBox } from "./AudioBox";
 import { AudioField } from "../../../fields/AudioField";
+import { ListField } from "../../../fields/ListField";
 
 
 //
@@ -60,12 +61,20 @@ export class FieldView extends React.Component<FieldViewProps> {
         }
         else if (field instanceof WebField) {
             return <WebBox {...this.props} />
-        } 
-        else if (field instanceof VideoField){ 
-            return <VideoBox {...this.props}/>
         }
-        else if (field instanceof AudioField){ 
-            return <AudioBox {...this.props}/>
+        else if (field instanceof VideoField) {
+            return <VideoBox {...this.props} />
+        }
+        else if (field instanceof AudioField) {
+            return <AudioBox {...this.props} />
+        } else if (field instanceof Document) {
+            return <div>{field.Title}</div>
+        } else if (field instanceof ListField) {
+            return (<div>
+                {(field as ListField<Field>).Data.map(f => {
+                    return f instanceof Document ? f.Title : f.GetValue().toString();
+                }).join(", ")}
+            </div>)
         }
         // bcz: this belongs here, but it doesn't render well so taking it out for now
         // else if (field instanceof HtmlField) {
-- 
cgit v1.2.3-70-g09d2

