File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 55package context
66
77import (
8+ group_model "code.gitea.io/gitea/models/group"
89 "context"
910 "errors"
1011 "fmt"
@@ -564,6 +565,15 @@ func RepoAssignment(ctx *Context) {
564565 ctx .Data ["Title" ] = repo .Owner .Name + "/" + repo .Name
565566 ctx .Data ["PageTitleCommon" ] = repo .Name + " - " + setting .AppName
566567 ctx .Data ["Repository" ] = repo
568+ if repo .GroupID > 0 {
569+ if ctx .Data ["Breadcrumbs" ], err = group_model .GetParentGroupChain (ctx , repo .GroupID ); err != nil {
570+ ctx .ServerError ("GetParentGroupChain" , err )
571+ return
572+ }
573+ } else {
574+ ctx .Data ["Breadcrumbs" ] = nil
575+ }
576+
567577 ctx .Data ["Owner" ] = ctx .Repo .Repository .Owner
568578 ctx .Data ["CanWriteCode" ] = ctx .Repo .CanWrite (unit_model .TypeCode )
569579 ctx .Data ["CanWriteIssues" ] = ctx .Repo .CanWrite (unit_model .TypeIssues )
Original file line number Diff line number Diff line change 88 </div>
99 <div class="flex-item-main">
1010 <div class="flex-item-title tw-text-18">
11- <a class =" muted tw-font-normal" href =" {{ .Owner.HomeLink }} " >{{ .Owner.Name }} </a >/<a class =" muted" href =" {{ $.RepoLink }} " >{{ .Name }} </a >
11+ <a class="muted tw-font-normal" href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
12+ {{- range $.Breadcrumbs -}}
13+ /<a class="muted{{if eq .ID $.Group.ID}} tw-font-bold active{{else}} tw-font-normal{{end}}"
14+ href="{{.GroupLink}}">{{.Name}}</a>
15+ {{- end -}}
16+ /<a class="muted" href="{{$.RepoLink}}">{{.Name}}</a>
1217 </div>
1318 </div>
1419 <div class="flex-item-trailing">
You can’t perform that action at this time.
0 commit comments