Update to gitea 1.12.0
Gitea 1.12.0 brings much improved git repo performance. Specifically it caches the most recent commits helping the web views render much more quickly. This bumps our golang base image to 1.14-buster as gitea has changed their default golang verison to 1.14. We also add gnupg to the package install list as the upstream images did this. In the templates I've tried to comment out rather than remove content that we don't want exposed. The reason for this is it makes resolving future template updates simpler. For v1.12.0 release notes see: https://github.com/go-gitea/gitea/blob/v1.12.0/CHANGELOG.md Change-Id: I8fd6587c8962554023d878266055a2bd9d2499f9
This commit is contained in:
parent
2dff1e482d
commit
4f405f13f5
@ -22,11 +22,11 @@
|
|||||||
|
|
||||||
###################################
|
###################################
|
||||||
#Build stage
|
#Build stage
|
||||||
FROM docker.io/library/golang:1.13-buster AS build-env
|
FROM docker.io/library/golang:1.14-buster AS build-env
|
||||||
|
|
||||||
LABEL maintainer="infra-root@openstack.org"
|
LABEL maintainer="infra-root@openstack.org"
|
||||||
|
|
||||||
ARG GITEA_VERSION="v1.11.4"
|
ARG GITEA_VERSION="v1.12.0"
|
||||||
ENV TAGS "bindata $TAGS"
|
ENV TAGS "bindata $TAGS"
|
||||||
|
|
||||||
#Build deps
|
#Build deps
|
||||||
@ -58,6 +58,7 @@ RUN apt-get update && apt-get -y install \
|
|||||||
git \
|
git \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
tzdata \
|
tzdata \
|
||||||
|
gnupg \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
@ -8,11 +8,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if .IsSigned}}
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
|
{{/* No links */}}
|
||||||
|
{{else if .IsSigned}}
|
||||||
<a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
|
<a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
|
||||||
|
{{if not .UnitIssuesGlobalDisabled}}
|
||||||
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
|
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{if not .UnitPullsGlobalDisabled}}
|
||||||
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
|
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
|
||||||
|
{{end}}
|
||||||
|
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
||||||
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
|
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
|
||||||
|
{{end}}
|
||||||
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
||||||
{{else if .IsLandingPageHome}}
|
{{else if .IsLandingPageHome}}
|
||||||
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
||||||
@ -34,37 +42,59 @@
|
|||||||
</div>
|
</div>
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{if .IsSigned}}
|
|
||||||
|
{{if and .IsSigned .MustChangePassword}}
|
||||||
|
<div class="right stackable menu">
|
||||||
|
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
||||||
|
<span class="text">
|
||||||
|
<img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
|
||||||
|
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
||||||
|
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
||||||
|
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
|
||||||
|
</span>
|
||||||
|
<div class="menu user-menu" tabindex="-1">
|
||||||
|
<div class="ui header">
|
||||||
|
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="divider"></div>
|
||||||
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
||||||
|
{{svg "octicon-sign-out" 16}}
|
||||||
|
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
||||||
|
</a>
|
||||||
|
</div><!-- end content avatar menu -->
|
||||||
|
</div><!-- end dropdown avatar menu -->
|
||||||
|
</div>
|
||||||
|
{{else if .IsSigned}}
|
||||||
<div class="right stackable menu">
|
<div class="right stackable menu">
|
||||||
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
|
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<i class="fitted octicon octicon-bell"></i>
|
<span class="fitted">{{svg "octicon-bell" 16}}</span>
|
||||||
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
|
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
|
||||||
|
{{$notificationUnreadCount := 0}}
|
||||||
{{if .NotificationUnreadCount}}
|
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
|
||||||
<span class="ui red label">
|
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
|
||||||
{{.NotificationUnreadCount}}
|
{{$notificationUnreadCount}}
|
||||||
</span>
|
</span>
|
||||||
{{end}}
|
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<i class="fitted octicon octicon-plus"></i>
|
<span class="fitted">{{svg "octicon-plus" 16}}</span>
|
||||||
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
|
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
|
||||||
<i class="fitted octicon octicon-triangle-down not-mobile"></i>
|
<span class="fitted not-mobile">{{svg "octicon-triangle-down" 16}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||||
<i class="octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
|
<span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_repo"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||||
<i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
|
<span class="fitted">{{svg "octicon-repo-clone" 16}}</span> {{.i18n.Tr "new_migrate"}}
|
||||||
</a>
|
</a>
|
||||||
{{if .SignedUser.CanCreateOrganization}}
|
{{if .SignedUser.CanCreateOrganization}}
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||||
<i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
|
<span class="fitted">{{svg "octicon-organization" 16}}</span> {{.i18n.Tr "new_org"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div><!-- end content create new menu -->
|
</div><!-- end content create new menu -->
|
||||||
@ -72,10 +102,10 @@
|
|||||||
|
|
||||||
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<img class="ui tiny avatar image" src="{{.SignedUser.RelAvatarLink}}">
|
<img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
|
||||||
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
||||||
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
||||||
<i class="fitted octicon octicon-triangle-down not-mobile" tabindex="-1"></i>
|
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu user-menu" tabindex="-1">
|
<div class="menu user-menu" tabindex="-1">
|
||||||
<div class="ui header">
|
<div class="ui header">
|
||||||
@ -84,22 +114,21 @@
|
|||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
||||||
<i class="octicon octicon-person"></i>
|
{{svg "octicon-person" 16}}
|
||||||
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
||||||
</a>
|
</a>
|
||||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
|
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
|
||||||
<i class="octicon octicon-star"></i>
|
{{svg "octicon-star" 16}}
|
||||||
{{.i18n.Tr "your_starred"}}
|
{{.i18n.Tr "your_starred"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||||
<i class="octicon octicon-settings"></i>
|
{{svg "octicon-settings" 16}}
|
||||||
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
|
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
|
||||||
</a>
|
</a>
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.opendev.org/opendev/infra-manual/latest/gettingstarted.html">
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.opendev.org/opendev/infra-manual/latest/gettingstarted.html">
|
||||||
<i class="octicon octicon-repo-push"></i>
|
{{svg "octicon-repo-push" 16}}
|
||||||
Get Started<!-- Get Started -->
|
Get Started<!-- Get Started -->
|
||||||
</a>
|
</a>
|
||||||
</a>
|
|
||||||
{{if .IsAdmin}}
|
{{if .IsAdmin}}
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
|
|
||||||
@ -110,19 +139,26 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<a class="item" href="{{AppSubUrl}}/user/logout">
|
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
|
||||||
<i class="octicon octicon-sign-out"></i>
|
{{svg "octicon-sign-out" 16}}
|
||||||
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
||||||
</a>
|
</a>
|
||||||
</div><!-- end content avatar menu -->
|
</div><!-- end content avatar menu -->
|
||||||
</div><!-- end dropdown avatar menu -->
|
</div><!-- end dropdown avatar menu -->
|
||||||
</div><!-- end signed user right menu -->
|
</div><!-- end signed user right menu -->
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.opendev.org/opendev/infra-manual/latest/gettingstarted.html">Get Started</a>
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.opendev.org/opendev/infra-manual/latest/gettingstarted.html">Get Started</a>
|
||||||
<div class="right stackable menu">
|
<div class="right stackable menu">
|
||||||
|
<!-- Intentionally removed as this is a read only gitea
|
||||||
|
{{if .ShowRegistrationButton}}
|
||||||
|
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||||
|
{{svg "octicon-person" 16}} {{.i18n.Tr "register"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
|
||||||
|
{{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}}
|
||||||
|
</a>
|
||||||
|
-->
|
||||||
</div><!-- end anonymous right menu -->
|
</div><!-- end anonymous right menu -->
|
||||||
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,70 +4,155 @@
|
|||||||
<div class="repo-header">
|
<div class="repo-header">
|
||||||
<div class="ui huge breadcrumb repo-title">
|
<div class="ui huge breadcrumb repo-title">
|
||||||
{{if .RelAvatarLink}}
|
{{if .RelAvatarLink}}
|
||||||
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
||||||
|
{{else if .IsTemplate}}
|
||||||
|
{{if .IsPrivate}}
|
||||||
|
{{svg "octicon-repo-template-private" 32}}
|
||||||
|
{{else}}
|
||||||
|
{{svg "octicon-repo-template" 32}}
|
||||||
|
{{end}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
|
{{if .IsPrivate}}
|
||||||
|
{{svg "octicon-lock" 32}}
|
||||||
|
{{else if .IsMirror}}
|
||||||
|
{{svg "octicon-repo-clone" 32}}
|
||||||
|
{{else if .IsFork}}
|
||||||
|
{{svg "octicon-repo-forked" 32}}
|
||||||
|
{{else}}
|
||||||
|
{{svg "octicon-repo" 32}}
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
||||||
<div class="divider"> / </div>
|
<div class="divider"> / </div>
|
||||||
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
||||||
{{if .IsTemplate}}<i class="icon fa-copy"></i>{{end}}
|
{{if .RelAvatarLink}}
|
||||||
|
{{if .IsTemplate}}
|
||||||
|
{{if .IsPrivate}}
|
||||||
|
{{svg "octicon-repo-template-private" 32}}
|
||||||
|
{{else}}
|
||||||
|
{{svg "octicon-repo-template" 32}}
|
||||||
|
{{end}}
|
||||||
|
{{else}}
|
||||||
|
{{if .IsPrivate}}
|
||||||
|
{{svg "octicon-lock" 32}}
|
||||||
|
{{else if .IsMirror}}
|
||||||
|
{{svg "octicon-repo-clone" 32}}
|
||||||
|
{{else if .IsFork}}
|
||||||
|
{{svg "octicon-repo-forked" 32}}
|
||||||
|
{{else}}
|
||||||
|
{{svg "octicon-repo" 32}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
|
{{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
|
||||||
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}</a></div>{{end}}
|
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}">{{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}</a></div>{{end}}
|
||||||
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
|
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
|
||||||
{{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}}
|
{{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Intetionally removed as watching, staring, and forking don't make sense on this installation
|
||||||
|
{{if not .IsBeingCreated}}
|
||||||
|
<div class="repo-buttons">
|
||||||
|
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
|
||||||
|
{{$.CsrfTokenHtml}}
|
||||||
|
<div class="ui labeled button" tabindex="0">
|
||||||
|
<button type="submit" class="ui compact basic button">
|
||||||
|
<i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
|
||||||
|
</button>
|
||||||
|
<a class="ui basic label" href="{{.Link}}/watchers">
|
||||||
|
{{.NumWatches}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
|
||||||
|
{{$.CsrfTokenHtml}}
|
||||||
|
<div class="ui labeled button" tabindex="0">
|
||||||
|
<button type="submit" class="ui compact basic button">
|
||||||
|
<i class="icon star{{if not $.IsStaringRepo}} outline{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
|
||||||
|
</button>
|
||||||
|
<a class="ui basic label" href="{{.Link}}/stars">
|
||||||
|
{{.NumStars}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
|
||||||
|
<div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
|
||||||
|
<a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
|
||||||
|
{{svg "octicon-repo-forked" 15}}{{$.i18n.Tr "repo.fork"}}
|
||||||
|
</a>
|
||||||
|
<a class="ui basic label" href="{{.Link}}/forks">
|
||||||
|
{{.NumForks}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
-->
|
||||||
</div><!-- end grid -->
|
</div><!-- end grid -->
|
||||||
</div><!-- end container -->
|
</div><!-- end container -->
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="ui tabs container">
|
<div class="ui tabs container">
|
||||||
{{if not .Repository.IsBeingCreated}}
|
{{if not .Repository.IsBeingCreated}}
|
||||||
<div class="ui tabular stackable menu navbar">
|
<div class="ui tabular stackable menu navbar">
|
||||||
{{if .Permission.CanRead $.UnitTypeCode}}
|
{{if .Permission.CanRead $.UnitTypeCode}}
|
||||||
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
|
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
|
||||||
<i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
{{svg "octicon-code" 16}} {{.i18n.Tr "repo.code"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if .Permission.CanRead $.UnitTypeIssues}}
|
{{if .Permission.CanRead $.UnitTypeIssues}}
|
||||||
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
||||||
<i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
|
{{svg "octicon-issue-opened" 16}} {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if .Permission.CanRead $.UnitTypeExternalTracker}}
|
{{if .Permission.CanRead $.UnitTypeExternalTracker}}
|
||||||
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
|
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
|
||||||
<i class="octicon octicon-link-external"></i> {{.i18n.Tr "repo.issues"}} </span>
|
{{svg "octicon-link-external" 16}} {{.i18n.Tr "repo.issues"}} </span>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}}
|
{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}}
|
||||||
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
||||||
<i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
|
{{svg "octicon-git-pull-request" 16}} {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<a class="item" href="https://review.opendev.org/#/q/status:open+project:{{.Owner.Name}}/{{.Repository.Name}}">
|
<!-- Added to redirect PR links to Gerrit -->
|
||||||
<i class="octicon octicon-git-pull-request"></i> Proposed changes
|
<a class="item" href="https://review.opendev.org/#/q/status:open+project:{{.Owner.Name}}/{{.Repository.Name}}">
|
||||||
</a>
|
{{svg "octicon-git-pull-request" 16}} Proposed changes
|
||||||
|
</a>
|
||||||
|
|
||||||
{{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}}
|
<!-- Removed intentionally as tarballs of python projects are not useful
|
||||||
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}>
|
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }}
|
||||||
<i class="octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
|
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
||||||
</a>
|
{{svg "octicon-tag" 16}} {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{.NumReleases}}</span>
|
||||||
{{end}}
|
</a>
|
||||||
|
{{end}}
|
||||||
|
-->
|
||||||
|
|
||||||
{{template "custom/extra_tabs" .}}
|
{{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}}
|
||||||
|
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}>
|
||||||
|
{{svg "octicon-book" 16}} {{.i18n.Tr "repo.wiki"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
{{if .Permission.IsAdmin}}
|
{{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}}
|
||||||
<div class="right menu">
|
<a class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity">
|
||||||
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
{{svg "octicon-pulse" 16}} {{.i18n.Tr "repo.activity"}}
|
||||||
<i class="octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
|
</a>
|
||||||
</a>
|
{{end}}
|
||||||
</div>
|
|
||||||
{{end}}
|
{{template "custom/extra_tabs" .}}
|
||||||
</div>
|
|
||||||
{{end}}
|
{{if .Permission.IsAdmin}}
|
||||||
</div>
|
<div class="right menu">
|
||||||
<div class="ui tabs divider"></div>
|
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||||
|
{{svg "octicon-tools" 16}} {{.i18n.Tr "repo.settings"}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<div class="ui tabs divider"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user