Explorar el Código

Fix topics saving internal error and disable for archived repos (#5821)

tags/v1.9.0-dev
Lauris BH hace 5 años
padre
commit
cd83c2ca05
No account linked to committer's email address
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 1
    1
      routers/routes/routes.go
  2. 2
    2
      templates/repo/home.tmpl

+ 1
- 1
routers/routes/routes.go Ver fichero

@@ -652,7 +652,7 @@ func RegisterRoutes(m *macaron.Macaron) {

m.Group("/:username/:reponame", func() {
m.Post("/topics", repo.TopicsPost)
}, context.RepoMustNotBeArchived(), context.RepoAssignment(), reqRepoAdmin)
}, context.RepoAssignment(), context.RepoMustNotBeArchived(), reqRepoAdmin)

m.Group("/:username/:reponame", func() {
m.Group("", func() {

+ 2
- 2
templates/repo/home.tmpl Ver fichero

@@ -25,9 +25,9 @@
</div>
<div class="ui repo-topic" id="repo-topic">
{{range .Topics}}<a class="ui green basic label topic" style="cursor:pointer;" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}}
{{if .Permission.IsAdmin}}<a id="manage_topic" style="cursor:pointer;margin-left:10px;">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<a id="manage_topic" style="cursor:pointer;margin-left:10px;">{{.i18n.Tr "repo.topic.manage_topics"}}</a>{{end}}
</div>
{{if .Permission.IsAdmin}}
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
<div class="ui repo-topic-edit grid form segment error" id="topic_edit" style="display:none">
<div class="fourteen wide column">
<div class="field">

Cargando…
Cancelar
Guardar