root -> breadcrumb

This commit is contained in:
Hubert 2021-07-24 06:52:46 +02:00
parent 5f6f7b7efe
commit edf6f9f81a
2 changed files with 5 additions and 5 deletions

View File

@ -38,13 +38,13 @@ pub enum Entry {
#[derive(Template)]
#[template(path = "git.html")]
pub struct GitMainTemplate<TS, ROOT>
pub struct GitMainTemplate<TS, BREADCRUMB>
where for <'a> &'a TS : IntoIterator<Item = &'a Entry>,
for <'a> &'a ROOT : IntoIterator<Item = &'a (String, String)>,
for <'a> &'a BREADCRUMB: IntoIterator<Item = &'a (String, String)>,
{
repo : Repository,
browse : TS,
root : ROOT,
breadcrumb: BREADCRUMB,
user_opt : Option<User>,
revisions_nbr : u32,
branches_nbr : u32,
@ -116,7 +116,7 @@ pub async fn git_main<T : AuthValidator>(
Ok(GitMainTemplate {
repo,
browse : entries,
root : path,
breadcrumb: path,
user_opt : user,
revisions_nbr : gitrepo.get_revisions_nbr(),
branches_nbr : gitrepo.get_branches_nbr(),

View File

@ -61,7 +61,7 @@
<div class="w3-cell">
<ul class="breadcrumb">
<li><a href="#">{{repo.name}}</a></li>
{% for (dir, prev) in root %}
{% for (dir, prev) in breadcrumb %}
<li><a href="{{prev}}">{{dir}}</a></li>
{% endfor %}
</ul>