summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/views
diff options
context:
space:
mode:
authormconway <michael.c.conway@gmail.com>2013-01-26 14:16:20 (GMT)
committer mconway <michael.c.conway@gmail.com>2013-01-26 14:16:20 (GMT)
commit75760d046520dc34698d354c238aca52edecc88a (patch)
treef9ee38aec7cf014704e156c93379291c1bf73712 /idrop-web/grails-app/views
parent94299476fb5e49410b25c67b37b75403192d3fbf (diff)
downloadQCG-Data-75760d046520dc34698d354c238aca52edecc88a.zip
QCG-Data-75760d046520dc34698d354c238aca52edecc88a.tar.gz
QCG-Data-75760d046520dc34698d354c238aca52edecc88a.tar.bz2
[#511] addign sharing to idrop-web
Diffstat (limited to 'idrop-web/grails-app/views')
-rwxr-xr-xidrop-web/grails-app/views/home/index.gsp29
-rw-r--r--idrop-web/grails-app/views/home/quickViewList.gsp1
-rw-r--r--idrop-web/grails-app/views/home/shareQuickViewList.gsp45
-rw-r--r--idrop-web/grails-app/views/home/shareWithMeQuickViewList.gsp48
4 files changed, 120 insertions, 3 deletions
diff --git a/idrop-web/grails-app/views/home/index.gsp b/idrop-web/grails-app/views/home/index.gsp
index a078c20..1e23ae4 100755
--- a/idrop-web/grails-app/views/home/index.gsp
+++ b/idrop-web/grails-app/views/home/index.gsp
@@ -12,10 +12,13 @@
<!-- nav for table -->
<ul class="nav nav-list">
<li class="nav-header">Tools</li>
- <li id="quickUpload" class="quicknav"><a href="#" onclick="quickUploadFromHome()">Quick Upload</a></li>
+ <li id="quickUpload" class="quicknav"><a href="#" onclick="quickUploadFromHome()">Quick upload</a></li>
<li class="nav-header">Starred</li>
- <li id="quickStarredFiles" class="quicknav"><a href="#" onclick="quickViewShowStarredFiles()">Starred Files</a></li>
- <li id="quickStarredFolders" class="quicknav"><a href="#" onclick="quickViewShowStarredFolders()">Starred Folders</a></li>
+ <li id="quickStarredFiles" class="quicknav"><a href="#" onclick="quickViewShowStarredFiles()">Starred files</a></li>
+ <li id="quickStarredFolders" class="quicknav"><a href="#" onclick="quickViewShowStarredFolders()">Starred folders</a></li>
+ <li class="nav-header">Shared</li>
+ <li id="quickSharedByMeFolders" class="quicknav"><a href="#" onclick="quickViewShowFoldersSharedByMe()">Folders shared by me</a></li>
+ <li id="quickSharedWithMeFolders" class="quicknav"><a href="#" onclick="quickViewShowFoldersSharedWithMe()">Folders shared with me</a></li>
</ul>
</div>
<div id="quickViewListContainer" class="span8"></div>
@@ -52,6 +55,26 @@
lcSendValueWithParamsAndPlugHtmlInDiv(url, params, "#quickViewListContainer", null);
}
+ function quickViewShowFoldersSharedByMe() {
+ resetQuicknav();
+ $("#quickSharedByMeFolders").addClass("active");
+ var url = "/home/sharedCollectionsByMe";
+ var params = {
+
+ }
+ lcSendValueWithParamsAndPlugHtmlInDiv(url, params, "#quickViewListContainer", null);
+ }
+
+ function quickViewShowFoldersSharedWithMe() {
+ resetQuicknav();
+ $("#quickSharedWithMeFolders").addClass("active");
+ var url = "/home/sharedCollectionsWithMe";
+ var params = {
+
+ }
+ lcSendValueWithParamsAndPlugHtmlInDiv(url, params, "#quickViewListContainer", null);
+ }
+
function resetQuicknav() {
$(".quicknav").removeClass("active");
}
diff --git a/idrop-web/grails-app/views/home/quickViewList.gsp b/idrop-web/grails-app/views/home/quickViewList.gsp
index 91819b5..1080625 100644
--- a/idrop-web/grails-app/views/home/quickViewList.gsp
+++ b/idrop-web/grails-app/views/home/quickViewList.gsp
@@ -1,4 +1,5 @@
<%@page import="org.irods.jargon.core.query.MetaDataAndDomainData" %>
+ <%@page import="org.irods.jargon.usertagging.domain.IRODSSharedFileOrCollection" %>
<table class="table table-striped table-hover">
<thead>
<tr>
diff --git a/idrop-web/grails-app/views/home/shareQuickViewList.gsp b/idrop-web/grails-app/views/home/shareQuickViewList.gsp
new file mode 100644
index 0000000..cf07db5
--- /dev/null
+++ b/idrop-web/grails-app/views/home/shareQuickViewList.gsp
@@ -0,0 +1,45 @@
+ <%@page import="org.irods.jargon.core.query.MetaDataAndDomainData" %>
+ <%@page import="org.irods.jargon.usertagging.domain.IRODSSharedFileOrCollection" %>
+<table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th>Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ <g:each in="${listing}" var="entry">
+ <tr>
+ <g:if test="${entry.metadataDomain == MetaDataAndDomainData.MetadataDomain.COLLECTION}">
+ <td></td>
+ <td><span class="setPaddingLeftAndRight"><g:link controller="browse" action="index" params="[mode: 'path', absPath: entry.domainUniqueName]"><i class="icon-folder-open "></i></g:link></span>
+ <span class="setPaddingLeftAndRight"><i class="icon-upload " onclick="quickviewUpload('${entry.domainUniqueName}')"></i></span></td>
+ <td>${entry.shareName}</td>
+ </g:if>
+ <g:else>
+ <td></td>
+ <td><span class="setPaddingLeftAndRight"><g:link controller="browse" action="index" params="[mode: 'path', absPath: entry.domainUniqueName]"><i class="icon-folder-open "></i></g:link></span><span class="setPaddingLeftAndRight"><g:link url="${'file/download' + entry.domainUniqueName}"><i class="icon-download "></i></g:link></span></td>
+ <td>${entry.shareName}</td>
+ </g:else>
+ </tr>
+ </g:each>
+ </tbody>
+
+</table>
+<script>
+
+/**
+* Show the uplaod dialog using the hidden path in the info view
+*/
+function quickviewUpload(path) {
+ if (path == null) {
+ showErrorMessage(jQuery.i18n.prop('msg.path.missing'));
+ return false;
+ }
+
+ showUploadDialogUsingPath(path);
+
+
+}
+</script> \ No newline at end of file
diff --git a/idrop-web/grails-app/views/home/shareWithMeQuickViewList.gsp b/idrop-web/grails-app/views/home/shareWithMeQuickViewList.gsp
new file mode 100644
index 0000000..d6d82a6
--- /dev/null
+++ b/idrop-web/grails-app/views/home/shareWithMeQuickViewList.gsp
@@ -0,0 +1,48 @@
+ <%@page import="org.irods.jargon.core.query.MetaDataAndDomainData" %>
+ <%@page import="org.irods.jargon.usertagging.domain.IRODSSharedFileOrCollection" %>
+<table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th></th>
+ <th>Action</th>
+ <th>Name</th>
+ <th>By User</th>
+ </tr>
+ </thead>
+ <tbody>
+ <g:each in="${listing}" var="entry">
+ <tr>
+ <g:if test="${entry.metadataDomain == MetaDataAndDomainData.MetadataDomain.COLLECTION}">
+ <td></td>
+ <td><span class="setPaddingLeftAndRight"><g:link controller="browse" action="index" params="[mode: 'path', absPath: entry.domainUniqueName]"><i class="icon-folder-open "></i></g:link></span>
+ <span class="setPaddingLeftAndRight"><i class="icon-upload " onclick="quickviewUpload('${entry.domainUniqueName}')"></i></span></td>
+ <td>${entry.shareName}</td>
+ <td>${entry.shareOwner}#${entry.shareOwnerZone}</td>
+ </g:if>
+ <g:else>
+ <td></td>
+ <td><span class="setPaddingLeftAndRight"><g:link controller="browse" action="index" params="[mode: 'path', absPath: entry.domainUniqueName]"><i class="icon-folder-open "></i></g:link></span><span class="setPaddingLeftAndRight"><g:link url="${'file/download' + entry.domainUniqueName}"><i class="icon-download "></i></g:link></span></td>
+ <td>${entry.shareName}</td>
+ <td>${entry.shareOwner}#${entry.shareOwnerZone}</td>
+ </g:else>
+ </tr>
+ </g:each>
+ </tbody>
+
+</table>
+<script>
+
+/**
+* Show the uplaod dialog using the hidden path in the info view
+*/
+function quickviewUpload(path) {
+ if (path == null) {
+ showErrorMessage(jQuery.i18n.prop('msg.path.missing'));
+ return false;
+ }
+
+ showUploadDialogUsingPath(path);
+
+
+}
+</script> \ No newline at end of file