Skip to content

Commit aec826b

Browse files
lunnylafriks
authored andcommitted
fix template error on explore repos (#2319)
1 parent 934dd41 commit aec826b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

integrations/explore_repos_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2017 The Gitea Authors. All rights reserved.
2+
// Use of this source code is governed by a MIT-style
3+
// license that can be found in the LICENSE file.
4+
5+
package integrations
6+
7+
import (
8+
"net/http"
9+
"testing"
10+
)
11+
12+
func TestExploreRepos(t *testing.T) {
13+
prepareTestEnv(t)
14+
15+
req := NewRequest(t, "GET", "/explore/repos")
16+
MakeRequest(t, req, http.StatusOK)
17+
}

templates/explore/repo_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{range .Repos}}
33
<div class="item">
44
<div class="ui header">
5-
<a class="name" href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if or $.PageIsExplore $.PageIsProfileStarList }}{{.Owner.Name}} / {{end}}{{.Name}}</a>
5+
<a class="name" href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}</a>
66
{{if .IsPrivate}}
77
<span class="text gold"><i class="octicon octicon-lock"></i></span>
88
{{else if .IsFork}}

0 commit comments

Comments
 (0)