navbar search removed where it shouldnt be
This commit is contained in:
@@ -30,6 +30,8 @@ async fn index(
|
||||
"customer_account_type": c.customer_account_type,
|
||||
"currency_symbol": cur.symbol,
|
||||
"lang": current_lang(&jar),
|
||||
// The header search bar only appears on the landing page.
|
||||
"on_home": true,
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -340,11 +340,6 @@ async fn index(
|
||||
let mut context = run_search(&ctx, user.as_ref(), &SearchParams::default(), &cur).await?;
|
||||
let c = guard::chrome_from(&ctx, user.as_ref());
|
||||
add_chrome(&mut context, &c, ¤t_lang(&jar));
|
||||
// The shop page carries its own search box in the listing toolbar, so the
|
||||
// header search bar is redundant here — flag it so base.html can hide it.
|
||||
if let Some(map) = context.as_object_mut() {
|
||||
map.insert("on_shop".into(), json!(true));
|
||||
}
|
||||
format::view(&v, "shop/index.html", context)
|
||||
}
|
||||
|
||||
@@ -382,11 +377,6 @@ async fn search(
|
||||
|
||||
let c = guard::chrome_from(&ctx, user.as_ref());
|
||||
add_chrome(&mut context, &c, &lang);
|
||||
// The shop page carries its own search box in the listing toolbar, so the
|
||||
// header search bar is redundant here — flag it so base.html can hide it.
|
||||
if let Some(map) = context.as_object_mut() {
|
||||
map.insert("on_shop".into(), json!(true));
|
||||
}
|
||||
format::view(&v, "shop/index.html", context)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user