unclean SPARC
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
*/
|
||||
|
||||
class ProjectFundingDocumentsView extends EICDomContent {
|
||||
|
||||
DOMContentLoaded(options) {
|
||||
|
||||
for(let model in options.models) this[model] = options.models[model];
|
||||
|
||||
this.components = ui.eicfy(this.el);
|
||||
|
||||
this.project.documents(this.project.current.project.number)
|
||||
.then(this.fill.bind(this))
|
||||
}
|
||||
|
||||
fill(data) {
|
||||
let content = this.find('section');
|
||||
for(let section of data) {
|
||||
content.append(ui.create(`<label large><b>${section.category}</b></label>`));
|
||||
let files = ui.create(`<ul bulleted small>`)
|
||||
content.append(files);
|
||||
for(let file of section.attachments) {
|
||||
let url = app.config.api['/files'].get.uri
|
||||
url = url.replace('{id}', file.id)
|
||||
files.append(ui.create(`<li><a href="${url}" noroute target="_blank">${file.label}</a></li>`));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('ProjectFundingDocumentsView',ProjectFundingDocumentsView);
|
||||
Reference in New Issue
Block a user