mirror of
https://dev.sigpipe.me/dashie/git.txt
synced 2025-10-05 23:32:48 +02:00
Show edit time if edited, add expiry on nice columns
This commit is contained in:
1
TODO.org
1
TODO.org
@@ -6,7 +6,6 @@
|
||||
** TODO xorm update, breaking changes
|
||||
*** migrate to gorm ?
|
||||
|
||||
** TODO Add edit time on view gist
|
||||
** TODO Add line-break option
|
||||
** TODO Add more checks for <nil> fields wrongly used, like issue with non existant file
|
||||
** TODO Add pictures from git with zz_.png; Edit web interface, and add file; wrong duplicate !!
|
||||
|
@@ -93,8 +93,9 @@ show_uploads_for = "Show uploads for %s"
|
||||
show_all_uploads = "Show all uploads"
|
||||
edit = "Edit"
|
||||
delete = "Delete"
|
||||
expiry_on = "Expiry on:"
|
||||
expiry_on = "Expires on:"
|
||||
created_on = "Created on:"
|
||||
updated_on = "Updated on:"
|
||||
raw_file = "raw file"
|
||||
file_too_big = "File is too big and can't be displayed."
|
||||
over_page_size = "Page size limit exceeded and file won't me displayed."
|
||||
|
@@ -95,6 +95,7 @@ edit = "Editer"
|
||||
delete = "Supprimer"
|
||||
expiry_on = "Expire le:"
|
||||
created_on = "Crée le:"
|
||||
updated_on = "Mis-à-jour le:"
|
||||
raw_file = "fichier brut"
|
||||
file_too_big = "Le fichier trop gros et ne peut être affiché."
|
||||
over_page_size = "Limite de taille pour la page atteinte et le fichier ne sera pas affiché."
|
||||
|
@@ -260,6 +260,8 @@ func View(ctx *context.Context) {
|
||||
ctx.Data["expiry"] = ctx.Gitxt.Gitxt.ExpiryHours
|
||||
ctx.Data["expiryOn"] = ctx.Gitxt.Gitxt.Expiry
|
||||
ctx.Data["createdOn"] = ctx.Gitxt.Gitxt.Created
|
||||
ctx.Data["updated"] = (ctx.Gitxt.Gitxt.UpdatedUnix > ctx.Gitxt.Gitxt.CreatedUnix)
|
||||
ctx.Data["updatedOn"] = ctx.Gitxt.Gitxt.Updated
|
||||
|
||||
// Get the files from git
|
||||
var repoSpec = "HEAD"
|
||||
|
@@ -37,15 +37,9 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="gitxt_description">
|
||||
{{.i18n.Tr "gitxt_view.created_on"}} <time datetime="{{DateFmtLong .createdOn}}">{{DateFmtLong .createdOn}}</time>
|
||||
{{if .expiry}}
|
||||
{{if eq .expiry 0}}
|
||||
{{else}}
|
||||
{{.i18n.Tr "gitxt_view.expiry_on"}} <time datetime="{{DateFmtLong .expiryOn}}">{{DateFmtLong .expiryOn}}</time>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="col-md-4">{{.i18n.Tr "gitxt_view.created_on"}} <time datetime="{{DateFmtLong .createdOn}}">{{DateFmtLong .createdOn}}</time></div>
|
||||
<div class="col-md-4">{{if .updated}}{{.i18n.Tr "gitxt_view.updated_on"}} <time datetime="{{DateFmtLong .updatedOn}}">{{DateFmtLong .updatedOn}}</time>{{end}}</div>
|
||||
<div class="col-md-4">{{if .expiry}}{{if eq .expiry 0}}{{else}}{{.i18n.Tr "gitxt_view.expiry_on"}} <time datetime="{{DateFmtLong .expiryOn}}">{{DateFmtLong .expiryOn}}</time>{{end}}{{end}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user