This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit bbda507678e4c294b994f60577287833f524c95c
Author: Marcus Christie <machr...@iu.edu>
AuthorDate: Fri Feb 23 01:33:35 2018 -0500

    AIRAVATA-2688 Fix edit link
---
 .../js/groups_components/GroupListItem.vue         | 26 ++++++----------------
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git 
a/django_airavata/apps/groups/static/django_airavata_groups/js/groups_components/GroupListItem.vue
 
b/django_airavata/apps/groups/static/django_airavata_groups/js/groups_components/GroupListItem.vue
index 3c69956..eb500a7 100644
--- 
a/django_airavata/apps/groups/static/django_airavata_groups/js/groups_components/GroupListItem.vue
+++ 
b/django_airavata/apps/groups/static/django_airavata_groups/js/groups_components/GroupListItem.vue
@@ -3,32 +3,20 @@
         <td>{{ group.name }}</td>
         <td>{{ group.ownerId }}</td>
         <td>{{ group.description }}</td>
-        <td><span v-html="action"></span></td>
+        <td>
+            <a v-if="group.isOwner || group.isAdmin"
+                :href="'/groups/edit/' + encodeURIComponent(group.id) + '/'">
+                Edit <i class="fa fa-pencil"></i>
+            </a>
+        </td>
     </tr>
 </template>
 
 <script>
-import moment from 'moment';
 
 export default {
     name: 'group-list-item',
-    props: ['group', 'type'],
-    computed: {
-      action: function() {
-          // TODO: use (isOwner || isAdmin) here
-          if(this.type == 'owner') {
-            let deleteUrl = "/api/deleteGroup/"+this.group.groupID;
-            let threeSpace = '&nbsp;&nbsp;&nbsp;'
-            return '<a href="#">Edit <i class="fa 
fa-pencil"></i></a>'+threeSpace+'<a href="'+deleteUrl+'">Delete <i class="fa 
fa-trash"></i></a>';
-          }
-          else if(this.type == 'member') {
-            return '<a href="#">Leave <i class="fa fa-sign-out"></i></a>'
-          }
-          else {
-            return '';
-          }
-      },
-    }
+    props: ['group'],
 }
 </script>
 

-- 
To stop receiving notification emails like this one, please contact
machris...@apache.org.

Reply via email to