File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1090,6 +1090,9 @@ activity.period.daily = 1 day
10901090activity.period.halfweekly = 3 days
10911091activity.period.weekly = 1 week
10921092activity.period.monthly = 1 month
1093+ activity.period.quarterly = 3 months
1094+ activity.period.semiyearly = 6 months
1095+ activity.period.yearly = 1 year
10931096activity.overview = Overview
10941097activity.active_prs_count_1 = <strong>%d</strong> Active Pull Request
10951098activity.active_prs_count_n = <strong>%d</strong> Active Pull Requests
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ func Activity(ctx *context.Context) {
3535 timeFrom = timeUntil .Add (- time .Hour * 168 )
3636 case "monthly" :
3737 timeFrom = timeUntil .AddDate (0 , - 1 , 0 )
38+ case "quarterly" :
39+ timeFrom = timeUntil .AddDate (0 , - 3 , 0 )
40+ case "semiyearly" :
41+ timeFrom = timeUntil .AddDate (0 , - 6 , 0 )
42+ case "yearly" :
43+ timeFrom = timeUntil .AddDate (- 1 , 0 , 0 )
3844 default :
3945 ctx .Data ["Period" ] = "weekly"
4046 timeFrom = timeUntil .Add (- time .Hour * 168 )
@@ -70,6 +76,12 @@ func ActivityAuthors(ctx *context.Context) {
7076 timeFrom = timeUntil .Add (- time .Hour * 168 )
7177 case "monthly" :
7278 timeFrom = timeUntil .AddDate (0 , - 1 , 0 )
79+ case "quarterly" :
80+ timeFrom = timeUntil .AddDate (0 , - 3 , 0 )
81+ case "semiyearly" :
82+ timeFrom = timeUntil .AddDate (0 , - 6 , 0 )
83+ case "yearly" :
84+ timeFrom = timeUntil .AddDate (- 1 , 0 , 0 )
7385 default :
7486 timeFrom = timeUntil .Add (- time .Hour * 168 )
7587 }
Original file line number Diff line number Diff line change 1717 <a class="{{if eq .Period "halfweekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/halfweekly">{{.i18n.Tr "repo.activity.period.halfweekly"}}</a>
1818 <a class="{{if eq .Period "weekly"}}active {{end}}item" href="{{$.RepoLink}}/activity/weekly">{{.i18n.Tr "repo.activity.period.weekly"}}</a>
1919 <a class="{{if eq .Period "monthly"}}active {{end}}item" href="{{$.RepoLink}}/activity/monthly">{{.i18n.Tr "repo.activity.period.monthly"}}</a>
20+ <a class="{{if eq .Period "quarterly"}}active {{end}}item" href="{{$.RepoLink}}/activity/quarterly">{{.i18n.Tr "repo.activity.period.quarterly"}}</a>
21+ <a class="{{if eq .Period "semiyearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/semiyearly">{{.i18n.Tr "repo.activity.period.semiyearly"}}</a>
22+ <a class="{{if eq .Period "yearly"}}active {{end}}item" href="{{$.RepoLink}}/activity/yearly">{{.i18n.Tr "repo.activity.period.yearly"}}</a>
2023 </div>
2124 </div>
2225 </div>
You can’t perform that action at this time.
0 commit comments