Add raw, history file button, and other mirror fixes
This commit is contained in:
parent
17c1bc7383
commit
963354c5d7
21 changed files with 48 additions and 212 deletions
|
@ -276,13 +276,15 @@ func FileHistory(ctx *middleware.Context) {
|
|||
nextPage = 0
|
||||
}
|
||||
|
||||
ctx.Data["Commits"], err = ctx.Repo.GitRepo.CommitsByFileAndRange(
|
||||
commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(
|
||||
branchName, fileName, page)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "repo.FileHistory(CommitsByRange)", err)
|
||||
return
|
||||
}
|
||||
commits = models.ValidateCommitsWithEmails(commits)
|
||||
|
||||
ctx.Data["Commits"] = commits
|
||||
ctx.Data["Username"] = userName
|
||||
ctx.Data["Reponame"] = repoName
|
||||
ctx.Data["FileName"] = fileName
|
||||
|
|
|
@ -166,7 +166,7 @@ func Home(ctx *middleware.Context) {
|
|||
}
|
||||
|
||||
if readmeFile != nil {
|
||||
ctx.Data["ReadmeInHome"] = true
|
||||
ctx.Data["ReadmeInList"] = true
|
||||
ctx.Data["ReadmeExist"] = true
|
||||
if dataRc, err := readmeFile.Data(); err != nil {
|
||||
ctx.Handle(404, "repo.SinglereadmeFile.LookupBlob", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue