summaryrefslogtreecommitdiff
path: root/public/assets/js/lib/views/details/files.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-01-11 13:55:55 +0100
committerJules Laplace <julescarbon@gmail.com>2018-01-11 13:55:55 +0100
commitb3ba48a22ce966e62cfad1671e4ee6f4357bb69f (patch)
tree4c670b51c4f43ebf6f857b5999c2bc0f3f0e807c /public/assets/js/lib/views/details/files.js
parent2e9e542bfb81c3aff407801e3ae3f08eee0fb3d9 (diff)
move file api, debug flag on url to show ids
Diffstat (limited to 'public/assets/js/lib/views/details/files.js')
-rw-r--r--public/assets/js/lib/views/details/files.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/public/assets/js/lib/views/details/files.js b/public/assets/js/lib/views/details/files.js
index b68d42c..a074e2a 100644
--- a/public/assets/js/lib/views/details/files.js
+++ b/public/assets/js/lib/views/details/files.js
@@ -82,7 +82,8 @@ var FilesView = FormView.extend({
var date_class = carbon_date(file.date)
var link = make_link(file)
- var t = this.template.replace(/{{username}}/g, file.username)
+ var t = this.template.replace(/{{id}}/g, file.id)
+ .replace(/{{username}}/g, file.username)
.replace(/{{link}}/g, link)
.replace(/{{filename}}/g, file.filename)
.replace(/{{date_class}}/g, date_class)
@@ -91,7 +92,10 @@ var FilesView = FormView.extend({
.replace(/{{size_class}}/g, size[0])
.replace(/{{size}}/g, size[1])
var $t = $(t)
- return t
+ if (app.debug) {
+ $t.find('.user').append(' #' + file.id)
+ }
+ return $t
},
prependFile: function(file){