More humane timedate formatting in footer
This commit is contained in:
parent
b5bcd66011
commit
73df2edc1a
1 changed files with 3 additions and 3 deletions
|
@ -39,14 +39,14 @@ impl Resource for ArticleResource {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get(self: Box<Self>) -> ResponseFuture {
|
fn get(self: Box<Self>) -> ResponseFuture {
|
||||||
use chrono::{self, TimeZone, Local};
|
use chrono::{TimeZone, Local};
|
||||||
|
|
||||||
#[derive(BartDisplay)]
|
#[derive(BartDisplay)]
|
||||||
#[template="templates/article_revision.html"]
|
#[template="templates/article_revision.html"]
|
||||||
struct Template<'a> {
|
struct Template<'a> {
|
||||||
article_id: i32,
|
article_id: i32,
|
||||||
revision: i32,
|
revision: i32,
|
||||||
created: &'a chrono::DateTime<Local>,
|
created: &'a str,
|
||||||
|
|
||||||
edit: bool,
|
edit: bool,
|
||||||
cancel_url: Option<&'a str>,
|
cancel_url: Option<&'a str>,
|
||||||
|
@ -70,7 +70,7 @@ impl Resource for ArticleResource {
|
||||||
body: &Template {
|
body: &Template {
|
||||||
article_id: data.article_id,
|
article_id: data.article_id,
|
||||||
revision: data.revision,
|
revision: data.revision,
|
||||||
created: &Local.from_utc_datetime(&data.created),
|
created: &Local.from_utc_datetime(&data.created).to_rfc2822(),
|
||||||
edit: self.edit,
|
edit: self.edit,
|
||||||
cancel_url: Some(&data.slug),
|
cancel_url: Some(&data.slug),
|
||||||
title: &data.title,
|
title: &data.title,
|
||||||
|
|
Loading…
Reference in a new issue