attribute overview shows only owned attributes

This commit is contained in:
azivner 2019-01-01 15:29:58 +01:00
parent cf96baad48
commit 6704b755d8
3 changed files with 7 additions and 3 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "trilium",
"version": "0.26.1",
"version": "0.27.0-beta",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -85,8 +85,11 @@ async function showAttributes() {
$promotedAttributesContainer.empty().append($tbody);
}
else if (note.type !== 'relation-map') {
if (attributes.length > 0) {
for (const attribute of attributes) {
// display only "own" notes
const ownedAttributes = attributes.filter(attr => attr.noteId === note.noteId);
if (ownedAttributes.length > 0) {
for (const attribute of ownedAttributes) {
if (attribute.type === 'label') {
$attributeListInner.append(utils.formatLabel(attribute) + " ");
}

View file

@ -53,6 +53,7 @@
padding: 10px 0 10px 0;
margin: 0 10px 0 16px;
border: 1px solid #ccc;
border-radius: 5px;
}
#context-menu-container {