diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java index 7d246ec..736d4fd 100644 --- a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java +++ b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java @@ -103,7 +103,8 @@ public class TabularResourceProperties extends FramedPanel { protected VerticalLayoutContainer layoutTable; protected TextButton saveButton; protected TextButton validationsButton; - + protected TextButton resourcesButton; + protected ArrayList licencesList; public TabularResourceProperties(String name, EventBus eventBus) { @@ -266,10 +267,27 @@ public class TabularResourceProperties extends FramedPanel { }; validationsButton.addSelectHandler(validationsHandler); + // Resources Button + resourcesButton = new TextButton("Resources"); + resourcesButton.setIcon(ResourceBundle.INSTANCE.resources()); + resourcesButton.setIconAlign(IconAlign.RIGHT); + resourcesButton.setTitle("Resources"); + + SelectHandler resourcesHandler = new SelectHandler() { + + public void onSelect(SelectEvent event) { + openResources(); + + } + }; + resourcesButton.addSelectHandler(resourcesHandler); + + // HBoxLayoutContainer hBox = new HBoxLayoutContainer(); hBox.add(saveButton, new BoxLayoutData(new Margins(2, 5, 2, 5))); hBox.add(validationsButton, new BoxLayoutData(new Margins(2, 5, 2, 5))); - + hBox.add(resourcesButton, new BoxLayoutData(new Margins(2, 5, 2, 5))); + layoutTabularResource.add(hBox, new VerticalLayoutData(-1, -1, new Margins(2))); @@ -420,6 +438,19 @@ public class TabularResourceProperties extends FramedPanel { Log.error("TRId is null"); } } + + protected void openResources() { + Log.debug("Request Resources Tab"); + if (trId != null) { + WidgetRequestEvent e = new WidgetRequestEvent( + WidgetRequestType.RESOURCESPANEL); + e.setTrId(trId); + eventBus.fireEvent(e); + } else { + Log.error("TRId is null"); + } + } + protected void updateTable(TableData tableData) { trId = tableData.getTrId(); diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/ResourceBundle.java b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/ResourceBundle.java index 7e1a4d9..c2708f5 100644 --- a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/ResourceBundle.java +++ b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/ResourceBundle.java @@ -35,6 +35,11 @@ public interface ResourceBundle extends ClientBundle { @Source("page-white-share_32.png") ImageResource share32(); + @Source("resources.png") + ImageResource resources(); + + @Source("resources_32.png") + ImageResource resources32(); } \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/resources.png b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/resources.png new file mode 100644 index 0000000..bf0488a Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/resources.png differ diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/resources_32.png b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/resources_32.png new file mode 100644 index 0000000..c10cfa3 Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/resources_32.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/resources.png b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/resources.png new file mode 100644 index 0000000..bf0488a Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/resources.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/resources_32.png b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/resources_32.png new file mode 100644 index 0000000..c10cfa3 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/resources_32.png differ