diff --git a/front/current/components/project/slot.component.html b/front/current/components/project/slot.component.html index 5fe5155718715fccd4790772647cd943028b5778..4bd89997b8842d2eb7d1328054e2befb7a26ab24 100644 --- a/front/current/components/project/slot.component.html +++ b/front/current/components/project/slot.component.html @@ -7,7 +7,7 @@ (click)="download(document)" *ngIf="!document.loading" >{{ document.data['name'] }} - {{ document.data['created'] }} diff --git a/front/current/components/project/slot.component.ts b/front/current/components/project/slot.component.ts index 8e1f745e49b8f19ec89da4cc6e1118de9c92bc82..13c8c32ca335d27de3f14eb54c611b10d917ff15 100644 --- a/front/current/components/project/slot.component.ts +++ b/front/current/components/project/slot.component.ts @@ -4,6 +4,9 @@ import { Model, Collection } from '../../services/rest.service'; import { NewDocumentSlotComponent } from './new-document-slot.component'; +declare var moment:any; + + @Component({ selector: 'document-slot', templateUrl: config.static_url + '/components/project/slot.component.html', @@ -20,6 +23,8 @@ export class SlotComponent { parent_documents:Collection; parent_document_slots:Collection; + moment = moment; + public download(document_:Model) { document_.setFilters({verbosity: 'data'}).fetch(() => { var link = document.createElement('a'); diff --git a/front/index.default.html b/front/index.default.html index 9280e52da27b1ab278b4b93a76beec5563f0967e..87d4b5e2f7e1db8122153ee209b23d93675b09d8 100644 --- a/front/index.default.html +++ b/front/index.default.html @@ -21,6 +21,8 @@ + + diff --git a/front/package.json b/front/package.json index 9129149ad233a7f05bdbf010054f51b39ecfb9da..f502417aaf62fff0f2a9cd6be722b2758f33c5c6 100644 --- a/front/package.json +++ b/front/package.json @@ -17,6 +17,7 @@ "es6-promise": "^3.0.2", "es6-shim": "^0.33.3", "googleapis": "^5.0.0", + "moment": "^2.13.0", "node-sass": "^3.4.2", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.2",