mirror of
https://forge.pointfixe.fr/hubert/gitust.git
synced 2026-02-04 08:27:29 +01:00
root -> breadcrumb
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user