diff options
Diffstat (limited to 'templates/gititemtree.qtpl')
-rw-r--r-- | templates/gititemtree.qtpl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/gititemtree.qtpl b/templates/gititemtree.qtpl index 5898506..2753e24 100644 --- a/templates/gititemtree.qtpl +++ b/templates/gititemtree.qtpl @@ -1,5 +1,6 @@ {% import "git.gabrielgio.me/cerrado/pkg/u" %} {% import "github.com/go-git/go-git/v5/plumbing/object" %} +{% import "github.com/go-git/go-git/v5/plumbing/filemode" %} {% code type GitItemTreePage struct { Path []string @@ -52,10 +53,14 @@ <div class="size"></div> {% endif %} {% for _, e := range g.Tree.Entries %} - <div class="mode">{%s Ignore(e.Mode.ToOSFileMode()).String() %}</div> {% if e.Mode.IsFile() %} + <div class="mode">{%s Ignore(e.Mode.ToOSFileMode()).String() %}</div> <div class="name blob"><a href="{%s url(name, Blob, ref, e.Name, g.Path) %}">{%s e.Name %}</a></div> + {% elseif e.Mode == filemode.Submodule %} + <div class="mode">m---------</div> + <div class="name tree">{%s e.Name %} (submodule)</div> {% else %} + <div class="mode">d---------</div> <div class="name tree"><a href="{%s url(name, Folder, ref, e.Name, g.Path) %}">{%s e.Name %}</a></div> {% endif %} <div class="commit"></div> |