diff --git a/src/build.rs b/src/build.rs index 7da5e55..d46dddf 100644 --- a/src/build.rs +++ b/src/build.rs @@ -861,17 +861,15 @@ pub fn fallback_words(plan: &Plan) -> BTreeMap { ); } for need in &plan.needs { - let (path, back) = match &need.enters_as { - None => (format!("questions/received/{}.yaml", need.id), "/".to_string()), - Some(group) => (format!("questions/{group}/{}-sent.yaml", need.id), format!("/{group}")), + let path = match &need.enters_as { + None => format!("questions/received/{}.yaml", need.id), + Some(group) => format!("questions/{group}/{}-sent.yaml", need.id), }; - let _ = back; let mut page = json!({ "question": "What happens now?", "description": format!("It has reached our {}.", humanize(&need.handled_by).to_lowercase()), "next_heading": "We read it and come back to you", "next_description": format!("Questions in the meantime go to {} at {}.", plan.contact.name, plan.contact.email), - "back": "Back", }); if need.watched_by.iter().any(|g| g == PUBLIC) { page["see_all"] = json!({ "heading": format!("See all {}", humanize(&need.lands_in).to_lowercase()), "description": "", "button": "Open" }); @@ -959,7 +957,6 @@ pub fn fallback_words(plan: &Plan) -> BTreeMap { "list_title": humanize(bucket), "list_note": loc(lang, "Each row is one case and the stage it has reached. Names and contact details are not shown here.", "Hver rad er én sak og hvor langt den har kommet. Navn og kontaktopplysninger vises ikke her."), "empty": loc(lang, "Nothing here yet.", "Ingenting her ennå."), - "back": "Back", }), ); } @@ -1613,9 +1610,13 @@ pub fn render(plan: &Plan, words: &BTreeMap) -> anyhow::Result (format!("questions/received/{}.yaml", need.id), "/".to_string()), - Some(group) => (format!("questions/{group}/{}-sent.yaml", need.id), format!("/{group}")), + // No "back" alternative: portal's way down the tree (the arrow at + // the left and the link at the foot) takes a visitor + // one level down from any page, here to the front door or, after + // an internal form, to the group's desk. + let path = match &need.enters_as { + None => format!("questions/received/{}.yaml", need.id), + Some(group) => format!("questions/{group}/{}-sent.yaml", need.id), }; let w = &words[&path]; let mut alternatives = vec![ @@ -1627,7 +1628,6 @@ pub fn render(plan: &Plan, words: &BTreeMap) -> anyhow::Result) -> anyhow::Result