From 1afa14dfed949577ee236bff72556e28fb09a241 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 24 Apr 2023 12:08:23 +0200 Subject: [PATCH] show title on link hovering --- src/routes/contrib.rs | 6 ++++-- templates/contrib.html | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/routes/contrib.rs b/src/routes/contrib.rs index 9cee097..ddae482 100644 --- a/src/routes/contrib.rs +++ b/src/routes/contrib.rs @@ -35,7 +35,8 @@ struct Project { struct Pull { url: String, id: u32, - name: String, + name_repo: String, + title: String, state: u8, } @@ -52,7 +53,8 @@ pub async fn build_page(config: Config) -> String { let project = Pull { url: p.contrib_url.clone(), id: p.id, - name: p.project.clone(), + name_repo: p.project.to_owned(), + title: p.title.to_owned(), state: p.status as u8, }; let project_name = p.project.as_str(); diff --git a/templates/contrib.html b/templates/contrib.html index 697cf1c..6d8a049 100644 --- a/templates/contrib.html +++ b/templates/contrib.html @@ -14,20 +14,24 @@

{{name}}

{{#pulls_merged}} - #{{id}} + #{{id}} {{/pulls_merged}}

{{/projects}}

En attente

{{#waiting}} {{#pulls_open}} - {{name}}#{{id}} + {{name_repo}}#{{id}} {{/pulls_open}} {{/waiting}}

Non mergées

{{#closed}} {{#pulls_closed}} - {{name}}#{{id}} + {{name_repo}}#{{id}} {{/pulls_closed}} {{/closed}}