Fix bug #653: Formatting dcreation date in issues list
parent
ca10665032
commit
01ce85c766
|
@ -23,6 +23,7 @@ taiga = @.taiga
|
||||||
|
|
||||||
module = angular.module("taigaCommon")
|
module = angular.module("taigaCommon")
|
||||||
|
|
||||||
|
|
||||||
defaultFilter = ->
|
defaultFilter = ->
|
||||||
return (value, defaultValue) ->
|
return (value, defaultValue) ->
|
||||||
if value is [null, undefined]
|
if value is [null, undefined]
|
||||||
|
@ -31,6 +32,7 @@ defaultFilter = ->
|
||||||
|
|
||||||
module.filter("default", defaultFilter)
|
module.filter("default", defaultFilter)
|
||||||
|
|
||||||
|
|
||||||
yesNoFilter = ->
|
yesNoFilter = ->
|
||||||
#TODO: i18n
|
#TODO: i18n
|
||||||
return (value) ->
|
return (value) ->
|
||||||
|
@ -41,7 +43,26 @@ yesNoFilter = ->
|
||||||
|
|
||||||
module.filter("yesNo", yesNoFilter)
|
module.filter("yesNo", yesNoFilter)
|
||||||
|
|
||||||
|
|
||||||
unslugify = ->
|
unslugify = ->
|
||||||
return taiga.unslugify
|
return taiga.unslugify
|
||||||
|
|
||||||
module.filter("unslugify", unslugify)
|
module.filter("unslugify", unslugify)
|
||||||
|
|
||||||
|
|
||||||
|
momentFormat = ->
|
||||||
|
return (input, format) ->
|
||||||
|
if input
|
||||||
|
return moment(input).format(format)
|
||||||
|
return ""
|
||||||
|
|
||||||
|
module.filter("momentFormat", momentFormat)
|
||||||
|
|
||||||
|
|
||||||
|
momentFromNow = ->
|
||||||
|
return (input, without_suffix) ->
|
||||||
|
if input
|
||||||
|
return moment(input).fromNow(without_suffix or false)
|
||||||
|
return ""
|
||||||
|
|
||||||
|
module.filter("momentFromNow", momentFromNow)
|
||||||
|
|
|
@ -21,7 +21,7 @@ section.issues-table.basic-table(ng-class="{empty: !issues.length}")
|
||||||
span.issue-status-bind
|
span.issue-status-bind
|
||||||
span.icon.icon-arrow-bottom(tg-check-permission, permission="modify_issue")
|
span.icon.icon-arrow-bottom(tg-check-permission, permission="modify_issue")
|
||||||
|
|
||||||
div.created-field(tg-bo-bind="issue.created_date")
|
div.created-field(tg-bo-bind="issue.created_date|momentFormat:'DD MMM YYYY HH:mm'")
|
||||||
|
|
||||||
div.assigned-field(tg-issue-assigned-to-inline-edition="issue")
|
div.assigned-field(tg-issue-assigned-to-inline-edition="issue")
|
||||||
a.issue-assignedto(href="", title="Assigned to")
|
a.issue-assignedto(href="", title="Assigned to")
|
||||||
|
|
Loading…
Reference in New Issue