diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index c602aba53d..c7d99a85b1 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1193,7 +1193,6 @@ action.blocked_user = Cannot perform action because you are blocked by the repos download_archive = Download Repository more_operations = More Operations -no_desc = No Description quick_guide = Quick Guide clone_this_repo = Clone this repository cite_this_repo = Cite this repository diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 622fef905e..7b37ac1011 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -7,12 +7,8 @@ {{if and (not .HideRepoInfo) (not .IsBlame)}}
{{- $description := .Repository.DescriptionHTML ctx -}} - {{- if $description -}} - {{- $description | RenderCodeBlock -}} - {{- else if .IsRepositoryAdmin -}} - {{ctx.Locale.Tr "repo.no_desc"}} - {{- end -}} - {{- if .Repository.Website}}{{.Repository.Website}}{{end -}} + {{if $description}}{{$description | RenderCodeBlock}}{{end}} + {{if .Repository.Website}}{{.Repository.Website}}{{end}}
{{/* it should match the code in issue-home.js */}} diff --git a/tests/integration/repo_test.go b/tests/integration/repo_test.go index 2c2215eab5..b967ccad1e 100644 --- a/tests/integration/repo_test.go +++ b/tests/integration/repo_test.go @@ -28,11 +28,9 @@ func TestViewRepo(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) - noDescription := htmlDoc.doc.Find(".repo-description").Children() repoTopics := htmlDoc.doc.Find("#repo-topics").Children() repoSummary := htmlDoc.doc.Find(".repository-summary").Children() - assert.True(t, noDescription.HasClass("no-description")) assert.True(t, repoTopics.HasClass("repo-topic")) assert.True(t, repoSummary.HasClass("repository-menu")) @@ -177,30 +175,6 @@ func TestViewRepoWithSymlinks(t *testing.T) { assert.Equal(t, "link_link: svg octicon-file-symlink-file", items[4]) } -// TestViewAsRepoAdmin tests PR #2167 -func TestViewAsRepoAdmin(t *testing.T) { - for user, expectedNoDescription := range map[string]bool{ - "user2": true, - "user4": false, - } { - defer tests.PrepareTestEnv(t)() - - session := loginUser(t, user) - - req := NewRequest(t, "GET", "/user2/repo1.git") - resp := session.MakeRequest(t, req, http.StatusOK) - - htmlDoc := NewHTMLParser(t, resp.Body) - noDescription := htmlDoc.doc.Find(".repo-description").Children() - repoTopics := htmlDoc.doc.Find("#repo-topics").Children() - repoSummary := htmlDoc.doc.Find(".repository-summary").Children() - - assert.Equal(t, expectedNoDescription, noDescription.HasClass("no-description")) - assert.True(t, repoTopics.HasClass("repo-topic")) - assert.True(t, repoSummary.HasClass("repository-menu")) - } -} - // TestViewFileInRepo repo description, topics and summary should not be displayed when viewing a file func TestViewFileInRepo(t *testing.T) { defer tests.PrepareTestEnv(t)()