Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure RSS icon is present on all repo tabs #23904

Merged
merged 5 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions routers/web/repo/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (

// Activity render the page to show repository latest changes
func Activity(ctx *context.Context) {
AddHeaderCtxData(ctx)
ctx.Data["Title"] = ctx.Tr("repo.activity")
silverwind marked this conversation as resolved.
Show resolved Hide resolved
ctx.Data["PageIsActivity"] = true

Expand Down
1 change: 1 addition & 0 deletions routers/web/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func MustAllowPulls(ctx *context.Context) {
}

func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption util.OptionalBool) {
AddHeaderCtxData(ctx)
silverwind marked this conversation as resolved.
Show resolved Hide resolved
var err error
silverwind marked this conversation as resolved.
Show resolved Hide resolved
viewType := ctx.FormString("type")
sortType := ctx.FormString("sort")
Expand Down
1 change: 1 addition & 0 deletions routers/web/repo/projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func MustEnableProjects(ctx *context.Context) {

// Projects renders the home page of projects
func Projects(ctx *context.Context) {
AddHeaderCtxData(ctx)
ctx.Data["Title"] = ctx.Tr("repo.project_board")
silverwind marked this conversation as resolved.
Show resolved Hide resolved

sortType := ctx.FormTrim("sort")
Expand Down
8 changes: 6 additions & 2 deletions routers/web/repo/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,8 @@ func checkCitationFile(ctx *context.Context, entry *git.TreeEntry) {
}
}

// Home render repository home page
func Home(ctx *context.Context) {
// AddHeaderCtxData adds context data for the repo header
func AddHeaderCtxData(ctx *context.Context) {
silverwind marked this conversation as resolved.
Show resolved Hide resolved
if setting.EnableFeed {
isFeed, _, showFeedType := feed.GetFeedType(ctx.Params(":reponame"), ctx.Req)
if isFeed {
Expand All @@ -708,7 +708,11 @@ func Home(ctx *context.Context) {
ctx.Data["EnableFeed"] = true
ctx.Data["FeedURL"] = ctx.Repo.Repository.Link()
}
}

// Home render repository home page
func Home(ctx *context.Context) {
AddHeaderCtxData(ctx)
checkHomeCodeViewable(ctx)
silverwind marked this conversation as resolved.
Show resolved Hide resolved
if ctx.Written() {
return
Expand Down
2 changes: 2 additions & 0 deletions routers/web/repo/wiki.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ func wikiContentsByName(ctx *context.Context, commit *git.Commit, wikiName strin
}

func renderViewPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) {
AddHeaderCtxData(ctx)

silverwind marked this conversation as resolved.
Show resolved Hide resolved
wikiRepo, commit, err := findWikiRepoCommit(ctx)
if err != nil {
if wikiRepo != nil {
Expand Down