Added relations in detail view

Change-Id: Ic947ecb5aa7d38290cab30017386214bf7527321
diff --git a/src/app/views/crud/crud.ts b/src/app/views/crud/crud.ts
index d19a942..1d4eccd 100644
--- a/src/app/views/crud/crud.ts
+++ b/src/app/views/crud/crud.ts
@@ -74,6 +74,13 @@
       this.list = false;
     }
   }
+
+  public getRelatedItem(relation: string, item: any): number {
+    if (angular.isDefined(item[relation.toLowerCase()])) {
+      return item[relation.toLowerCase()];
+    }
+    return 0;
+  }
 }
 
 export const xosCrud: angular.IComponentOptions = {