Actually show full parents when requested
This commit is contained in:
parent
b55c8373d3
commit
cfaaa01fbf
|
@ -229,7 +229,12 @@ pub fn parents_breadcrumb(
|
||||||
@if !full && parents.len() > LIMIT {
|
@if !full && parents.len() > LIMIT {
|
||||||
li .breadcrumb-item { "…" }
|
li .breadcrumb-item { "…" }
|
||||||
}
|
}
|
||||||
@for parent in parents.iter().rev().take(LIMIT).rev() {
|
@let parents: Box<dyn Iterator<Item = &Item>> = if full {
|
||||||
|
Box::new(parents.iter())
|
||||||
|
} else {
|
||||||
|
Box::new(parents.iter().rev().take(LIMIT).rev())
|
||||||
|
};
|
||||||
|
@for parent in parents {
|
||||||
li .breadcrumb-item {
|
li .breadcrumb-item {
|
||||||
a href={ "/item/" (parent.id) } { (ItemName::new(parent, parents_item_classes.get(&parent.class).unwrap()) )}
|
a href={ "/item/" (parent.id) } { (ItemName::new(parent, parents_item_classes.get(&parent.class).unwrap()) )}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue