Minor fixes for #2745

tokarchuk/v1.17
Unknwon 9 years ago
parent 1cbc5b49e3
commit 260723e2cc
  1. 2
      README.md
  2. 7
      conf/locale/locale_en-US.ini
  3. 2
      gogs.go
  4. 5
      models/repo.go
  5. 1595
      modules/bindata/bindata.go
  6. 6
      routers/repo/setting.go
  7. 2
      templates/.VERSION
  8. 10
      templates/repo/settings/options.tmpl

@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
##### Current version: 0.8.52
##### Current version: 0.8.53
| Web | UI | Preview |
|:-------------:|:-------:|:-------:|

@ -595,9 +595,10 @@ settings.transfer_desc = Transfer this repository to another user or to an organ
settings.transfer_notices_1 = - You will lose access if new owner is a individual user.
settings.transfer_notices_2 = - You will conserve access if new owner is an organization and if you're one of the owners.
settings.transfer_form_title = Please enter following information to confirm your operation:
settings.wiki-delete = Erase Wiki Data
settings.wiki-delete_desc = Once you erase wiki data there is no going back. Please be certain.
settings.wiki-delete_notices_1 = This will delete and disable the wiki for %s
settings.wiki_delete = Erase Wiki Data
settings.wiki_delete_desc = Once you erase wiki data there is no going back. Please be certain.
settings.wiki_delete_notices_1 = - This will delete and disable the wiki for %s
settings.wiki_deletion_success = Repository wiki data have been erased successfully.
settings.delete = Delete This Repository
settings.delete_desc = Once you delete a repository, there is no going back. Please be certain.
settings.delete_notices_1 = - This operation <strong>CANNOT</strong> be undone.

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.8.52.0303"
const APP_VER = "0.8.53.0303"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())

@ -241,10 +241,7 @@ func (repo *Repository) ComposeMetas() map[string]string {
return repo.ExternalMetas
}
func DeleteWiki(repo *Repository) {
repo.DeleteWiki()
}
// DeleteWiki removes the actual and local copy of repository wiki.
func (repo *Repository) DeleteWiki() {
wikiPaths := []string{repo.WikiPath(), repo.LocalWikiPath()}
for _, wikiPath := range wikiPaths {

File diff suppressed because one or more lines are too long

@ -239,18 +239,16 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
}
}
models.DeleteWiki(repo)
repo.DeleteWiki()
log.Trace("Repository wiki deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name)
repo.EnableWiki = false
if err := models.UpdateRepository(repo, false); err != nil {
ctx.Handle(500, "UpdateRepository", err)
return
}
log.Trace("Repository advanced settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name)
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
ctx.Flash.Success(ctx.Tr("repo.settings.wiki_deletion_success"))
ctx.Redirect(ctx.Repo.RepoLink + "/settings")
}
}

@ -1 +1 @@
0.8.52.0303
0.8.53.0303

@ -168,11 +168,11 @@
<div class="item">
<div class="ui right">
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.i18n.Tr "repo.settings.wiki-delete"}}</button>
<button class="ui basic red show-modal button" data-modal="#delete-wiki-modal">{{.i18n.Tr "repo.settings.wiki_delete"}}</button>
</div>
<div>
<h5>{{.i18n.Tr "repo.settings.wiki-delete"}}</h5>
<p>{{.i18n.Tr "repo.settings.wiki-delete_desc"}}</p>
<h5>{{.i18n.Tr "repo.settings.wiki_delete"}}</h5>
<p>{{.i18n.Tr "repo.settings.wiki_delete_desc"}}</p>
</div>
</div>
{{end}}
@ -297,6 +297,7 @@
</div>
</div>
{{if .Repository.EnableWiki}}
<div class="ui small modal" id="delete-wiki-modal">
<div class="header">
{{.i18n.Tr "repo.settings.wiki-delete"}}
@ -304,7 +305,7 @@
<div class="content">
<div class="ui warning message text left">
{{.i18n.Tr "repo.settings.delete_notices_1" | Safe}}<br>
{{.i18n.Tr "repo.settings.wiki-delete_notices_1" .Repository.Name | Safe}}
{{.i18n.Tr "repo.settings.wiki_delete_notices_1" .Repository.Name | Safe}}
</div>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
@ -327,5 +328,6 @@
</form>
</div>
</div>
{{end}}
{{template "base/footer" .}}

Loading…
Cancel
Save