1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-09 17:24:43 +00:00

Adjust development sidebar

This commit is contained in:
Lunny Xiao 2024-11-28 15:54:27 -08:00
parent 121b823971
commit 703eebfa92
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A

View File

@ -1,26 +1,28 @@
{{if not .Issue.IsPull}} {{if not .Issue.IsPull}}
<div class="divider"></div> <div class="divider"></div>
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.development"}}</strong></span> <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.development"}}</strong></span>
<div class="ui devlinks list"> <div class="ui devlinks list">
{{if not .Issue.IsClosed}} {{if not .Issue.IsClosed}}
<div> <div class="tw-items-center">
<a class="tw-mt-1 fluid ui show-modal" data-modal="#create_branch">{{ctx.Locale.Tr "repo.branch.new_branch"}}</a> <a class="tw-mt-1 fluid ui show-modal" data-modal="#create_branch">{{ctx.Locale.Tr "repo.branch.new_branch"}}</a>
</div> </div>
{{end}} {{end}}
{{range .DevLinks}} {{range .DevLinks}}
{{if .PullRequest}} {{if .PullRequest}}
<span>{{template "shared/issueicon" .PullRequest.Issue}} <div class="tw-flex tw-items-center tw-overflow-hidden tw-max-w-full">
<a href="{{.PullRequest.Issue.Link}}" class="item"> {{template "shared/issueicon" .PullRequest.Issue}}
<a href="{{.PullRequest.Issue.Link}}" data-tooltip-content="{{.PullRequest.Issue.Title}}" class="item tw-overflow-hidden gt-ellipsis tw-whitespace-nowrap">
{{.PullRequest.Issue.Title}} {{.PullRequest.Issue.Title}}
</a> </a>
</span> </div>
<div> <div>
{{ctx.Locale.Tr "repo.issues.link.created" (DateUtils.AbsoluteShort .PullRequest.Issue.CreatedUnix)}} {{ctx.Locale.Tr "repo.issues.link.created" (DateUtils.AbsoluteShort .PullRequest.Issue.CreatedUnix)}}
{{if .PullRequest.HasMerged}} {{if .PullRequest.HasMerged}}
{{ctx.Locale.Tr "repo.issues.pr.completed"}} {{ctx.Locale.Tr "repo.issues.pr.completed"}}
</div> </div>
<div> <div class="tw-flex tw-items-center tw-overflow-hidden tw-max-w-full">
{{svg "octicon-git-commit" 14}} <a href="{{.PullRequest.BaseRepo.Link}}/src/commit/{{.PullRequest.MergedCommitID}}">{{.PullRequest.MergedCommitID | ShortSha}}</a> {{svg "octicon-git-commit" 14}} <a href="{{.PullRequest.BaseRepo.Link}}/src/commit/{{.PullRequest.MergedCommitID}}" data-tooltip-content="{{.PullRequest.MergedCommitID}}" class="tw-overflow-hidden gt-ellipsis tw-whitespace-nowrap">{{.PullRequest.MergedCommitID | ShortSha}}</a>
</div> </div>
<div> <div>
{{ctx.Locale.Tr "repo.issues.link.created" (DateUtils.AbsoluteShort .PullRequest.MergedUnix)}} {{ctx.Locale.Tr "repo.issues.link.created" (DateUtils.AbsoluteShort .PullRequest.MergedUnix)}}
@ -29,14 +31,14 @@
{{end}} {{end}}
</div> </div>
{{else if and .Branch .DisplayBranch}} {{else if and .Branch .DisplayBranch}}
<div class="tw-flex tw-justify-between"> <div class="tw-flex tw-justify-between tw-items-center">
<div class="tw-flex tw-left tw-items-center tw-h-full"> <div class="tw-flex tw-left tw-items-center tw-overflow-hidden tw-max-w-full">
{{svg "octicon-git-branch" 14}} {{svg "octicon-git-branch" 14}}
<a href="{{.Branch.Repo.Link}}/src/branch/{{.Branch.Name}}"> <a href="{{.Branch.Repo.Link}}/src/branch/{{.Branch.Name}}" data-tooltip-content="{{.Branch.Name}}" class="tw-overflow-hidden gt-ellipsis tw-whitespace-nowrap">
<span class="gt-ellipsis">{{.Branch.Name}}</span> {{.Branch.Name}}
</a> </a>
</div> </div>
<div class="tw-right"> <div class="tw-right tw-items-center">
<a class="ui button mini compact basic icon" href="{{$.Issue.Repo.Link}}/compare/{{$.Issue.Repo.DefaultBranch}}...{{.Branch.Repo.FullName}}:{{.Branch.Name}}?ref_issue_index={{$.Issue.Index}}"> <a class="ui button mini compact basic icon" href="{{$.Issue.Repo.Link}}/compare/{{$.Issue.Repo.DefaultBranch}}...{{.Branch.Repo.FullName}}:{{.Branch.Name}}?ref_issue_index={{$.Issue.Index}}">
{{svg "octicon-git-pull-request"}} {{svg "octicon-git-pull-request"}}
</a> </a>