[Task #17552] Workspace: reconsider the actions Private Link, Folder Link and Get Link

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@181720 82a268e6-3cf1-43bd-a215-b396298e98cf
task/19600
Francesco Mangiacrapa 5 years ago
parent 5699ae6115
commit 490005bda6

@ -3,7 +3,10 @@
component="org.gcube.portlets-user.workspace-portlet.6-23-0"
date="${buildDate}">
<Change>[Task #17226] Removing HL </Change>
<Change>[Task #17524] Hiding 'Add Administrator" on VRE Folders</Change>
<Change>[Task #17524] Hiding 'Add Administrator" on VRE Folders
</Change>
<Change>[Task #17552] Workspace: reconsider the actions Private Link, Folder Link and Get Link
</Change>
</Changeset>
<Changeset
component="org.gcube.portlets-user.workspace-portlet.6-22-0"

@ -6,6 +6,7 @@ package org.gcube.portlets.user.workspace.client.resources;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.TextResource;
/**
* @author Francesco Mangiacrapa francesco.mangiacrapa{@literal @}isti.cnr.it
@ -14,8 +15,14 @@ import com.google.gwt.resources.client.ImageResource;
*/
public interface WsPortletResources extends ClientBundle {
public static final WsPortletResources ICONS = GWT.create(WsPortletResources.class);
public static final WsPortletResources INSTANCE = GWT.create(WsPortletResources.class);
@Source("upload16.png")
ImageResource upload16();
@Source("publiclink-howto.txt")
TextResource publicLinkHowTo();
@Source("sharelink-howto.txt")
TextResource shareLinkkHowTo();
}

@ -0,0 +1,8 @@
<div style='text-align:justify'>
By sharing this link with your coworkers you will enact anyone with the link to access the content, no login will be requested.
<p style='font-weight:bold'>Link To File:</p>
Get a public link to file in your Workspace to download it. Any link always point to the latest version of a file.
<p style='font-weight:bold'>Link To Folder:</p>
The owner or administrator of a folder can get a public link to it in order to allow 'guest' users to access to the content of the folder (and its sub-folders).
The 'guest' user will access in read-only mode and it will can navigate the content and download files of the folder (and its subfolders).
</div>

@ -0,0 +1,3 @@
<div style='text-align:justify'>
By sharing this link with your coworkers (belonging to the shared folder) you will enact users, after login, to access the content.
</div>

@ -7,6 +7,7 @@ import org.gcube.portlets.user.workspace.client.AppController;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
import org.gcube.portlets.user.workspace.client.ConstantsPortlet;
import org.gcube.portlets.user.workspace.client.resources.Resources;
import org.gcube.portlets.user.workspace.client.resources.WsPortletResources;
import com.github.gwtbootstrap.client.ui.Alert;
import com.github.gwtbootstrap.client.ui.Button;
@ -175,9 +176,9 @@ public class WorkspaceFeaturesView extends Composite {
overversioninglk.setAnimation(false);
overversioninglk.setWidget(versioning);
overversioninglk.setHeading("Workspace version control");
String icon = "<span style=\"margin-right:5px\">"+Resources.getIconVersioning().getSafeHtml().asString()+"</span>";
overversioninglk.setText(icon+"Workspace keeps track of any file version, transparently. <p>To see the other file versions, " +
overversioninglk.setHeading(icon+"Workspace version control");
overversioninglk.setText("Workspace keeps track of any file version, transparently. <p>To see the other file versions, " +
"select a file, then right click on it and click \""+ ConstantsExplorer.FILE_VERSIONS +"\".</p>");
overversioninglk.setHtml(true);
overversioninglk.setPlacement(Placement.BOTTOM);
@ -191,10 +192,9 @@ public class WorkspaceFeaturesView extends Composite {
overFolderlk.setAnimation(false);
overFolderlk.setWidget(flk);
overFolderlk.setHeading("Workspace Folder Link");
String icon = "<span style=\"margin-right:5px\">"+Resources.getIconFolderPublic().getSafeHtml().asString()+"</span>";
overFolderlk.setText(icon+"The owner or administrator can create the Folder Link as public link in order to allow 'guest' users to access to the content of the folder (and its sub-folders). " +
"The 'guest' user will access in read-only mode and it will can navigate and download files of the Folder Link (and its subfolders). You can send the Folder Link to anyone by pasting it into Workspace Message, your emails, instant messages, etc.");
String icon = "<span style=\"margin-right:5px\">"+Resources.getIconShareLink().getSafeHtml().asString()+"</span>";
overFolderlk.setHeading(icon+"Workspace Share Link");
overFolderlk.setText(WsPortletResources.INSTANCE.shareLinkkHowTo().getText());
overFolderlk.setHtml(true);
overFolderlk.setPlacement(Placement.BOTTOM);
overFolderlk.setTrigger(Trigger.HOVER);
@ -207,9 +207,9 @@ public class WorkspaceFeaturesView extends Composite {
private void initPopupShareFeature() {
overShF.setAnimation(false);
overShF.setWidget(shf);
overShF.setHeading("Workspace Share Folders and Files");
String icon = "<span style=\"margin-right:5px\">"+Resources.getIconShareFolder().getSafeHtml().asString()+"</span>";
overShF.setText(icon+"The quickest way to share something is using the Share Folder. Locate the folder with the files you want to share and then click 'Share'");
overShF.setHeading(icon+"Workspace Share Folders and Files");
overShF.setText("The quickest way to share something is using the Share Folder. Locate the folder with the files you want to share and then click 'Share'");
overShF.setHtml(true);
overShF.setPlacement(Placement.BOTTOM);
overShF.setTrigger(Trigger.HOVER);
@ -243,9 +243,9 @@ public class WorkspaceFeaturesView extends Composite {
private void initPopupPlkFeature() {
overPlk.setAnimation(false);
overPlk.setWidget(plk);
overPlk.setHeading("Workspace Public Link");
String icon = "<span style=\"margin-right:5px\">"+Resources.getIconPublicLink().getSafeHtml().asString()+"</span>";
overPlk.setText(icon+"Create links to files in your Workspace to download them. You can send the links to anyone by pasting them in your emails, instant messages, etc. Any link always point to the latest version.");
overPlk.setHeading(icon+"Workspace Public Link");
overPlk.setText(WsPortletResources.INSTANCE.publicLinkHowTo().getText());
overPlk.setHtml(true);
overPlk.setPlacement(Placement.BOTTOM);
overPlk.setTrigger(Trigger.HOVER);

@ -29,7 +29,7 @@
verticalAlignment="middle">
<b:Label ui:field="shf" text="Share"></b:Label>
<b:Label ui:field="flk" text="Folder Link"></b:Label>
<b:Label ui:field="flk" text="Share Link"></b:Label>
<b:Label ui:field="plk" text="Public Link"></b:Label>
<b:Label ui:field="upl" text="Upload"></b:Label>
<b:Label ui:field="versioning" text="Version control"></b:Label>

@ -38,7 +38,6 @@ import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.button.ToggleButton;
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
import com.google.gwt.core.shared.GWT;
/**
* The Class GxtToolBarItemFunctionality.
@ -67,7 +66,7 @@ public class GxtToolBarItemFunctionality {
// private Button btnGetInfo;
private Button btnGetSharedLink;
private Button btnPublicLink;
private Button btnFolderLink;
//private Button btnFolderLink;
private Button btnMoveItems;
//private Button btnPasteItem;
private Button btnCutItem;
@ -177,7 +176,7 @@ public class GxtToolBarItemFunctionality {
// toolBar.add(new SeparatorToolItem());
toolBar.add(new SeparatorToolItem());
btnGetSharedLink = new Button("Get Link", Resources.getIconShareLink());
btnGetSharedLink = new Button("Share Link", Resources.getIconShareLink());
btnGetSharedLink.setScale(ButtonScale.SMALL);
btnGetSharedLink.setIconAlign(IconAlign.TOP);
btnGetSharedLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
@ -192,13 +191,13 @@ public class GxtToolBarItemFunctionality {
toolBar.add(btnPublicLink);
toolBar.add(new SeparatorToolItem());
//see Task #17552
// btnFolderLink = new Button("Folder Link", Resources.getIconFolderPublic());
// btnFolderLink.setScale(ButtonScale.SMALL);
// btnFolderLink.setIconAlign(IconAlign.TOP);
// btnFolderLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
btnFolderLink = new Button("Folder Link", Resources.getIconFolderPublic());
btnFolderLink.setScale(ButtonScale.SMALL);
btnFolderLink.setIconAlign(IconAlign.TOP);
btnFolderLink.setArrowAlign(ButtonArrowAlign.BOTTOM);
toolBar.add(btnFolderLink);
//toolBar.add(btnFolderLink);
//CUT
btnCutItem = new Button("Cut", Resources.getIconCut());
@ -365,24 +364,30 @@ public class GxtToolBarItemFunctionality {
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
AppController.getEventBus().fireEvent(new GetPublicLinkEvent(fileGridModel, null));
}
});
btnFolderLink.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
GWT.log("file selected: "+fileGridModel);
if(fileGridModel.isDirectory())
if(fileGridModel.isDirectory()) {
AppController.getEventBus().fireEvent(new WsGetFolderLinkEvent(fileGridModel));
}else {
AppController.getEventBus().fireEvent(new GetPublicLinkEvent(fileGridModel, null));
}
}
});
// btnFolderLink.addSelectionListener(new SelectionListener<ButtonEvent>() {
//
// @Override
// public void componentSelected(ButtonEvent ce) {
//
// final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem();
// GWT.log("file selected: "+fileGridModel);
// if(fileGridModel.isDirectory())
// AppController.getEventBus().fireEvent(new WsGetFolderLinkEvent(fileGridModel));
//
// }
// });
// btnGetInfo.addSelectionListener(new SelectionListener<ButtonEvent>() {
@ -599,7 +604,7 @@ public class GxtToolBarItemFunctionality {
this.btnPreview.disable();
this.btnPublicLink.disable();
this.btnFolderLink.disable();
//this.btnFolderLink.disable();
this.btnGetSharedLink.disable();
this.btnSetPermission.disable();
this.btnMoveItems.disable();
@ -680,7 +685,8 @@ public class GxtToolBarItemFunctionality {
}
this.btnRefreshFolder.enable();
}else if(target.isDirectory()){
this.btnFolderLink.enable();
//this.btnFolderLink.enable();
this.btnPublicLink.enable();
this.btnRefreshFolder.enable();
}
@ -746,7 +752,7 @@ public class GxtToolBarItemFunctionality {
btnPreview.setEnabled(active);
btnOpen.setEnabled(active);
btnPublicLink.setEnabled(active);
btnFolderLink.setEnabled(active);
//btnFolderLink.setEnabled(active);
btnMoveItems.setEnabled(active);
}
@ -761,7 +767,7 @@ public class GxtToolBarItemFunctionality {
this.btnOpen.setEnabled(!active);
this.btnGetSharedLink.setEnabled(!active);
this.btnPublicLink.setEnabled(!active);
this.btnFolderLink.setEnabled(!active);
//this.btnFolderLink.setEnabled(!active);
this.btnSetPermission.setEnabled(!active);
//ONLY ENABLED

Loading…
Cancel
Save