make per item document info editable if user can edit item

This commit is contained in:
j 2014-04-17 19:32:30 +00:00
commit df44b0daf4
4 changed files with 11 additions and 6 deletions

View file

@ -520,7 +520,8 @@ pandora.ui.documentsPanel = function(options) {
var $name, $description,
item = $list.value($list.options('selected')[0]),
editable = item.user == pandora.user.username
|| pandora.site.capabilities.canEditDocuments[pandora.user.level],
|| pandora.site.capabilities.canEditDocuments[pandora.user.level]
|| options.editable,
labelWidth = 80,
width = ui.documentSize - 16 - Ox.UI.SCROLLBAR_SIZE;
return isItemView

View file

@ -68,7 +68,10 @@ pandora.ui.item = function() {
} else if (pandora.user.ui.itemView == 'documents') {
pandora.$ui.contentPanel.replaceElement(1,
pandora.$ui.documents = pandora.ui.documentsPanel({isItemView: true})
pandora.$ui.documents = pandora.ui.documentsPanel({
editable: result.data.editable,
isItemView: true
})
);
} else if (pandora.user.ui.itemView == 'player') {