mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
repo branch page ui
This commit is contained in:
42
templates/repo/branches.tmpl
Normal file
42
templates/repo/branches.tmpl
Normal file
@@ -0,0 +1,42 @@
|
||||
{{template "base/head" .}}
|
||||
{{template "base/navbar" .}}
|
||||
{{template "repo/nav" .}}
|
||||
{{template "repo/toolbar" .}}
|
||||
<div id="gogs-body" class="container">
|
||||
<div id="gogs-source">
|
||||
<div class="panel panel-default branch-box info-box">
|
||||
<div class="panel-heading info-head">
|
||||
<h4>Branches</h4>
|
||||
</div>
|
||||
<table class="panel-footer table branch-list table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="name"></th>
|
||||
<th class="behind">Behind</th>
|
||||
<th class="ahead">Ahead</th>
|
||||
<th class="date">Last Commit</th>
|
||||
<th class="action"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="branch-main">
|
||||
<td class="name" colspan="3">
|
||||
<a href="#"><strong>BranchName</strong></a>
|
||||
<button class="btn btn-primary btn-sm">base branch</button>
|
||||
</td>
|
||||
<td class="date">3 years ago</td>
|
||||
<td class="action"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name"><a href="#"><strong>BranchName</strong></a></td>
|
||||
<td class="behind">102 <span class="graph" style="width: 100%"></span></td>
|
||||
<td class="ahead"><span class="graph" style="width: 4%"></span>4</td>
|
||||
<td class="date">3 years ago</td>
|
||||
<td class="action"><a class="btn btn-info btn-sm" href="#">compare</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
@@ -24,13 +24,15 @@
|
||||
{{$paths := .Paths}}
|
||||
{{ $l := Subtract $n 1}}
|
||||
<ol class="breadcrumb">
|
||||
<li class="root dir"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
|
||||
<li class="root dir">
|
||||
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
|
||||
{{range $i, $v := $treenames}}
|
||||
<li class="dir">
|
||||
{{if eq $i $l}}{{$v}}
|
||||
{{else}}
|
||||
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{index $paths $i}}">{{$v}}</a>
|
||||
{{end}}</li>
|
||||
{{if eq $i $l}}{{$v}}
|
||||
{{else}}
|
||||
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{index $paths $i}}">{{$v}}</a>
|
||||
{{end}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</div>
|
||||
@@ -43,20 +45,21 @@
|
||||
</div>
|
||||
<table class="panel-footer table file-list">
|
||||
<thead class="hidden">
|
||||
<tr>
|
||||
<th class="icon"></th>
|
||||
<th class="name">Filename</th>
|
||||
<th class="text">Message</th>
|
||||
<th class="date">Date modified</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="icon"></th>
|
||||
<th class="name">Filename</th>
|
||||
<th class="text">Message</th>
|
||||
<th class="date">Date modified</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{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">
|
||||
{{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">
|
||||
<span class="wrap">
|
||||
{{if .IsDir}}
|
||||
<a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{.Path}}">{{.Name}}</a>
|
||||
@@ -64,19 +67,19 @@
|
||||
<a href="/{{$username}}/{{$reponame}}/blob/{{$branchname}}/{{.Name}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text">
|
||||
</td>
|
||||
<td class="text">
|
||||
<span class="wrap">
|
||||
{{.Message}}
|
||||
</span>
|
||||
</td>
|
||||
<td class="date">
|
||||
</td>
|
||||
<td class="date">
|
||||
<span class="wrap">
|
||||
{{TimeSince .Created}}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@@ -4,10 +4,10 @@
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="{{if .IsRepoToolbarSource}}active{{end}}"><a href="/{{.RepositoryLink}}">Source</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/commits">Commits</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/branches">Branches</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/pulls">Pull Requests</a></li>
|
||||
<li><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
||||
<li class="{{if .IsRepoToolbarCommits}}active{{end}}"><a href="/{{.RepositoryLink}}/commits">Commits</a></li>
|
||||
<li class="{{if .IsRepoToolbarBranches}}active{{end}}"><a href="/{{.RepositoryLink}}/branches">Branches</a></li>
|
||||
<li class="{{if .IsRepoToolbarPulls}}active{{end}}"><a href="/{{.RepositoryLink}}/pulls">Pull Requests</a></li>
|
||||
<li class="{{if .IsRepoToolbarIssues}}active{{end}}"><a href="/{{.RepositoryLink}}/issues">Issues <!--<span class="badge">42</span>--></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
Reference in New Issue
Block a user