diff --git a/frontend/src/js/component/wb-project-listing.js b/frontend/src/js/component/wb-project-listing.js
index ed07d0c..896522b 100644
--- a/frontend/src/js/component/wb-project-listing.js
+++ b/frontend/src/js/component/wb-project-listing.js
@@ -18,7 +18,7 @@ class WBProjectListing extends Component {
prepareRows(items) {
const { app, renderRenameLink, renderDeleteButton,
- renderSelectionCell } = this.props;
+ renderSelectionCell, renderSharingButton } = this.props;
return items.map(item => [
renderSelectionCell(item),
@@ -39,6 +39,7 @@ class WBProjectListing extends Component {
{ renderDeleteButton(item, () => this.fetchItems()) }
+ { renderSharingButton(item) }
)
]);
}
diff --git a/frontend/src/js/dialog/wb-browse-dialog.js b/frontend/src/js/dialog/wb-browse-dialog.js
index 5c91caa..fa9954d 100644
--- a/frontend/src/js/dialog/wb-browse-dialog.js
+++ b/frontend/src/js/dialog/wb-browse-dialog.js
@@ -42,6 +42,7 @@ class WBBrowseDialog extends Component {
this.state.bottomPage = 0;
this.state.collectionPath = '';
this.state.textSearch = '';
+ this.state.id = ('id' in this.props) ? this.props.id : uuid.v4();
}
navigateBack() {
@@ -134,10 +135,14 @@ class WBBrowseDialog extends Component {
);
}
- render({ app, id, selectMany, selectWhat },
+ show(callback) {
+ $('#' + this.state.id).modal();
+ }
+
+ render({ app, selectMany, selectWhat },
{ history, currentUrl, mode, uuid,
topPage, bottomPage, textSearch,
- collectionPath }) {
+ collectionPath, id }) {
return (
diff --git a/frontend/src/js/page/wb-app.js b/frontend/src/js/page/wb-app.js
index a59e65d..8e125fc 100644
--- a/frontend/src/js/page/wb-app.js
+++ b/frontend/src/js/page/wb-app.js
@@ -13,6 +13,7 @@ import WBWorkflowView from 'wb-workflow-view';
import WBLaunchWorkflowPage from 'wb-launch-workflow-page';
import WBDownloadPage from 'wb-download-page';
import WBImageViewerPage from 'wb-image-viewer-page';
+import WBSharingPage from 'wb-sharing-page';
import arvadosTypeName from 'arvados-type-name';
class WBApp extends Component {
@@ -97,6 +98,8 @@ class WBApp extends Component {
+
+
);
}
diff --git a/frontend/src/js/page/wb-browse.js b/frontend/src/js/page/wb-browse.js
index 8be72c7..aad22eb 100644
--- a/frontend/src/js/page/wb-browse.js
+++ b/frontend/src/js/page/wb-browse.js
@@ -109,6 +109,15 @@ class WBBrowse extends Component {
);
}
+ renderSharingButton(item) {
+ return (
+
+
+
+ );
+ }
+
moveOrCopyOp(op) {
const { ownerUuid, app } = this.props;
const { selected } = this.state;
@@ -164,7 +173,8 @@ class WBBrowse extends Component {
getPageUrl={ i => this.getUrl({ 'activePage': i }) }
renderRenameLink={ (it, cb) => this.renderRenameLink(it, cb) }
renderDeleteButton={ (it, cb) => this.renderDeleteButton(it, cb) }
- renderSelectionCell={ it => this.renderSelectionCell(it) } />
+ renderSelectionCell={ it => this.renderSelectionCell(it) }
+ renderSharingButton={ it => this.renderSharingButton(it) } />
{ (mode !== 'browse') ? null : (
this.setState({
+ 'rows': this.prepareRows(xhr.response.items)
+ }));
+ }
+
+ deletePermission(uuid) {
+ throw Error('Not implemented');
+ }
+
+ prepareRows(items) {
+ const { app } = this.props;
+ return items.map(it => [
+ ( ),
+ ( ),
+ ( )
+ ]);
+ }
+
+ render({ app, uuid }, { rows }) {
+ return (
+
+
+
+
+
+
+ This is the sharing management page for { uuid }
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default WBSharingPage;
diff --git a/frontend/src/js/widget/wb-select.js b/frontend/src/js/widget/wb-select.js
new file mode 100644
index 0000000..2ce89b1
--- /dev/null
+++ b/frontend/src/js/widget/wb-select.js
@@ -0,0 +1,19 @@
+import { h, Component } from 'preact';
+
+class WBSelect extends Component {
+ render({ value, options, onChange }) {
+ return (
+
+ );
+ }
+}
+
+export default WBSelect;