We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
LoadHeaderCount
1 parent db5d41c commit d138ca6Copy full SHA for d138ca6
routers/web/shared/group/header.go
@@ -0,0 +1,24 @@
1
+package group
2
+
3
+import (
4
+ repo_model "code.gitea.io/gitea/models/repo"
5
+ "code.gitea.io/gitea/modules/optional"
6
+ "code.gitea.io/gitea/modules/setting"
7
+ "code.gitea.io/gitea/services/context"
8
+)
9
10
+func LoadHeaderCount(ctx *context.Context) error {
11
+ repoCount, err := repo_model.CountRepository(ctx, repo_model.SearchRepoOptions{
12
+ Actor: ctx.Doer,
13
+ Private: ctx.IsSigned,
14
+ GroupID: ctx.RepoGroup.Group.ID,
15
+ Collaborate: optional.Some(false),
16
+ IncludeDescription: setting.UI.SearchRepoDescription,
17
+ })
18
+ if err != nil {
19
+ return err
20
+ }
21
+ ctx.Data["RepoCount"] = repoCount
22
23
+ return nil
24
+}
0 commit comments