Skip to content

Commit

Permalink
SAKIII-5608 Add Content - Fixing logic for 'Sharing Disabled' Message.
Browse files Browse the repository at this point in the history
  • Loading branch information
apex13 committed May 12, 2012
1 parent 81377b9 commit 55e9bca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion devwidgets/newaddcontent/javascript/newaddcontent.js
Expand Up @@ -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
};
Expand Down
3 changes: 1 addition & 2 deletions devwidgets/newaddcontent/newaddcontent.html
Expand Up @@ -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>
Expand Down

0 comments on commit 55e9bca

Please sign in to comment.