')
.css({marginBottom: '4px'})
- .append(formatKey('Rights Level', 'statistics'))
+ .append(formatKey('Rights Level', 'link', '/copyrights'))
.append($rightsLevel)
.appendTo($statistics);
+ pandora.createLinks($div);
renderRightsLevel();
// Comments ----------------------------------------------------------------
@@ -653,7 +656,7 @@ pandora.ui.infoView = function(data) {
}
}
- function formatKey(key, mode) {
+ function formatKey(key, mode, link) {
var item = Ox.getObjectById(pandora.site.itemKeys, key);
key = Ox._(item ? item.title : key);
mode = mode || 'text';
@@ -664,13 +667,20 @@ pandora.ui.infoView = function(data) {
} else if (key == 'keyword') {
key = 'keywords'
}
+ var value = Ox.toTitleCase(key)
+ .replace(' Of ', ' of ')
+ .replace(' Per ', ' per ')
return mode == 'text'
- ? '
' + Ox.toTitleCase(key) + ': '
+ ? '
' + value + ': '
: mode == 'description'
- ? Ox.toTitleCase(key)
+ ? value
+ : mode == 'link'
+ ? Ox.Element()
+ .css({marginBottom: '4px', fontWeight: 'bold'})
+ .html('
' + value + '')
: Ox.Element()
.css({marginBottom: '4px', fontWeight: 'bold'})
- .html(Ox.toTitleCase(key).replace(' Per ', ' per '));
+ .html(value);
}
function formatLight(str) {
@@ -1077,6 +1087,7 @@ pandora.ui.infoView = function(data) {
});
$element.appendTo($text);
}
+ return $element;
}
function renderRightsLevel() {
@@ -1109,7 +1120,7 @@ pandora.ui.infoView = function(data) {
$rightsLevelSelect
.css({background: $rightsLevelElement.css('background')})
.data({OxColor: $rightsLevelElement.data('OxColor')})
- renderCapabilities(rightsLevel);
+ // renderCapabilities(rightsLevel);
pandora.api.edit({id: data.id, rightslevel: rightsLevel}, function(result) {
// ...
});
@@ -1123,10 +1134,12 @@ pandora.ui.infoView = function(data) {
})
.appendTo($rightsLevel);
}
+ /*
if (data.parts) {
$capabilities = $('
').appendTo($rightsLevel);
renderCapabilities(data.rightslevel);
}
+ */
}
function toggleIconSize() {