mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
Minor fixes for #2745
This commit is contained in:
parent
1cbc5b49e3
commit
260723e2cc
8 changed files with 921 additions and 708 deletions
|
@ -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)
|
![](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 |
|
| 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_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_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.transfer_form_title = Please enter following information to confirm your operation:
|
||||||
settings.wiki-delete = Erase Wiki Data
|
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_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_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 = Delete This Repository
|
||||||
settings.delete_desc = Once you delete a repository, there is no going back. Please be certain.
|
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.
|
settings.delete_notices_1 = - This operation <strong>CANNOT</strong> be undone.
|
||||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.8.52.0303"
|
const APP_VER = "0.8.53.0303"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -241,10 +241,7 @@ func (repo *Repository) ComposeMetas() map[string]string {
|
||||||
return repo.ExternalMetas
|
return repo.ExternalMetas
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeleteWiki(repo *Repository) {
|
// DeleteWiki removes the actual and local copy of repository wiki.
|
||||||
repo.DeleteWiki()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (repo *Repository) DeleteWiki() {
|
func (repo *Repository) DeleteWiki() {
|
||||||
wikiPaths := []string{repo.WikiPath(), repo.LocalWikiPath()}
|
wikiPaths := []string{repo.WikiPath(), repo.LocalWikiPath()}
|
||||||
for _, wikiPath := range wikiPaths {
|
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)
|
log.Trace("Repository wiki deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name)
|
||||||
|
|
||||||
repo.EnableWiki = false
|
repo.EnableWiki = false
|
||||||
|
|
||||||
if err := models.UpdateRepository(repo, false); err != nil {
|
if err := models.UpdateRepository(repo, false); err != nil {
|
||||||
ctx.Handle(500, "UpdateRepository", err)
|
ctx.Handle(500, "UpdateRepository", err)
|
||||||
return
|
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")
|
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="item">
|
||||||
<div class="ui right">
|
<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>
|
||||||
<div>
|
<div>
|
||||||
<h5>{{.i18n.Tr "repo.settings.wiki-delete"}}</h5>
|
<h5>{{.i18n.Tr "repo.settings.wiki_delete"}}</h5>
|
||||||
<p>{{.i18n.Tr "repo.settings.wiki-delete_desc"}}</p>
|
<p>{{.i18n.Tr "repo.settings.wiki_delete_desc"}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -297,6 +297,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if .Repository.EnableWiki}}
|
||||||
<div class="ui small modal" id="delete-wiki-modal">
|
<div class="ui small modal" id="delete-wiki-modal">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
{{.i18n.Tr "repo.settings.wiki-delete"}}
|
{{.i18n.Tr "repo.settings.wiki-delete"}}
|
||||||
|
@ -304,7 +305,7 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="ui warning message text left">
|
<div class="ui warning message text left">
|
||||||
{{.i18n.Tr "repo.settings.delete_notices_1" | Safe}}<br>
|
{{.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>
|
</div>
|
||||||
<form class="ui form" action="{{.Link}}" method="post">
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
|
@ -327,5 +328,6 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
Loading…
Reference in a new issue