forked from 0x2620/pandora
show remaining document keys
This commit is contained in:
parent
ef4921b16d
commit
95c08e929e
1 changed files with 24 additions and 0 deletions
|
@ -28,6 +28,13 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
}).map(function(key){
|
}).map(function(key){
|
||||||
return key.id;
|
return key.id;
|
||||||
}),
|
}),
|
||||||
|
displayedKeys = [ // FIXME: can tis be a flag in the config?
|
||||||
|
'title', 'notes', 'name', 'description', 'id',
|
||||||
|
'user', 'rightslevel', 'timesaccessed',
|
||||||
|
'extension', 'dimensions', 'size', 'matches',
|
||||||
|
'created', 'modified', 'accessed',
|
||||||
|
'random', 'entity'
|
||||||
|
],
|
||||||
statisticsWidth = 128,
|
statisticsWidth = 128,
|
||||||
|
|
||||||
$bar = Ox.Bar({size: 16})
|
$bar = Ox.Bar({size: 16})
|
||||||
|
@ -234,6 +241,10 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
|
|
||||||
Ox.getObjectById(pandora.site.documentKeys, 'keywords') && renderGroup(['keywords'])
|
Ox.getObjectById(pandora.site.documentKeys, 'keywords') && renderGroup(['keywords'])
|
||||||
|
|
||||||
|
// Render any remaing keys defined in config
|
||||||
|
|
||||||
|
renderRemainingKeys();
|
||||||
|
|
||||||
|
|
||||||
// Description -------------------------------------------------------------
|
// Description -------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -321,6 +332,7 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Extension, Dimensions, Size ---------------------------------------------
|
// Extension, Dimensions, Size ---------------------------------------------
|
||||||
|
|
||||||
['extension', 'dimensions', 'size'].forEach(function(key) {
|
['extension', 'dimensions', 'size'].forEach(function(key) {
|
||||||
|
@ -533,6 +545,7 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
|
|
||||||
function renderGroup(keys) {
|
function renderGroup(keys) {
|
||||||
var $element;
|
var $element;
|
||||||
|
keys.forEach(function(key) { displayedKeys.push(key) });
|
||||||
if (canEdit || keys.filter(function(key) {
|
if (canEdit || keys.filter(function(key) {
|
||||||
return data[key];
|
return data[key];
|
||||||
}).length) {
|
}).length) {
|
||||||
|
@ -565,6 +578,17 @@ pandora.ui.documentInfoView = function(data, isMixed) {
|
||||||
return $element;
|
return $element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderRemainingKeys() {
|
||||||
|
var keys = pandora.site.documentKeys.filter(function(item) {
|
||||||
|
return item.id != '*' && !Ox.contains(displayedKeys, item.id);
|
||||||
|
}).map(function(item) {
|
||||||
|
return item.id;
|
||||||
|
});
|
||||||
|
if (keys.length) {
|
||||||
|
renderGroup(keys)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function renderRightsLevel() {
|
function renderRightsLevel() {
|
||||||
var $rightsLevelElement = getRightsLevelElement(data.rightslevel),
|
var $rightsLevelElement = getRightsLevelElement(data.rightslevel),
|
||||||
$rightsLevelSelect;
|
$rightsLevelSelect;
|
||||||
|
|
Loading…
Reference in a new issue