Skip to content
Browse files

Merge pull request #2111 from apex13/SAKIII-5608

SAKIII-5608 - Add Content - 'Sharing Disabled' message appears for public and shareable item
  • Loading branch information...
2 parents c7b8415 + 55e9bca commit 5860907f009e44054dc422a4e249af1f0cfe14a0 Bert Pareyn committed
View
2 devwidgets/newaddcontent/javascript/newaddcontent.js
@@ -391,7 +391,7 @@ require(['jquery', 'sakai/sakai.api.core', 'underscore', 'jquery-plugins/jquery.
'sakai:pooled-content-manager': managers,
'_path': item.id,
'_mimeType': $(item).data('mimetype'),
- 'canshare': $(item).data('canshare'),
+ 'canshare': $(item).attr('data-canshare'),
'type': 'existing',
'css_class': $(item).next().children(newaddcontentExistingItemsListContainerListItemIcon)[0].id
};
View
3 devwidgets/newaddcontent/newaddcontent.html
@@ -249,12 +249,11 @@ <h2 id="newaddcontent_container_selecteditems_header" class="s3d-bold">__MSG__CO
<button type="button" class="s3d-link-button s3d-bold newaddcontent_selecteditems_actions_permissions">__MSG__ADD_PERMISSIONS__</button>
</span>
{else}
- {var canShare = sakai.api.Content.canCurrentUserShareContent(item)}
{if $.inArray(currentSelectedLibrary, item["sakai:pooled-content-viewer"]) !== -1 || $.inArray(currentSelectedLibrary, item["sakai:pooled-content-manager"]) !== -1}
<span class="newaddcontent_selecteditems_title newaddcontent_selecteditems_title_gotit">${sakai.api.Util.applyThreeDots(item["sakai:pooled-content-file-name"], 100)} (__MSG__GOT_IT__)</span>
{elseif sakai.api.Content.Collections.isCollection(item) && (sakai.api.Content.Collections.getCollectionGroupId(item) === currentSelectedLibrary || sakai.api.Content.Collections.isCollectionInMyLibrary(item))}
<span class="newaddcontent_selecteditems_title newaddcontent_selecteditems_title_gotit">${sakai.api.Util.applyThreeDots(item["sakai:pooled-content-file-name"], 100)} (__MSG__GOT_IT__)</span>
- {elseif !canShare && currentSelectedLibrary !== me.user.userid}
+ {elseif item.canshare === 'false' && currentSelectedLibrary !== me.user.userid}
<span class="newaddcontent_selecteditems_title newaddcontent_selecteditems_title_gotit">${sakai.api.Util.applyThreeDots(item["sakai:pooled-content-file-name"], 100)} (__MSG__SHARING_DISABLED__)</span>
{else}
<span class="newaddcontent_selecteditems_title">${sakai.api.Util.applyThreeDots(item["sakai:pooled-content-file-name"], 100)}</span>

0 comments on commit 5860907

Please sign in to comment.
Something went wrong with that request. Please try again.