view.addMetadataRow(row);
});
},
+ getMetadataByKey: function (key) {
+ var ret;
+ this.node.getMetadata().some(function (row) {
+ if (row.key == 'relation.coverimage.url') {
+ ret = row.value;
+ return true;
+ }
+ });
+ return ret;
+ },
addMetadataRow: function(row) {
console.log(row);
var newRow = $(_.template(itemTemplate)({key: row.getKey() || '', value: row.getValue() || ''}));
newRow.find('td:nth-child(2)').append(valueSelectView.el).data('view', valueSelectView);
if (this.getIsFileForKey(row.getKey())) {
- var el = $("<a href='#-' class='attachment-library' style='float: right'>attachments</a>");
+ var el = $("<a href='#-' class='attachment-library' style='float: right'>" + gettext('attachments') + "</a>");
el.on('click', function() {
attachments.select(function(v) {
valueSelectView.setInput(v);