File tree 2 files changed +19
-6
lines changed
2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,12 @@ func RefBlame(ctx *context.Context) {
194
194
commitNames [c .ID .String ()] = c
195
195
}
196
196
197
+ // Get Topics of this repo
198
+ renderRepoTopics (ctx )
199
+ if ctx .Written () {
200
+ return
201
+ }
202
+
197
203
renderBlame (ctx , blameParts , commitNames )
198
204
199
205
ctx .HTML (200 , tplBlame )
Original file line number Diff line number Diff line change @@ -621,6 +621,17 @@ func renderLanguageStats(ctx *context.Context) {
621
621
ctx .Data ["LanguageStats" ] = langs
622
622
}
623
623
624
+ func renderRepoTopics (ctx * context.Context ) {
625
+ topics , err := models .FindTopics (& models.FindTopicOptions {
626
+ RepoID : ctx .Repo .Repository .ID ,
627
+ })
628
+ if err != nil {
629
+ ctx .ServerError ("models.FindTopics" , err )
630
+ return
631
+ }
632
+ ctx .Data ["Topics" ] = topics
633
+ }
634
+
624
635
func renderCode (ctx * context.Context ) {
625
636
ctx .Data ["PageIsViewCode" ] = true
626
637
@@ -645,14 +656,10 @@ func renderCode(ctx *context.Context) {
645
656
}
646
657
647
658
// Get Topics of this repo
648
- topics , err := models .FindTopics (& models.FindTopicOptions {
649
- RepoID : ctx .Repo .Repository .ID ,
650
- })
651
- if err != nil {
652
- ctx .ServerError ("models.FindTopics" , err )
659
+ renderRepoTopics (ctx )
660
+ if ctx .Written () {
653
661
return
654
662
}
655
- ctx .Data ["Topics" ] = topics
656
663
657
664
// Get current entry user currently looking at.
658
665
entry , err := ctx .Repo .Commit .GetTreeEntryByPath (ctx .Repo .TreePath )
You can’t perform that action at this time.
0 commit comments