src_js/iconolab-bundle/src/components/editor/CommentList.vue
changeset 423 729e51dd282e
parent 410 a6db5e626850
child 504 11a862e01b04
--- a/src_js/iconolab-bundle/src/components/editor/CommentList.vue	Tue Mar 14 12:54:51 2017 +0100
+++ b/src_js/iconolab-bundle/src/components/editor/CommentList.vue	Tue Mar 14 13:07:45 2017 +0100
@@ -8,7 +8,8 @@
             v-bind:comment="comment.comment"
             v-bind:username="comment.user_name"
             v-bind:date="comment.submit_date"
-            v-bind:allowThread="comment.allow_thread"></comment>
+            v-bind:allow-thread="comment.allow_thread"
+            v-bind:is-authenticated="isAuthenticated"></comment>
     </div>
 </template>
 
@@ -17,7 +18,7 @@
     import Comment from './Comment.vue'
 
     export default {
-        props: ['annotation', 'fetch'],
+        props: ['annotation', 'fetch', 'is-authenticated'],
         components: {
             Comment
         },
@@ -39,6 +40,11 @@
                     this.comments = [];
                 }
             }
+        },
+        mounted() {
+            if (this.annotation) {
+                $.getJSON(this.commentsURL).then((comments) => this.comments = comments);
+            }
         }
     }
 
@@ -46,9 +52,9 @@
 
 <style scoped>
 .wrapper {
-    /* max-height: 200px; */
     height: auto;
     overflow-y: auto;
+    margin-bottom: 20px;
 }
 .alert {
     padding: 10px;