Port commit page
This commit is contained in:
parent
db0234b750
commit
373b3168f1
7 changed files with 111 additions and 19 deletions
|
|
@ -1,4 +1,5 @@
|
|||
use askama::Template;
|
||||
use time::OffsetDateTime;
|
||||
|
||||
use crate::server::util;
|
||||
|
||||
|
|
@ -51,6 +52,25 @@ impl LinkRunShort {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(
|
||||
ext = "html",
|
||||
source = "<a href=\"{{ link }}\">Run from {{ date }}</a>"
|
||||
)]
|
||||
pub struct LinkRunDate {
|
||||
link: Link,
|
||||
date: String, // TODO base.date(...)?
|
||||
}
|
||||
|
||||
impl LinkRunDate {
|
||||
pub fn new(base: &Base, id: String, start: OffsetDateTime) -> Self {
|
||||
Self {
|
||||
link: base.link(PathRunById { id }),
|
||||
date: util::format_time(start),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(ext = "html", source = "<a href=\"{{ link }}\">{{ name }}</a>")]
|
||||
pub struct LinkWorker {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue