diff --git a/src/js/views/ViewObjectButtonView.js b/src/js/views/ViewObjectButtonView.js index 8d8d38afa..c57ba5621 100644 --- a/src/js/views/ViewObjectButtonView.js +++ b/src/js/views/ViewObjectButtonView.js @@ -16,6 +16,7 @@ define(["jquery", "backbone", "views/DataObjectView"], ( closeButton: ["close"], body: ["modal-body"], footer: ["modal-footer"], + titleIcon: ["icon", "icon-on-left"], }; const BUTTON_TEXT = "View"; const CLOSE_BUTTON_TEXT = "Close"; @@ -54,12 +55,12 @@ define(["jquery", "backbone", "views/DataObjectView"], ( * @param {string} options.title - The title of the modal * @returns {string} The HTML for the modal */ - modalTemplate({ title = "Data" } = {}) { + modalTemplate({ title = "Data", icon = "file-text" } = {}) { const id = `modal-${this.model.cid}`; return `
-

${title}

+

${title}

loading...

@@ -108,7 +109,9 @@ define(["jquery", "backbone", "views/DataObjectView"], ( */ renderModal() { const modalHTML = this.modalTemplate({ - title: this.model.get("title") || "Data", + title: + this.model.get("title") || this.model.get("fileName") || "Data", + icon: "table", }); const modal = $(modalHTML).modal(); const modalBody = modal.find(`.${CLASS_NAMES.body.join(".")}`);