From 2fec4d6b568aac9e5a913caf891171b43fe029e9 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Mon, 28 Jan 2013 17:15:06 +0000 Subject: [PATCH] added description to Generic Resource view Grid git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@68436 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../gcube/queries/xquery/resources/GenericResource.xq | 1 + .../support/shared/types/datamodel/ResourceDetailModel.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/gcube/resourcemanagement/support/server/gcube/queries/xquery/resources/GenericResource.xq b/src/main/java/org/gcube/resourcemanagement/support/server/gcube/queries/xquery/resources/GenericResource.xq index 472a7d6..8b5945d 100644 --- a/src/main/java/org/gcube/resourcemanagement/support/server/gcube/queries/xquery/resources/GenericResource.xq +++ b/src/main/java/org/gcube/resourcemanagement/support/server/gcube/queries/xquery/resources/GenericResource.xq @@ -12,4 +12,5 @@ let $subtype := $profiles//Resource/Profile/SecondaryType/text() {$subtype} {$scopes} {$profiles//Resource/Profile/Name/text()} + {$profiles//Resource/Profile/Description/text()} \ No newline at end of file diff --git a/src/main/java/org/gcube/resourcemanagement/support/shared/types/datamodel/ResourceDetailModel.java b/src/main/java/org/gcube/resourcemanagement/support/shared/types/datamodel/ResourceDetailModel.java index 2e155aa..5d0d7aa 100644 --- a/src/main/java/org/gcube/resourcemanagement/support/shared/types/datamodel/ResourceDetailModel.java +++ b/src/main/java/org/gcube/resourcemanagement/support/shared/types/datamodel/ResourceDetailModel.java @@ -435,7 +435,8 @@ public class ResourceDetailModel { ********************************************/ // The column model for grid representation modelColumns = new ArrayList(); - modelColumns.add(new ColumnConfig("Name", "Name", 500)); + modelColumns.add(new ColumnConfig("Name", "Name", 200)); + modelColumns.add(new ColumnConfig("Description", "Description", 400)); modelColumns.add(new ColumnConfig("Scopes", "Scopes", 300)); //Optional @@ -445,7 +446,7 @@ public class ResourceDetailModel { // create the column model cm = new ColumnModel(modelColumns); - for (int i = 2; i < modelColumns.size(); i++) { + for (int i = 3; i < modelColumns.size(); i++) { cm.setHidden(i, true); } RECORD_DEFINITION.put(ResourceTypeDecorator.GenericResource.name(), cm); @@ -456,6 +457,7 @@ public class ResourceDetailModel { type.setRecordName("Resource"); type.addField("ID"); type.addField("Name"); + type.addField("Description"); type.addField("Scopes"); type.addField("SubType"); type.addField("Type");