Added "as of" date display logic
This commit is contained in:
parent
f71c3b8bb7
commit
a4436fd844
@ -819,4 +819,7 @@
|
|||||||
<data name="“As of” Date Display" xml:space="preserve">
|
<data name="“As of” Date Display" xml:space="preserve">
|
||||||
<value>Visualización de la Fecha “Como de”</value>
|
<value>Visualización de la Fecha “Como de”</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="as of" xml:space="preserve">
|
||||||
|
<value>como de</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@ -579,7 +579,8 @@ with
|
|||||||
(this.date - req.updatedDate).Days <= this.listGroup.preferences.daysToKeepNew
|
(this.date - req.updatedDate).Days <= this.listGroup.preferences.daysToKeepNew
|
||||||
/// Generate this list as HTML
|
/// Generate this list as HTML
|
||||||
member this.asHtml (s : IStringLocalizer) =
|
member this.asHtml (s : IStringLocalizer) =
|
||||||
let prefs = this.listGroup.preferences
|
let prefs = this.listGroup.preferences
|
||||||
|
let asOfSize = Math.Round (float prefs.textFontSize * 0.8, 2)
|
||||||
[ match this.showHeader with
|
[ match this.showHeader with
|
||||||
| true ->
|
| true ->
|
||||||
yield div [ _style (sprintf "text-align:center;font-family:%s" prefs.listFonts) ] [
|
yield div [ _style (sprintf "text-align:center;font-family:%s" prefs.listFonts) ] [
|
||||||
@ -626,6 +627,18 @@ with
|
|||||||
| Some _ -> ()
|
| Some _ -> ()
|
||||||
| None -> ()
|
| None -> ()
|
||||||
yield rawText req.text
|
yield rawText req.text
|
||||||
|
match prefs.asOfDateDisplay with
|
||||||
|
| NoDisplay -> ()
|
||||||
|
| ShortDate
|
||||||
|
| LongDate ->
|
||||||
|
let dt =
|
||||||
|
match prefs.asOfDateDisplay with
|
||||||
|
| ShortDate -> req.updatedDate.ToShortDateString ()
|
||||||
|
| LongDate -> req.updatedDate.ToLongDateString ()
|
||||||
|
| _ -> ""
|
||||||
|
yield i [ _style (sprintf "font-size:%fpt" asOfSize) ] [
|
||||||
|
rawText " ("; str s.["as of "].Value; str dt; rawText ")"
|
||||||
|
]
|
||||||
])
|
])
|
||||||
|> ul []
|
|> ul []
|
||||||
yield br []
|
yield br []
|
||||||
|
Loading…
Reference in New Issue
Block a user