|
- {{/*
- {{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}
-
- <td class="message collapsing has-emoji">
- {{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}}
- </td>
- */}}
-
- {{ $collapseList := and .ReadmeExist (not .HasParentPath)}}
- <details {{if not $collapseList}}open{{end}}>
- <summary class="ui top attached header">
- <h4 style="display: inline;" class="clearfix">
- {{if $collapseList}}Contents of{{end}}
- {{ $n := len .TreeNames}}
- {{ $l := Subtract $n 1}}
- <span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span>
-
- <div class="ui right sub header">
- Latest commit:
- {{template "repo/commit_status" .LatestCommitStatus}}
- <a rel="nofollow" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}">
- {{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }}
- <span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
- {{if IsMultilineCommitMessage .LatestCommit.Message}}
- <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
- <pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
- {{end}}
- {{template "repo/commit_status" .LatestCommitStatus}}
- </span>
- </a>
- <span style="margin-left: 1em;">
- {{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}
- </span>
- </div>
- </h4>
- </summary>
- <table id="repo-files-table" class="ui single line attached unstackable table">
- <tbody>
- {{if .HasParentPath}}
- <tr class="has-parent">
- <td colspan="2"><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">{{svg "octicon-mail-reply" 16}} ..</a></td>
- </tr>
- {{end}}
- {{range $item := .Files}}
- {{$entry := index $item 0}}
- {{$commit := index $item 1}}
- <tr>
- {{if $entry.IsSubModule}}
- <td>
- <span class="truncate">
- {{svg "octicon-file-submodule" 16}}
- {{$refURL := $commit.RefURL AppUrl $.BranchLink}}
- {{if $refURL}}
- <a href="{{$refURL}}">{{$entry.Name}}</a> @ <a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a>
- {{else}}
- {{$entry.Name}} @ {{ShortSha $commit.RefID}}
- {{end}}
- </span>
- </td>
- {{else}}
- <td class="name">
- <span class="truncate">
- {{if $entry.IsDir}}
- {{$subJumpablePathName := $entry.GetSubJumpablePathName}}
- {{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
- {{svg "octicon-file-directory" 16}}
- <a href="{{EscapePound $.TreeLink}}/{{EscapePound $subJumpablePathName}}" title="{{$subJumpablePathName}}">
- {{if eq (len $subJumpablePath) 2}}
- <span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
- {{else}}
- {{index $subJumpablePath 0}}
- {{end}}
- </a>
- {{else}}
- {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}}
- <a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}">{{$entry.Name}}</a>
- {{end}}
- </span>
- </td>
- {{end}}
- <td class="text right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
- </tr>
- {{end}}
- </tbody>
- </table>
- </details>
- {{if .ReadmeExist}}
- {{template "repo/view_file" .}}
- {{end}}
|