added possibilty to create category with no description

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/join-vre@148856 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2017-05-18 15:56:20 +00:00
parent 601eb7605f
commit 713385b86a
3 changed files with 12 additions and 6 deletions

View File

@ -34,7 +34,7 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>

View File

@ -41,7 +41,10 @@ public class ResponsivePanel extends Composite {
GWT.log("cat: " + cat.getName());
PageHeader header = new PageHeader();
header.setText(cat.getName());
header.setSubtext(cat.getDescription());
if (cat.getDescription() == null || cat.getDescription().compareTo("") == 0 || cat.getDescription().compareTo("empty") == 0 )
header.setSubtext("");
else
header.setSubtext(cat.getDescription());
mainPanel.add(header);
mainPanel.add(getVREThumbnails(categories, cat));

View File

@ -29,7 +29,10 @@ public class VreThumbnail extends Composite {
interface VreThumbnailUiBinder extends UiBinder<Widget, VreThumbnail> {
}
private final JoinServiceAsync joinService = GWT.create(JoinService.class);
private final static String PUBLIC_VRE_BUTTON_LABEL= "Access this VRE";
private final static String PRIVATE_VRE_BUTTON_LABEL= "Private";
private final static String RESTRICTED_VRE_BUTTON_LABEL= "Request Access";
@UiField Heading vreName;
@UiField Image vreImage;
@UiField Button joinButton;
@ -47,7 +50,7 @@ public class VreThumbnail extends Composite {
switch (vre.getMembershipType()) {
case RESTRICTED:
joinButton.setType(ButtonType.DEFAULT);
joinButton.setText("Request Access");
joinButton.setText(RESTRICTED_VRE_BUTTON_LABEL);
if (vre.getUserBelonging() == UserBelonging.PENDING) {
joinButton.setText("Waiting approval");
joinButton.setType(ButtonType.WARNING);
@ -55,11 +58,11 @@ public class VreThumbnail extends Composite {
}
break;
case OPEN:
joinButton.setText("Enter this VRE");
joinButton.setText(PUBLIC_VRE_BUTTON_LABEL);
break;
default:
joinButton.setEnabled(false);
joinButton.setText("Private");
joinButton.setText(PRIVATE_VRE_BUTTON_LABEL);
break;
}
if (vre.getUserBelonging() == UserBelonging.BELONGING) {