2014-03-12 23:15:58 -05:00
|
|
|
{{template "base/head" .}}
|
|
|
|
{{template "base/navbar" .}}
|
2014-03-13 01:08:49 -05:00
|
|
|
{{template "repo/nav" .}}
|
2014-03-12 23:15:58 -05:00
|
|
|
{{template "repo/toolbar" .}}
|
|
|
|
<div id="gogs-body" class="container">
|
2014-03-14 01:17:29 -05:00
|
|
|
<div id="gogs-source">
|
2014-03-17 16:00:35 -05:00
|
|
|
{{if .IsBareRepo}}
|
|
|
|
Need to fill in some guide.
|
|
|
|
{{else}}
|
2014-03-16 09:29:23 -05:00
|
|
|
<div class="source-toolbar">
|
2014-03-16 22:43:22 -05:00
|
|
|
{{ $username := .Username}}
|
|
|
|
{{ $reponame := .Reponame}}
|
|
|
|
{{ $branchname := .Branchname}}
|
|
|
|
{{ $treenames := .Treenames}}
|
|
|
|
{{ $repoLink := .RepositoryLink}}
|
|
|
|
{{ $n := len $treenames}}
|
2014-03-14 01:17:29 -05:00
|
|
|
<button class="btn btn-default pull-right"><i class="fa fa-plus-square"></i>Add File</button>
|
|
|
|
<div class="dropdown branch-switch">
|
2014-03-16 22:43:22 -05:00
|
|
|
<a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{$branchname}}
|
2014-03-14 01:17:29 -05:00
|
|
|
<b class="caret"></b></a>
|
|
|
|
<ul class="dropdown-menu">
|
2014-03-16 22:43:22 -05:00
|
|
|
{{range .Branches}}
|
|
|
|
<li><a {{if eq . $branchname}}class="current" {{end}}href="/{{$repoLink}}/tree/{{.}}">{{.}}</a></li>
|
|
|
|
{{end}}
|
2014-03-14 01:17:29 -05:00
|
|
|
</ul>
|
|
|
|
</div>
|
2014-03-14 10:57:14 -05:00
|
|
|
{{$paths := .Paths}}
|
2014-03-14 10:54:16 -05:00
|
|
|
{{ $l := Subtract $n 1}}
|
2014-03-14 10:57:14 -05:00
|
|
|
<ol class="breadcrumb">
|
2014-03-17 04:14:31 -05:00
|
|
|
<li class="root dir">
|
|
|
|
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
|
2014-03-14 10:54:16 -05:00
|
|
|
{{range $i, $v := $treenames}}
|
|
|
|
<li class="dir">
|
2014-03-17 04:14:31 -05:00
|
|
|
{{if eq $i $l}}{{$v}}
|
|
|
|
{{else}}
|
|
|
|
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{index $paths $i}}">{{$v}}</a>
|
|
|
|
{{end}}
|
|
|
|
</li>
|
2014-03-14 10:54:16 -05:00
|
|
|
{{end}}
|
2014-03-14 01:17:29 -05:00
|
|
|
</ol>
|
|
|
|
</div>
|
2014-03-17 16:00:35 -05:00
|
|
|
|
2014-03-16 09:29:23 -05:00
|
|
|
<div class="panel panel-default info-box">
|
|
|
|
<div class="panel-heading info-head">
|
2014-03-17 23:14:05 -05:00
|
|
|
<a href="/{{$username}}/{{$reponame}}/commit/{{.LastCommit.Oid.String}}">{{.LastCommit.Message}}</a>
|
2014-03-16 09:29:23 -05:00
|
|
|
</div>
|
|
|
|
<div class="panel-body info-content">
|
2014-03-17 23:14:05 -05:00
|
|
|
<a href="/user/{{.LastCommit.Author.Name}}">{{.LastCommit.Author.Name}}</a> <span class="text-muted">{{TimeSince .LastCommit.Author.When}}</span>
|
2014-03-16 09:29:23 -05:00
|
|
|
</div>
|
|
|
|
<table class="panel-footer table file-list">
|
|
|
|
<thead class="hidden">
|
2014-03-17 04:14:31 -05:00
|
|
|
<tr>
|
|
|
|
<th class="icon"></th>
|
|
|
|
<th class="name">Filename</th>
|
|
|
|
<th class="text">Message</th>
|
|
|
|
<th class="date">Date modified</th>
|
|
|
|
</tr>
|
2014-03-16 09:29:23 -05:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2014-03-19 11:08:20 -05:00
|
|
|
{{if .HasParentPath}}
|
|
|
|
<tr class="has-parent">
|
|
|
|
<td class="icon"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}{{.ParentPath}}"><i class="fa fa-reply"></i></a></td>
|
|
|
|
<td class="name"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}{{.ParentPath}}">..</a></td>
|
|
|
|
<td class="text"></td>
|
|
|
|
<td class="date"></td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
2014-03-17 04:14:31 -05:00
|
|
|
{{range .Files}}
|
|
|
|
<tr
|
|
|
|
{{if .IsDir}}class="is-dir"{{end}}>
|
|
|
|
<td class="icon">
|
|
|
|
<i class="fa {{if .IsDir}}fa-folder{{else}}fa-file-text-o{{end}}"></i>
|
|
|
|
</td>
|
|
|
|
<td class="name">
|
2014-03-17 13:11:46 -05:00
|
|
|
<span class="wrap">
|
|
|
|
{{if .IsDir}}
|
|
|
|
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{.Path}}">{{.Name}}</a>
|
|
|
|
{{else}}
|
|
|
|
<a href="/{{$username}}/{{$reponame}}/blob/{{$branchname}}/{{.Name}}">{{.Name}}</a>
|
|
|
|
{{end}}
|
|
|
|
</span>
|
2014-03-17 04:14:31 -05:00
|
|
|
</td>
|
|
|
|
<td class="text">
|
2014-03-17 22:22:19 -05:00
|
|
|
<span class="wrap"><a href="/{{$username}}/{{$reponame}}/commit/{{.Commit.Oid}}">{{.Commit.Message}}</a></span>
|
2014-03-17 04:14:31 -05:00
|
|
|
</td>
|
|
|
|
<td class="date">
|
2014-03-17 22:22:19 -05:00
|
|
|
<span class="wrap">{{TimeSince .Commit.Committer.When}}</span>
|
2014-03-17 04:14:31 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{end}}
|
2014-03-16 09:29:23 -05:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2014-03-17 06:56:33 -05:00
|
|
|
{{if .ReadmeExist}}
|
2014-03-16 09:29:23 -05:00
|
|
|
<div class="panel panel-default file-content">
|
2014-03-16 10:25:01 -05:00
|
|
|
<div class="panel-heading file-head">
|
|
|
|
<i class="icon fa fa-book"></i> README.md
|
2014-03-16 09:29:23 -05:00
|
|
|
</div>
|
2014-03-17 05:46:54 -05:00
|
|
|
{{if .FileIsLarge}}
|
|
|
|
<div class="panel-footer">
|
|
|
|
Large file size 1000kb
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div class="panel-body file-body markdown">
|
|
|
|
{{.ReadmeContent|str2html}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2014-03-16 09:29:23 -05:00
|
|
|
</div>
|
2014-03-17 06:56:33 -05:00
|
|
|
{{end}}
|
2014-03-17 16:00:35 -05:00
|
|
|
{{end}}
|
2014-03-14 01:17:29 -05:00
|
|
|
</div>
|
2014-03-12 23:15:58 -05:00
|
|
|
</div>
|
|
|
|
{{template "base/footer" .}}
|