Merge "Update to gitea 1.12.0"
This commit is contained in:
commit
6ca6ed8863
@ -22,11 +22,11 @@
|
||||
|
||||
###################################
|
||||
#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"
|
||||
|
||||
ARG GITEA_VERSION="v1.11.4"
|
||||
ARG GITEA_VERSION="v1.12.0"
|
||||
ENV TAGS "bindata $TAGS"
|
||||
|
||||
#Build deps
|
||||
@ -58,6 +58,7 @@ RUN apt-get update && apt-get -y install \
|
||||
git \
|
||||
openssh-client \
|
||||
tzdata \
|
||||
gnupg \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
@ -8,11 +8,19 @@
|
||||
</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>
|
||||
{{if not .UnitIssuesGlobalDisabled}}
|
||||
<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>
|
||||
{{end}}
|
||||
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
|
||||
{{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>
|
||||
{{else if .IsLandingPageHome}}
|
||||
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
||||
@ -34,37 +42,59 @@
|
||||
</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">
|
||||
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
|
||||
<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>
|
||||
|
||||
{{if .NotificationUnreadCount}}
|
||||
<span class="ui red label">
|
||||
{{.NotificationUnreadCount}}
|
||||
{{$notificationUnreadCount := 0}}
|
||||
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
|
||||
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
|
||||
{{$notificationUnreadCount}}
|
||||
</span>
|
||||
{{end}}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
||||
<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>
|
||||
<i class="fitted octicon octicon-triangle-down not-mobile"></i>
|
||||
<span class="fitted not-mobile">{{svg "octicon-triangle-down" 16}}</span>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<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 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>
|
||||
{{if .SignedUser.CanCreateOrganization}}
|
||||
<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>
|
||||
{{end}}
|
||||
</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">
|
||||
<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="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>
|
||||
<div class="menu user-menu" tabindex="-1">
|
||||
<div class="ui header">
|
||||
@ -84,22 +114,21 @@
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
||||
<i class="octicon octicon-person"></i>
|
||||
{{svg "octicon-person" 16}}
|
||||
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
||||
</a>
|
||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
|
||||
<i class="octicon octicon-star"></i>
|
||||
{{svg "octicon-star" 16}}
|
||||
{{.i18n.Tr "your_starred"}}
|
||||
</a>
|
||||
<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 -->
|
||||
</a>
|
||||
<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 -->
|
||||
</a>
|
||||
</a>
|
||||
{{if .IsAdmin}}
|
||||
<div class="divider"></div>
|
||||
|
||||
@ -110,19 +139,26 @@
|
||||
{{end}}
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item" href="{{AppSubUrl}}/user/logout">
|
||||
<i class="octicon octicon-sign-out"></i>
|
||||
<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><!-- end signed user right menu -->
|
||||
|
||||
{{else}}
|
||||
|
||||
<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">
|
||||
<!-- 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 -->
|
||||
|
||||
{{end}}
|
||||
</div>
|
||||
|
@ -5,18 +5,88 @@
|
||||
<div class="ui huge breadcrumb repo-title">
|
||||
{{if .RelAvatarLink}}
|
||||
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
||||
{{else if .IsTemplate}}
|
||||
{{if .IsPrivate}}
|
||||
{{svg "octicon-repo-template-private" 32}}
|
||||
{{else}}
|
||||
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
|
||||
{{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}}
|
||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
||||
<div class="divider"> / </div>
|
||||
<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 .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 .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{SubStr .TemplateRepo.RelLink 1 -1}}</a></div>{{end}}
|
||||
</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 container -->
|
||||
{{end}}
|
||||
@ -25,35 +95,50 @@
|
||||
<div class="ui tabular stackable menu navbar">
|
||||
{{if .Permission.CanRead $.UnitTypeCode}}
|
||||
<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>
|
||||
{{end}}
|
||||
|
||||
{{if .Permission.CanRead $.UnitTypeIssues}}
|
||||
<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>
|
||||
{{end}}
|
||||
|
||||
{{if .Permission.CanRead $.UnitTypeExternalTracker}}
|
||||
<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>
|
||||
{{end}}
|
||||
|
||||
{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}}
|
||||
<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>
|
||||
{{end}}
|
||||
|
||||
<!-- Added to redirect PR links to Gerrit -->
|
||||
<a class="item" href="https://review.opendev.org/#/q/status:open+project:{{.Owner.Name}}/{{.Repository.Name}}">
|
||||
<i class="octicon octicon-git-pull-request"></i> Proposed changes
|
||||
{{svg "octicon-git-pull-request" 16}} Proposed changes
|
||||
</a>
|
||||
|
||||
<!-- Removed intentionally as tarballs of python projects are not useful
|
||||
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }}
|
||||
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
||||
{{svg "octicon-tag" 16}} {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .NumReleases}}gray{{else}}blue{{end}} small label">{{.NumReleases}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
-->
|
||||
|
||||
{{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}}>
|
||||
<i class="octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
|
||||
{{svg "octicon-book" 16}} {{.i18n.Tr "repo.wiki"}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
{{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}}
|
||||
<a class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity">
|
||||
{{svg "octicon-pulse" 16}} {{.i18n.Tr "repo.activity"}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
@ -62,7 +147,7 @@
|
||||
{{if .Permission.IsAdmin}}
|
||||
<div class="right menu">
|
||||
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||
<i class="octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
|
||||
{{svg "octicon-tools" 16}} {{.i18n.Tr "repo.settings"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
Loading…
Reference in New Issue
Block a user