mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
WIP: create PR - choose branch
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.repos.owner"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.private"}}</th>
|
||||
@@ -30,7 +30,7 @@
|
||||
<tbody>
|
||||
{{range .Repos}}
|
||||
<tr>
|
||||
<td>{{.Id}}</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<div class="divider"> / </div>
|
||||
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
||||
{{if .IsMirror}}<div class="ui label">{{$.i18n.Tr "mirror"}}</div>{{end}}
|
||||
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></div>{{end}}
|
||||
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></div>{{end}}
|
||||
</div>
|
||||
</h2>
|
||||
<div class="ui right floated secondary menu">
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<span class="divider">/</span>
|
||||
<a class="repo text-bold" href="{{$.RepoLink}}">{{.Name}}</a>
|
||||
{{if .IsMirror}}<span class="label label-gray">{{$.i18n.Tr "mirror"}}</span>{{end}}
|
||||
{{if .IsFork}}<span class="fork-flag">forked from <a href="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></span>{{end}}
|
||||
{{if .IsFork}}<span class="fork-flag">forked from <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></span>{{end}}
|
||||
</h1>
|
||||
<ul id="repo-header-meta" class="right menu menu-line">
|
||||
<li id="repo-header-download" class="drop">
|
||||
@@ -49,7 +49,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li id="repo-header-fork">
|
||||
<a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork/{{.Id}}"{{end}}>
|
||||
<a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{end}}>
|
||||
<button class="btn btn-gray text-bold btn-radius">
|
||||
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
||||
<span class="num">{{.NumForks}}</span>
|
||||
|
@@ -9,11 +9,14 @@
|
||||
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||
</p>
|
||||
<ul id="repo-file-nav" class="clear menu menu-line">
|
||||
<!-- <li>
|
||||
<a href="#">
|
||||
{{if and .IsRepositoryAdmin .Repository.BaseRepo}}
|
||||
{{ $baseRepo := .Repository.BaseRepo}}
|
||||
<li>
|
||||
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
|
||||
<button class="btn btn-green btn-small btn-radius" id="repo-compare-btn"><i class="octicon octicon-git-compare"></i></button>
|
||||
</a>
|
||||
</li> -->
|
||||
</li>
|
||||
{{end}}
|
||||
<li id="repo-branch-switch" class="down drop">
|
||||
<a>
|
||||
<button class="btn btn-gray btn-medium btn-radius">
|
||||
|
51
templates/repo/pulls/compare.tmpl
Normal file
51
templates/repo/pulls/compare.tmpl
Normal file
@@ -0,0 +1,51 @@
|
||||
{{template "base/head" .}}
|
||||
<div class="repository compare pull">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui middle page grid body">
|
||||
<div class="sixteen wide column page grid">
|
||||
<h2 class="ui header">
|
||||
{{.i18n.Tr "repo.pulls.compare_changes"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
|
||||
</h2>
|
||||
<div class="ui segment choose branch">
|
||||
<span class="octicon octicon-git-compare"></span>
|
||||
<div class="ui floating filter dropdown">
|
||||
<div class="ui basic small button">
|
||||
<span class="text">base: {{$.BaseBranch}}</span>
|
||||
<i class="dropdown icon"></i>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="Filter branch...">
|
||||
</div>
|
||||
<div class="items">
|
||||
{{range .Branches}}
|
||||
<a class="{{if eq $.BaseBranch .}}active selected{{end}} item" href="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
...
|
||||
<div class="ui floating filter dropdown">
|
||||
<div class="ui basic small button">
|
||||
<span class="text">compare: {{$.HeadBranch}}</span>
|
||||
<i class="dropdown icon"></i>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="Filter branch...">
|
||||
</div>
|
||||
<div class="items">
|
||||
{{range .HeadBranches}}
|
||||
<a class="{{if eq $.HeadBranch .}}active selected{{end}} item" href="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
Reference in New Issue
Block a user