server: highlight today's date on the calendar widget
This commit is contained in:
@@ -285,6 +285,7 @@ pub fn extract_calendar_metadata_from_mail(
|
||||
event_days: event_days.clone(),
|
||||
caption,
|
||||
description_paragraphs: &description_paragraphs,
|
||||
today: Some(chrono::Local::now().date_naive()),
|
||||
};
|
||||
if let Ok(rendered) = template.render() {
|
||||
body_html = Some(rendered);
|
||||
@@ -1444,10 +1445,11 @@ pub struct IcalSummaryTemplate<'a> {
|
||||
pub local_fmt_end: &'a str,
|
||||
pub organizer: &'a str,
|
||||
pub organizer_cn: &'a str,
|
||||
pub all_days: Vec<NaiveDate>,
|
||||
pub event_days: Vec<NaiveDate>,
|
||||
pub all_days: Vec<chrono::NaiveDate>,
|
||||
pub event_days: Vec<chrono::NaiveDate>,
|
||||
pub caption: String,
|
||||
pub description_paragraphs: &'a [String],
|
||||
pub today: Option<chrono::NaiveDate>,
|
||||
}
|
||||
|
||||
// Add this helper function to parse the DMARC XML and summarize it.
|
||||
@@ -1800,6 +1802,7 @@ pub fn render_ical_summary(ical_data: &str) -> Result<String, ServerError> {
|
||||
event_days: event_days.clone(),
|
||||
caption,
|
||||
description_paragraphs: description_paragraphs_val,
|
||||
today: Some(chrono::Local::now().date_naive()),
|
||||
};
|
||||
summary_parts.push(template.render()?);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user