Compare commits
23 Commits
master
...
release/v1
Author | SHA1 | Date | |
---|---|---|---|
|
53efbeadc1 | ||
|
3d1ff149a2 | ||
|
e2c8d6fcb2 | ||
|
1a5df9e822 | ||
|
21dc5996a5 | ||
|
023a6604e2 | ||
|
9a5009a2cc | ||
|
3121a7a037 | ||
|
61cdc32496 | ||
|
5fcf218ed9 | ||
|
91836614cd | ||
|
ab4eb0daf9 | ||
|
155fb93b9b | ||
|
3a8c792303 | ||
|
807c64800c | ||
|
6ddb2dcd57 | ||
|
729ab80065 | ||
|
a5ea9b4f30 | ||
|
8f08ccdb9f | ||
|
10d73d38e0 | ||
|
fbb424c61d | ||
|
e8bac94d1f | ||
|
99c6556ff3 |
|
@ -3,6 +3,10 @@ workspace:
|
||||||
path: src/code.gitea.io/gitea
|
path: src/code.gitea.io/gitea
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
|
clone:
|
||||||
|
image: plugins/git
|
||||||
|
tags: true
|
||||||
|
|
||||||
test:
|
test:
|
||||||
image: webhippie/golang:edge
|
image: webhippie/golang:edge
|
||||||
pull: true
|
pull: true
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0ZWEKCnBpcGVsaW5lOgogIHRlc3Q6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZzplZGdlCiAgICBwdWxsOiB0cnVlCiAgICBlbnZpcm9ubWVudDoKICAgICAgQ0dPX0VOQUJMRUQ6IDEKICAgICAgVEFHUzogc3FsaXRlIGJpbmRhdGEKICAgICAgR09QQVRIOiAvc3J2L2FwcAogICAgY29tbWFuZHM6CiAgICAgIC0gYXBrIC1VIGFkZCBvcGVuc3NoLWNsaWVudAogICAgICAtIG1ha2UgY2xlYW4KICAgICAgLSBtYWtlIGdlbmVyYXRlCiAgICAgIC0gbWFrZSB2ZXQKIC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1yZWxlYXNlCiAgICBmaWxlczoKICAgICAgLSBkaXN0L3JlbGVhc2UvKgogICAgd2hlbjoKICAgICAgZXZlbnQ6IFsgdGFnIF0KICAgICAgYnJhbmNoOiBbIHJlZnMvdGFncy8qIF0KCiAgZ2l0dGVyOgogICAgaW1hZ2U6IHBsdWdpbnMvZ2l0dGVyCgpzZXJ2aWNlczoKICBteXNxbDoKICAgIGltYWdlOiBteXNxbDo1LjcKICAgIGVudmlyb25tZW50OgogICAgICAtIE1ZU1FMX0RBVEFCQVNFPXRlc3QKICAgICAgLSBNWVNRTF9BTExPV19FTVBUWV9QQVNTV09SRD15ZXMKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2ggXQoKICBwZ3NxbDoKICAgIGltYWdlOiBwb3N0Z3Jlczo5LjUKICAgIGVudmlyb25tZW50OgogICAgICAtIFBPU1RHUkVTX0RCPXRlc3QKICAgIHdoZW46CiAgICAgIGV2ZW50OiBbIHB1c2ggXQo.NGE3UiNBappXiPimJXv1DzgjT3k2hofGPsCPhw7KsSM
|
|
@ -25,3 +25,6 @@ indent_size = 4
|
||||||
|
|
||||||
[Makefile]
|
[Makefile]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
26
CHANGELOG.md
26
CHANGELOG.md
|
@ -1,5 +1,31 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.0.2](https://github.com/go-gitea/gitea/releases/tag/v1.0.2) - 2017-02-21
|
||||||
|
|
||||||
|
* BUGFIXES
|
||||||
|
* Fixed issue counter [#882](https://github.com/go-gitea/gitea/pull/882)
|
||||||
|
* Fixed XSS vulnerability on wiki page [#955](https://github.com/go-gitea/gitea/pull/955)
|
||||||
|
* Add data dir without session to dump [#587](https://github.com/go-gitea/gitea/pull/587)
|
||||||
|
* Fixed wiki page renaming [#958](https://github.com/go-gitea/gitea/pull/958)
|
||||||
|
* Drop default console logger if not required [#960](https://github.com/go-gitea/gitea/pull/960)
|
||||||
|
* Fixed docker docs link on install page [#972](https://github.com/go-gitea/gitea/pull/972)
|
||||||
|
* Handle SetModel errors [#957](https://github.com/go-gitea/gitea/pull/957)
|
||||||
|
* Fixed XSS vulnerability on milestones [#977](https://github.com/go-gitea/gitea/pull/977)
|
||||||
|
* Fixed XSS vulnerability on alerts [#981](https://github.com/go-gitea/gitea/pull/981)
|
||||||
|
|
||||||
|
## [1.0.1](https://github.com/go-gitea/gitea/releases/tag/v1.0.1) - 2017-01-05
|
||||||
|
|
||||||
|
* BUGFIXES
|
||||||
|
* Fixed localized MIN_PASSWORD_LENGTH [#501](https://github.com/go-gitea/gitea/pull/501)
|
||||||
|
* Fixed 500 error on organization delete [#507](https://github.com/go-gitea/gitea/pull/507)
|
||||||
|
* Ignore empty wiki repo on migrate [#544](https://github.com/go-gitea/gitea/pull/544)
|
||||||
|
* Proper check access for forking [#563](https://github.com/go-gitea/gitea/pull/563)
|
||||||
|
* Fix SSH domain on installer [#506](https://github.com/go-gitea/gitea/pull/506)
|
||||||
|
* Fix missing data rows on admin UI [#580](https://github.com/go-gitea/gitea/pull/580)
|
||||||
|
* Do not delete tags with releases by default [#579](https://github.com/go-gitea/gitea/pull/579)
|
||||||
|
* Fix missing session config data on admin UI [#578](https://github.com/go-gitea/gitea/pull/578)
|
||||||
|
* Properly show the version within footer on the UI [#593](https://github.com/go-gitea/gitea/pull/593)
|
||||||
|
|
||||||
## [1.0.0](https://github.com/go-gitea/gitea/releases/tag/v1.0.0) - 2016-12-23
|
## [1.0.0](https://github.com/go-gitea/gitea/releases/tag/v1.0.0) - 2016-12-23
|
||||||
|
|
||||||
* BREAKING
|
* BREAKING
|
||||||
|
|
|
@ -74,7 +74,9 @@ func runCreateUser(c *cli.Context) error {
|
||||||
|
|
||||||
setting.NewContext()
|
setting.NewContext()
|
||||||
models.LoadConfigs()
|
models.LoadConfigs()
|
||||||
models.SetEngine()
|
if err := models.SetEngine(); err != nil {
|
||||||
|
return fmt.Errorf("models.SetEngine: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
if err := models.CreateUser(&models.User{
|
if err := models.CreateUser(&models.User{
|
||||||
Name: c.String("name"),
|
Name: c.String("name"),
|
||||||
|
|
56
cmd/dump.go
56
cmd/dump.go
|
@ -11,11 +11,13 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models"
|
"code.gitea.io/gitea/models"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
"github.com/Unknwon/cae/zip"
|
"github.com/Unknwon/cae/zip"
|
||||||
|
"github.com/Unknwon/com"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -49,6 +51,7 @@ func runDump(ctx *cli.Context) error {
|
||||||
setting.CustomConf = ctx.String("config")
|
setting.CustomConf = ctx.String("config")
|
||||||
}
|
}
|
||||||
setting.NewContext()
|
setting.NewContext()
|
||||||
|
setting.NewServices() // cannot access session settings otherwise
|
||||||
models.LoadConfigs()
|
models.LoadConfigs()
|
||||||
models.SetEngine()
|
models.SetEngine()
|
||||||
|
|
||||||
|
@ -97,6 +100,22 @@ func runDump(ctx *cli.Context) error {
|
||||||
} else {
|
} else {
|
||||||
log.Printf("Custom dir %s doesn't exist, skipped", setting.CustomPath)
|
log.Printf("Custom dir %s doesn't exist, skipped", setting.CustomPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if com.IsExist(setting.AppDataPath) {
|
||||||
|
log.Printf("Packing data directory...%s", setting.AppDataPath)
|
||||||
|
|
||||||
|
var sessionAbsPath string
|
||||||
|
if setting.SessionConfig.Provider == "file" {
|
||||||
|
if len(setting.SessionConfig.ProviderConfig) == 0 {
|
||||||
|
setting.SessionConfig.ProviderConfig = "data/sessions"
|
||||||
|
}
|
||||||
|
sessionAbsPath, _ = filepath.Abs(setting.SessionConfig.ProviderConfig)
|
||||||
|
}
|
||||||
|
if err := zipAddDirectoryExclude(z, "data", setting.AppDataPath, sessionAbsPath); err != nil {
|
||||||
|
log.Fatalf("Failed to include data directory: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if err := z.AddDir("log", setting.LogRootPath); err != nil {
|
if err := z.AddDir("log", setting.LogRootPath); err != nil {
|
||||||
log.Fatalf("Fail to include log: %v", err)
|
log.Fatalf("Fail to include log: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -119,3 +138,40 @@ func runDump(ctx *cli.Context) error {
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// zipAddDirectoryExclude zips absPath to specified zipPath inside z excluding excludeAbsPath
|
||||||
|
func zipAddDirectoryExclude(zip *zip.ZipArchive, zipPath, absPath string, excludeAbsPath string) error {
|
||||||
|
absPath, err := filepath.Abs(absPath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
dir, err := os.Open(absPath)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer dir.Close()
|
||||||
|
|
||||||
|
zip.AddEmptyDir(zipPath)
|
||||||
|
|
||||||
|
files, err := dir.Readdir(0)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, file := range files {
|
||||||
|
currentAbsPath := path.Join(absPath, file.Name())
|
||||||
|
currentZipPath := path.Join(zipPath, file.Name())
|
||||||
|
if file.IsDir() {
|
||||||
|
if currentAbsPath != excludeAbsPath {
|
||||||
|
if err = zipAddDirectoryExclude(zip, currentZipPath, currentAbsPath, excludeAbsPath); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if err = zip.AddFile(currentZipPath, currentAbsPath); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
2
main.go
2
main.go
|
@ -18,7 +18,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version holds the current Gitea version
|
// Version holds the current Gitea version
|
||||||
var Version = "1.0.0+dev"
|
var Version = "1.0.2+dev"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -1279,7 +1279,7 @@ func GetUserIssueStats(repoID, uid int64, repoIDs []int64, filterMode int, isPul
|
||||||
func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen int64, numClosed int64) {
|
func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen int64, numClosed int64) {
|
||||||
countSession := func(isClosed, isPull bool, repoID int64) *xorm.Session {
|
countSession := func(isClosed, isPull bool, repoID int64) *xorm.Session {
|
||||||
sess := x.
|
sess := x.
|
||||||
Where("issue.repo_id = ?", isClosed).
|
Where("is_closed = ?", isClosed).
|
||||||
And("is_pull = ?", isPull).
|
And("is_pull = ?", isPull).
|
||||||
And("repo_id = ?", repoID)
|
And("repo_id = ?", repoID)
|
||||||
|
|
||||||
|
|
|
@ -206,12 +206,9 @@ func Organizations(page, pageSize int) ([]*User, error) {
|
||||||
|
|
||||||
// DeleteOrganization completely and permanently deletes everything of organization.
|
// DeleteOrganization completely and permanently deletes everything of organization.
|
||||||
func DeleteOrganization(org *User) (err error) {
|
func DeleteOrganization(org *User) (err error) {
|
||||||
if err := DeleteUser(org); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
sess := x.NewSession()
|
sess := x.NewSession()
|
||||||
defer sessionRelease(sess)
|
defer sess.Close()
|
||||||
|
|
||||||
if err = sess.Begin(); err != nil {
|
if err = sess.Begin(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -228,7 +225,11 @@ func DeleteOrganization(org *User) (err error) {
|
||||||
return fmt.Errorf("deleteUser: %v", err)
|
return fmt.Errorf("deleteUser: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return sess.Commit()
|
if err = sess.Commit(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return RewriteAllPublicKeys()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ________ ____ ___
|
// ________ ____ ___
|
||||||
|
|
|
@ -189,7 +189,7 @@ func UpdateRelease(gitRepo *git.Repository, rel *Release) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteReleaseByID deletes a release and corresponding Git tag by given ID.
|
// DeleteReleaseByID deletes a release and corresponding Git tag by given ID.
|
||||||
func DeleteReleaseByID(id int64, u *User) error {
|
func DeleteReleaseByID(id int64, u *User, delTag bool) error {
|
||||||
rel, err := GetReleaseByID(id)
|
rel, err := GetReleaseByID(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("GetReleaseByID: %v", err)
|
return fmt.Errorf("GetReleaseByID: %v", err)
|
||||||
|
@ -207,12 +207,14 @@ func DeleteReleaseByID(id int64, u *User) error {
|
||||||
return fmt.Errorf("DeleteReleaseByID: permission denied")
|
return fmt.Errorf("DeleteReleaseByID: permission denied")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if delTag {
|
||||||
_, stderr, err := process.ExecDir(-1, repo.RepoPath(),
|
_, stderr, err := process.ExecDir(-1, repo.RepoPath(),
|
||||||
fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID),
|
fmt.Sprintf("DeleteReleaseByID (git tag -d): %d", rel.ID),
|
||||||
"git", "tag", "-d", rel.TagName)
|
"git", "tag", "-d", rel.TagName)
|
||||||
if err != nil && !strings.Contains(stderr, "not found") {
|
if err != nil && !strings.Contains(stderr, "not found") {
|
||||||
return fmt.Errorf("git tag -d: %v - %s", err, stderr)
|
return fmt.Errorf("git tag -d: %v - %s", err, stderr)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if _, err = x.Id(rel.ID).Delete(new(Release)); err != nil {
|
if _, err = x.Id(rel.ID).Delete(new(Release)); err != nil {
|
||||||
return fmt.Errorf("Delete: %v", err)
|
return fmt.Errorf("Delete: %v", err)
|
||||||
|
|
|
@ -691,7 +691,6 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
||||||
|
|
||||||
wikiRemotePath := wikiRemoteURL(opts.RemoteAddr)
|
wikiRemotePath := wikiRemoteURL(opts.RemoteAddr)
|
||||||
if len(wikiRemotePath) > 0 {
|
if len(wikiRemotePath) > 0 {
|
||||||
|
|
||||||
if err := os.RemoveAll(wikiPath); err != nil {
|
if err := os.RemoveAll(wikiPath); err != nil {
|
||||||
return repo, fmt.Errorf("Fail to remove %s: %v", wikiPath, err)
|
return repo, fmt.Errorf("Fail to remove %s: %v", wikiPath, err)
|
||||||
}
|
}
|
||||||
|
@ -700,8 +699,12 @@ func MigrateRepository(u *User, opts MigrateRepoOptions) (*Repository, error) {
|
||||||
Mirror: true,
|
Mirror: true,
|
||||||
Quiet: true,
|
Quiet: true,
|
||||||
Timeout: migrateTimeout,
|
Timeout: migrateTimeout,
|
||||||
|
Branch: "master",
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
log.Info("Clone wiki: %v", err)
|
log.Warn("Clone wiki: %v", err)
|
||||||
|
if err := os.RemoveAll(wikiPath); err != nil {
|
||||||
|
return repo, fmt.Errorf("Fail to remove %s: %v", wikiPath, err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -885,9 +885,11 @@ func deleteUser(e *xorm.Session, u *User) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
avatarPath := u.CustomAvatarPath()
|
avatarPath := u.CustomAvatarPath()
|
||||||
|
if com.IsExist(avatarPath) {
|
||||||
if err := os.Remove(avatarPath); err != nil {
|
if err := os.Remove(avatarPath); err != nil {
|
||||||
return fmt.Errorf("Fail to remove %s: %v", avatarPath, err)
|
return fmt.Errorf("Fail to remove %s: %v", avatarPath, err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ func discardLocalWikiChanges(localPath string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// updateWikiPage adds new page to repository wiki.
|
// updateWikiPage adds new page to repository wiki.
|
||||||
func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, message string, isNew bool) (err error) {
|
func (repo *Repository) updateWikiPage(doer *User, oldWikiPath, wikiPath, content, message string, isNew bool) (err error) {
|
||||||
wikiWorkingPool.CheckIn(com.ToStr(repo.ID))
|
wikiWorkingPool.CheckIn(com.ToStr(repo.ID))
|
||||||
defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID))
|
defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID))
|
||||||
|
|
||||||
|
@ -104,8 +104,8 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes
|
||||||
return fmt.Errorf("UpdateLocalWiki: %v", err)
|
return fmt.Errorf("UpdateLocalWiki: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
title = ToWikiPageName(title)
|
title := ToWikiPageName(wikiPath)
|
||||||
filename := path.Join(localPath, title+".md")
|
filename := path.Join(localPath, wikiPath+".md")
|
||||||
|
|
||||||
// If not a new file, show perform update not create.
|
// If not a new file, show perform update not create.
|
||||||
if isNew {
|
if isNew {
|
||||||
|
@ -113,7 +113,7 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes
|
||||||
return ErrWikiAlreadyExist{filename}
|
return ErrWikiAlreadyExist{filename}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
file := path.Join(localPath, oldTitle+".md")
|
file := path.Join(localPath, oldWikiPath+".md")
|
||||||
|
|
||||||
if err := os.Remove(file); err != nil {
|
if err := os.Remove(file); err != nil {
|
||||||
return fmt.Errorf("Fail to remove %s: %v", file, err)
|
return fmt.Errorf("Fail to remove %s: %v", file, err)
|
||||||
|
@ -149,19 +149,19 @@ func (repo *Repository) updateWikiPage(doer *User, oldTitle, title, content, mes
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddWikiPage adds a new wiki page with a given title.
|
// AddWikiPage adds a new wiki page with a given wikiPath.
|
||||||
func (repo *Repository) AddWikiPage(doer *User, title, content, message string) error {
|
func (repo *Repository) AddWikiPage(doer *User, wikiPath, content, message string) error {
|
||||||
return repo.updateWikiPage(doer, "", title, content, message, true)
|
return repo.updateWikiPage(doer, "", wikiPath, content, message, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// EditWikiPage updates a wiki page identified by its title,
|
// EditWikiPage updates a wiki page identified by its wikiPath,
|
||||||
// optionally also changing title.
|
// optionally also changing wikiPath.
|
||||||
func (repo *Repository) EditWikiPage(doer *User, oldTitle, title, content, message string) error {
|
func (repo *Repository) EditWikiPage(doer *User, oldWikiPath, wikiPath, content, message string) error {
|
||||||
return repo.updateWikiPage(doer, oldTitle, title, content, message, false)
|
return repo.updateWikiPage(doer, oldWikiPath, wikiPath, content, message, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteWikiPage deletes a wiki page identified by its title.
|
// DeleteWikiPage deletes a wiki page identified by its wikiPath.
|
||||||
func (repo *Repository) DeleteWikiPage(doer *User, title string) (err error) {
|
func (repo *Repository) DeleteWikiPage(doer *User, wikiPath string) (err error) {
|
||||||
wikiWorkingPool.CheckIn(com.ToStr(repo.ID))
|
wikiWorkingPool.CheckIn(com.ToStr(repo.ID))
|
||||||
defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID))
|
defer wikiWorkingPool.CheckOut(com.ToStr(repo.ID))
|
||||||
|
|
||||||
|
@ -172,13 +172,13 @@ func (repo *Repository) DeleteWikiPage(doer *User, title string) (err error) {
|
||||||
return fmt.Errorf("UpdateLocalWiki: %v", err)
|
return fmt.Errorf("UpdateLocalWiki: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
title = ToWikiPageName(title)
|
filename := path.Join(localPath, wikiPath+".md")
|
||||||
filename := path.Join(localPath, title+".md")
|
|
||||||
|
|
||||||
if err := os.Remove(filename); err != nil {
|
if err := os.Remove(filename); err != nil {
|
||||||
return fmt.Errorf("Fail to remove %s: %v", filename, err)
|
return fmt.Errorf("Fail to remove %s: %v", filename, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
title := ToWikiPageName(wikiPath)
|
||||||
message := "Delete page '" + title + "'"
|
message := "Delete page '" + title + "'"
|
||||||
|
|
||||||
if err = git.AddChanges(localPath, true); err != nil {
|
if err = git.AddChanges(localPath, true); err != nil {
|
||||||
|
|
|
@ -39,6 +39,17 @@ func NewLogger(bufLen int64, mode, config string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DelLogger removes loggers that are for the given mode
|
||||||
|
func DelLogger(mode string) error {
|
||||||
|
for _, l := range loggers {
|
||||||
|
if _, ok := l.outputs[mode]; ok {
|
||||||
|
return l.DelLogger(mode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Trace("Log adapter %s not found, no need to delete", mode)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// NewGitLogger create a logger for git
|
// NewGitLogger create a logger for git
|
||||||
// FIXME: use same log level as other loggers.
|
// FIXME: use same log level as other loggers.
|
||||||
func NewGitLogger(logPath string) {
|
func NewGitLogger(logPath string) {
|
||||||
|
|
|
@ -284,6 +284,8 @@ var (
|
||||||
RunAtStart bool
|
RunAtStart bool
|
||||||
Schedule string
|
Schedule string
|
||||||
}{
|
}{
|
||||||
|
Enabled: true,
|
||||||
|
RunAtStart: false,
|
||||||
Schedule: "@every 10m",
|
Schedule: "@every 10m",
|
||||||
},
|
},
|
||||||
RepoHealthCheck: struct {
|
RepoHealthCheck: struct {
|
||||||
|
@ -293,6 +295,8 @@ var (
|
||||||
Timeout time.Duration
|
Timeout time.Duration
|
||||||
Args []string `delim:" "`
|
Args []string `delim:" "`
|
||||||
}{
|
}{
|
||||||
|
Enabled: true,
|
||||||
|
RunAtStart: false,
|
||||||
Schedule: "@every 24h",
|
Schedule: "@every 24h",
|
||||||
Timeout: 60 * time.Second,
|
Timeout: 60 * time.Second,
|
||||||
Args: []string{},
|
Args: []string{},
|
||||||
|
@ -302,6 +306,7 @@ var (
|
||||||
RunAtStart bool
|
RunAtStart bool
|
||||||
Schedule string
|
Schedule string
|
||||||
}{
|
}{
|
||||||
|
Enabled: true,
|
||||||
RunAtStart: true,
|
RunAtStart: true,
|
||||||
Schedule: "@every 24h",
|
Schedule: "@every 24h",
|
||||||
},
|
},
|
||||||
|
@ -765,6 +770,16 @@ func newLogService() {
|
||||||
LogModes = strings.Split(Cfg.Section("log").Key("MODE").MustString("console"), ",")
|
LogModes = strings.Split(Cfg.Section("log").Key("MODE").MustString("console"), ",")
|
||||||
LogConfigs = make([]string, len(LogModes))
|
LogConfigs = make([]string, len(LogModes))
|
||||||
|
|
||||||
|
useConsole := false
|
||||||
|
for _, mode := range LogModes {
|
||||||
|
if mode == "console" {
|
||||||
|
useConsole = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !useConsole {
|
||||||
|
log.DelLogger("console")
|
||||||
|
}
|
||||||
|
|
||||||
for i, mode := range LogModes {
|
for i, mode := range LogModes {
|
||||||
mode = strings.TrimSpace(mode)
|
mode = strings.TrimSpace(mode)
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/microcosm-cc/bluemonday"
|
||||||
"golang.org/x/net/html/charset"
|
"golang.org/x/net/html/charset"
|
||||||
"golang.org/x/text/transform"
|
"golang.org/x/text/transform"
|
||||||
"gopkg.in/editorconfig/editorconfig-core-go.v1"
|
"gopkg.in/editorconfig/editorconfig-core-go.v1"
|
||||||
|
@ -61,6 +62,7 @@ func NewFuncMap() []template.FuncMap {
|
||||||
},
|
},
|
||||||
"AvatarLink": base.AvatarLink,
|
"AvatarLink": base.AvatarLink,
|
||||||
"Safe": Safe,
|
"Safe": Safe,
|
||||||
|
"Sanitize": bluemonday.UGCPolicy().Sanitize,
|
||||||
"Str2html": Str2html,
|
"Str2html": Str2html,
|
||||||
"TimeSince": base.TimeSince,
|
"TimeSince": base.TimeSince,
|
||||||
"RawTimeSince": base.RawTimeSince,
|
"RawTimeSince": base.RawTimeSince,
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Щракнете тук, за да получите (отнов
|
||||||
reset_password=Нулиране на паролата
|
reset_password=Нулиране на паролата
|
||||||
invalid_code=За съжаление Вашия код за потвърждение е изтекъл или е невалиден.
|
invalid_code=За съжаление Вашия код за потвърждение е изтекъл или е невалиден.
|
||||||
reset_password_helper=Щракнете тук, за да нулирате паролата си
|
reset_password_helper=Щракнете тук, за да нулирате паролата си
|
||||||
password_too_short=Размерът на паролата не може да бъде по-малък от 6 знака.
|
password_too_short=Размерът на паролата не може да бъде по-малък от %d знака.
|
||||||
non_local_account=Нелокални потребители не могат да сменят паролата си през Gitea.
|
non_local_account=Нелокални потребители не могат да сменят паролата си през Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Klikněte zde pro znovuposlání e-mailu pro změnu vašeho hesl
|
||||||
reset_password=Obnova vašeho hesla
|
reset_password=Obnova vašeho hesla
|
||||||
invalid_code=Omlouváme se, ale kód potvrzení vašeho účtu vypršel nebo není správný.
|
invalid_code=Omlouváme se, ale kód potvrzení vašeho účtu vypršel nebo není správný.
|
||||||
reset_password_helper=Klikněte zde pro obnovu vašeho hesla
|
reset_password_helper=Klikněte zde pro obnovu vašeho hesla
|
||||||
password_too_short=Délka hesla musí být minimálně 6 znaků.
|
password_too_short=Délka hesla musí být minimálně %d znaků.
|
||||||
non_local_account=Externí účty nemohou měnit hesla přes Gitea.
|
non_local_account=Externí účty nemohou měnit hesla přes Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Hier klicken, um die E-Mail zum Passwort-zurücksetzen erneut zu
|
||||||
reset_password=Passwort zurücksetzen
|
reset_password=Passwort zurücksetzen
|
||||||
invalid_code=Es tut uns leid, der Bestätigungscode ist abgelaufen oder ungültig.
|
invalid_code=Es tut uns leid, der Bestätigungscode ist abgelaufen oder ungültig.
|
||||||
reset_password_helper=Hier klicken, um das Passwort zurückzusetzen
|
reset_password_helper=Hier klicken, um das Passwort zurückzusetzen
|
||||||
password_too_short=Das Passwort muss mindenstens 6 Zeichen lang sein.
|
password_too_short=Das Passwort muss mindenstens %d Zeichen lang sein.
|
||||||
non_local_account=Nicht-lokale Konten können Passwörter nicht via Gitea ändern.
|
non_local_account=Nicht-lokale Konten können Passwörter nicht via Gitea ändern.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Haga clic aquí para (re)enviar el correo para el restablecimien
|
||||||
reset_password=Restablecer su contraseña
|
reset_password=Restablecer su contraseña
|
||||||
invalid_code=Lo sentimos, su código de confirmación ha expirado o no es valido.
|
invalid_code=Lo sentimos, su código de confirmación ha expirado o no es valido.
|
||||||
reset_password_helper=Haga Clic aquí para restablecer su contraseña
|
reset_password_helper=Haga Clic aquí para restablecer su contraseña
|
||||||
password_too_short=La longitud de la contraseña no puede ser menor a 6.
|
password_too_short=La longitud de la contraseña no puede ser menor a %d.
|
||||||
non_local_account=Cuentas que no son locales no pueden cambiar las contraseñas a través de Gitea.
|
non_local_account=Cuentas que no son locales no pueden cambiar las contraseñas a través de Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Klikkaa tästä (uudelleen)lähettääksesi salasanan nollaus s
|
||||||
reset_password=Nollaa salasanasi
|
reset_password=Nollaa salasanasi
|
||||||
invalid_code=Sori, varmistuskoodisi on vanhentunut tai väärä.
|
invalid_code=Sori, varmistuskoodisi on vanhentunut tai väärä.
|
||||||
reset_password_helper=Klikkaa tästä nollataksesi salasanasi
|
reset_password_helper=Klikkaa tästä nollataksesi salasanasi
|
||||||
password_too_short=Salasanan pituus ei voi olla vähemmän kuin 6 merkkiä.
|
password_too_short=Salasanan pituus ei voi olla vähemmän kuin %d merkkiä.
|
||||||
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Cliquez ici pour (r)envoyer le mail de réinitialisation du mot
|
||||||
reset_password=Réinitialiser le mot de passe
|
reset_password=Réinitialiser le mot de passe
|
||||||
invalid_code=Désolé, votre code de confirmation est invalide ou a expiré.
|
invalid_code=Désolé, votre code de confirmation est invalide ou a expiré.
|
||||||
reset_password_helper=Cliquez ici pour réinitialiser votre mot de passe
|
reset_password_helper=Cliquez ici pour réinitialiser votre mot de passe
|
||||||
password_too_short=Le mot de passe doit contenir 6 caractères minimum.
|
password_too_short=Le mot de passe doit contenir %d caractères minimum.
|
||||||
non_local_account=Les comptes non locaux ne peuvent pas changer leur mot de passe via Gitea.
|
non_local_account=Les comptes non locaux ne peuvent pas changer leur mot de passe via Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Clicca qui per (ri)inviare la tua e-mail di reimpostazione passw
|
||||||
reset_password=Reimposta la tua Password
|
reset_password=Reimposta la tua Password
|
||||||
invalid_code=Siamo spiacenti, il codice di conferma è scaduto o non valido.
|
invalid_code=Siamo spiacenti, il codice di conferma è scaduto o non valido.
|
||||||
reset_password_helper=Clicca qui per reimpostare la password
|
reset_password_helper=Clicca qui per reimpostare la password
|
||||||
password_too_short=La lunghezza della password non può essere meno 6 caratteri.
|
password_too_short=La lunghezza della password non può essere meno %d caratteri.
|
||||||
non_local_account=Gli account non locali non possono modificare le password tramite Gitea.
|
non_local_account=Gli account non locali non possono modificare le password tramite Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=パスワードリセットのメールを再送するにはこ
|
||||||
reset_password=パスワードリセット
|
reset_password=パスワードリセット
|
||||||
invalid_code=申し訳ありませんが、確認用コードが期限切れまたは無効です。
|
invalid_code=申し訳ありませんが、確認用コードが期限切れまたは無効です。
|
||||||
reset_password_helper=パスワードをリセットするにはここをクリック
|
reset_password_helper=パスワードをリセットするにはここをクリック
|
||||||
password_too_short=6文字未満のパスワードは設定できません。
|
password_too_short=%d文字未満のパスワードは設定できません。
|
||||||
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=여기를 눌러 비밀번호 초기화 메일을 (재)전송
|
||||||
reset_password=비밀번호 초기화
|
reset_password=비밀번호 초기화
|
||||||
invalid_code=죄송합니다. 확인 코드가 만료되었거나 유효하지 않습니다.
|
invalid_code=죄송합니다. 확인 코드가 만료되었거나 유효하지 않습니다.
|
||||||
reset_password_helper=이곳을 눌러 비밀번호를 재설정
|
reset_password_helper=이곳을 눌러 비밀번호를 재설정
|
||||||
password_too_short=비밀번호의 길이는 6글자 미만일 수 없습니다.
|
password_too_short=비밀번호의 길이는 %d글자 미만일 수 없습니다.
|
||||||
non_local_account=Gitea 계정이 아니면 암호를 변경할 수 없습니다.
|
non_local_account=Gitea 계정이 아니면 암호를 변경할 수 없습니다.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Spiediet šeit, lai nosūtītu paroles maiņas vēstuli uz Jūsu
|
||||||
reset_password=Atjaunot savu paroli
|
reset_password=Atjaunot savu paroli
|
||||||
invalid_code=Atvainojiet, Jūsu apstiprināšanas kodam ir beidzies derīguma termiņš vai arī tas ir nepareizs.
|
invalid_code=Atvainojiet, Jūsu apstiprināšanas kodam ir beidzies derīguma termiņš vai arī tas ir nepareizs.
|
||||||
reset_password_helper=Nospiediet šeit, lai atjaunotu paroli
|
reset_password_helper=Nospiediet šeit, lai atjaunotu paroli
|
||||||
password_too_short=Paroles garums nedrīkst būt mazāks par 6.
|
password_too_short=Paroles garums nedrīkst būt mazāks par %d.
|
||||||
non_local_account=Tikai lokālie konti var nomainīt savu paroli Gitea.
|
non_local_account=Tikai lokālie konti var nomainīt savu paroli Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Klik hier om uw wachtwoord reset mail (nogmaals) te versturen
|
||||||
reset_password=Reset uw wachtwoord
|
reset_password=Reset uw wachtwoord
|
||||||
invalid_code=Sorry, uw bevestigingscode is verlopen of niet meer geldig.
|
invalid_code=Sorry, uw bevestigingscode is verlopen of niet meer geldig.
|
||||||
reset_password_helper=Klik hier om uw wachtwoord opnieuw in te stellen.
|
reset_password_helper=Klik hier om uw wachtwoord opnieuw in te stellen.
|
||||||
password_too_short=De lengte van uw wachtwoord moet minimaal zes karakters zijn.
|
password_too_short=De lengte van uw wachtwoord moet minimaal %d karakters zijn.
|
||||||
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Kliknij tutaj, aby (ponownie) wysłać e-mail z instrukcjami res
|
||||||
reset_password=Resetowanie hasła
|
reset_password=Resetowanie hasła
|
||||||
invalid_code=Niestety, Twój kod potwierdzający wygasł lub jest nieprawidłowy.
|
invalid_code=Niestety, Twój kod potwierdzający wygasł lub jest nieprawidłowy.
|
||||||
reset_password_helper=Kliknij tutaj, aby zresetować hasło
|
reset_password_helper=Kliknij tutaj, aby zresetować hasło
|
||||||
password_too_short=Długość hasła nie może być mniejsza niż 6 znaków.
|
password_too_short=Długość hasła nie może być mniejsza niż %d znaków.
|
||||||
non_local_account=Nie lokalne konta nie mogą zmieniać haseł przez Gitea.
|
non_local_account=Nie lokalne konta nie mogą zmieniać haseł przez Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Clique aqui para (re)enviar seu e-mail de redefinição da senha
|
||||||
reset_password=Redefinir sua senha
|
reset_password=Redefinir sua senha
|
||||||
invalid_code=Desculpe, seu código de confirmação expirou ou não é válido.
|
invalid_code=Desculpe, seu código de confirmação expirou ou não é válido.
|
||||||
reset_password_helper=Clique aqui para redefinir sua senha
|
reset_password_helper=Clique aqui para redefinir sua senha
|
||||||
password_too_short=O comprimento da senha não pode ser menor que 6.
|
password_too_short=O comprimento da senha não pode ser menor que %d.
|
||||||
non_local_account=Não é possível mudar a senha de contas remotas pelo Gitea.
|
non_local_account=Não é possível mudar a senha de contas remotas pelo Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Нажмите сюда, чтобы отправить пись
|
||||||
reset_password=Сброс пароля
|
reset_password=Сброс пароля
|
||||||
invalid_code=Извините, ваш код подтверждения истек или не является допустимым.
|
invalid_code=Извините, ваш код подтверждения истек или не является допустимым.
|
||||||
reset_password_helper=Нажмите здесь, чтобы сбросить свой пароль
|
reset_password_helper=Нажмите здесь, чтобы сбросить свой пароль
|
||||||
password_too_short=Длина пароля не менее 6 символов.
|
password_too_short=Длина пароля не менее %d символов.
|
||||||
non_local_account=Нелокальные аккаунты не могут изменить пароль через Gitea.
|
non_local_account=Нелокальные аккаунты не могут изменить пароль через Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Кликните овде да (поново) пошаљете
|
||||||
reset_password=Ресет лозинке
|
reset_password=Ресет лозинке
|
||||||
invalid_code=Извините, ваш код за потврду је истекао или није валидан.
|
invalid_code=Извините, ваш код за потврду је истекао или није валидан.
|
||||||
reset_password_helper=Кликните овде да ресетујете вашу лозинку
|
reset_password_helper=Кликните овде да ресетујете вашу лозинку
|
||||||
password_too_short=Лозинка неможе бити краћа од 6 карактера.
|
password_too_short=Лозинка неможе бити краћа од %d карактера.
|
||||||
non_local_account=Нелокални налози не могу да промените лозинку преко Gitea.
|
non_local_account=Нелокални налози не могу да промените лозинку преко Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Klicka här för att skicka e-post med lösenordsåterställning
|
||||||
reset_password=Återställ ditt lösenord
|
reset_password=Återställ ditt lösenord
|
||||||
invalid_code=Tyvärr, din bekräftelsekod har antingen upphört att gälla eller är ogiltig.
|
invalid_code=Tyvärr, din bekräftelsekod har antingen upphört att gälla eller är ogiltig.
|
||||||
reset_password_helper=Klicka här för att återställa ditt lösenord
|
reset_password_helper=Klicka här för att återställa ditt lösenord
|
||||||
password_too_short=Lösenordet får ej vara kortare än 6 tecken.
|
password_too_short=Lösenordet får ej vara kortare än %d tecken.
|
||||||
non_local_account=Icke-lokala konton får inte ändra lösenord genom Gogs.
|
non_local_account=Icke-lokala konton får inte ändra lösenord genom Gogs.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=Parola sıfırlama e-postasını (yeniden) göndermek için bura
|
||||||
reset_password=Parolanızı Sıfırlayın
|
reset_password=Parolanızı Sıfırlayın
|
||||||
invalid_code=Üzgünüz, doğrulama kodunuz geçersiz veya süresi dolmuş.
|
invalid_code=Üzgünüz, doğrulama kodunuz geçersiz veya süresi dolmuş.
|
||||||
reset_password_helper=Parolanızı sıfırlamak için buraya tıklayın
|
reset_password_helper=Parolanızı sıfırlamak için buraya tıklayın
|
||||||
password_too_short=Parola uzunluğu 6 karakterden az olamaz.
|
password_too_short=Parola uzunluğu %d karakterden az olamaz.
|
||||||
non_local_account=Yerel olmayan hesapların şifrelerini Gitea aracılığıyla değiştiremezsiniz.
|
non_local_account=Yerel olmayan hesapların şifrelerini Gitea aracılığıyla değiştiremezsiniz.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -165,7 +165,7 @@ send_reset_mail=单击此处(重新)发送您的密码重置邮件
|
||||||
reset_password=重置密码
|
reset_password=重置密码
|
||||||
invalid_code=对不起,您的确认代码已过期或已失效。
|
invalid_code=对不起,您的确认代码已过期或已失效。
|
||||||
reset_password_helper=单击此处重置密码
|
reset_password_helper=单击此处重置密码
|
||||||
password_too_short=密码长度不能少于 6 位!
|
password_too_short=密码长度不能少于 %d 位!
|
||||||
non_local_account=非本地类型的帐户无法通过 Gitea 修改密码。
|
non_local_account=非本地类型的帐户无法通过 Gitea 修改密码。
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=單擊此處(重新)發送您的密碼重置郵件
|
||||||
reset_password=重置密碼
|
reset_password=重置密碼
|
||||||
invalid_code=對不起,您的確認代碼已過期或已失效。
|
invalid_code=對不起,您的確認代碼已過期或已失效。
|
||||||
reset_password_helper=單擊此處重置密碼
|
reset_password_helper=單擊此處重置密碼
|
||||||
password_too_short=密碼長度不能少於 6 位!
|
password_too_short=密碼長度不能少於 %d 位!
|
||||||
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
non_local_account=Non-local accounts cannot change passwords through Gitea.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -161,7 +161,7 @@ send_reset_mail=單擊此處(重新)發送您的密碼重置郵件
|
||||||
reset_password=重置密碼
|
reset_password=重置密碼
|
||||||
invalid_code=對不起,您的確認代碼已過期或已失效。
|
invalid_code=對不起,您的確認代碼已過期或已失效。
|
||||||
reset_password_helper=單擊此處重置密碼
|
reset_password_helper=單擊此處重置密碼
|
||||||
password_too_short=密碼長度不能少於 6 位!
|
password_too_short=密碼長度不能少於 %d 位!
|
||||||
non_local_account=非本地帳戶無法通過 Gitea 修改密碼。
|
non_local_account=非本地帳戶無法通過 Gitea 修改密碼。
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
|
|
|
@ -241,7 +241,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
|
||||||
cfg.Section("").Key("APP_NAME").SetValue(form.AppName)
|
cfg.Section("").Key("APP_NAME").SetValue(form.AppName)
|
||||||
cfg.Section("repository").Key("ROOT").SetValue(form.RepoRootPath)
|
cfg.Section("repository").Key("ROOT").SetValue(form.RepoRootPath)
|
||||||
cfg.Section("").Key("RUN_USER").SetValue(form.RunUser)
|
cfg.Section("").Key("RUN_USER").SetValue(form.RunUser)
|
||||||
cfg.Section("server").Key("DOMAIN").SetValue(form.Domain)
|
cfg.Section("server").Key("SSH_DOMAIN").SetValue(form.Domain)
|
||||||
cfg.Section("server").Key("HTTP_PORT").SetValue(form.HTTPPort)
|
cfg.Section("server").Key("HTTP_PORT").SetValue(form.HTTPPort)
|
||||||
cfg.Section("server").Key("ROOT_URL").SetValue(form.AppURL)
|
cfg.Section("server").Key("ROOT_URL").SetValue(form.AppURL)
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ func getForkRepository(ctx *context.Context) *models.Repository {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if !forkRepo.CanBeForked() {
|
if !forkRepo.CanBeForked() || !forkRepo.HasAccess(ctx.User) {
|
||||||
ctx.Handle(404, "getForkRepository", nil)
|
ctx.Handle(404, "getForkRepository", nil)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -296,7 +296,8 @@ func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm) {
|
||||||
|
|
||||||
// DeleteRelease delete a release
|
// DeleteRelease delete a release
|
||||||
func DeleteRelease(ctx *context.Context) {
|
func DeleteRelease(ctx *context.Context) {
|
||||||
if err := models.DeleteReleaseByID(ctx.QueryInt64("id"), ctx.User); err != nil {
|
delTag := ctx.QueryBool("delTag")
|
||||||
|
if err := models.DeleteReleaseByID(ctx.QueryInt64("id"), ctx.User, delTag); err != nil {
|
||||||
ctx.Flash.Error("DeleteReleaseByID: " + err.Error())
|
ctx.Flash.Error("DeleteReleaseByID: " + err.Error())
|
||||||
} else {
|
} else {
|
||||||
ctx.Flash.Success(ctx.Tr("repo.release.deletion_success"))
|
ctx.Flash.Success(ctx.Tr("repo.release.deletion_success"))
|
||||||
|
|
|
@ -89,7 +89,7 @@ func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, str
|
||||||
ctx.Data["title"] = pageName
|
ctx.Data["title"] = pageName
|
||||||
ctx.Data["RequireHighlightJS"] = true
|
ctx.Data["RequireHighlightJS"] = true
|
||||||
|
|
||||||
blob, err := commit.GetBlobByPath(pageName + ".md")
|
blob, err := commit.GetBlobByPath(pageURL + ".md")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if git.IsErrNotExist(err) {
|
if git.IsErrNotExist(err) {
|
||||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/_pages")
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/_pages")
|
||||||
|
@ -114,7 +114,7 @@ func renderWikiPage(ctx *context.Context, isViewPage bool) (*git.Repository, str
|
||||||
ctx.Data["content"] = string(data)
|
ctx.Data["content"] = string(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return wikiRepo, pageName
|
return wikiRepo, pageURL
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wiki render wiki page
|
// Wiki render wiki page
|
||||||
|
@ -127,13 +127,13 @@ func Wiki(ctx *context.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
wikiRepo, pageName := renderWikiPage(ctx, true)
|
wikiRepo, pagePath := renderWikiPage(ctx, true)
|
||||||
if ctx.Written() {
|
if ctx.Written() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get last change information.
|
// Get last change information.
|
||||||
lastCommit, err := wikiRepo.GetCommitByPath(pageName + ".md")
|
lastCommit, err := wikiRepo.GetCommitByPath(pagePath + ".md")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "GetCommitByPath", err)
|
ctx.Handle(500, "GetCommitByPath", err)
|
||||||
return
|
return
|
||||||
|
@ -214,7 +214,9 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := ctx.Repo.Repository.AddWikiPage(ctx.User, form.Title, form.Content, form.Message); err != nil {
|
wikiPath := models.ToWikiPageURL(form.Title)
|
||||||
|
|
||||||
|
if err := ctx.Repo.Repository.AddWikiPage(ctx.User, wikiPath, form.Content, form.Message); err != nil {
|
||||||
if models.IsErrWikiAlreadyExist(err) {
|
if models.IsErrWikiAlreadyExist(err) {
|
||||||
ctx.Data["Err_Title"] = true
|
ctx.Data["Err_Title"] = true
|
||||||
ctx.RenderWithErr(ctx.Tr("repo.wiki.page_already_exists"), tplWikiNew, &form)
|
ctx.RenderWithErr(ctx.Tr("repo.wiki.page_already_exists"), tplWikiNew, &form)
|
||||||
|
@ -224,7 +226,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.ToWikiPageURL(form.Title))
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + wikiPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// EditWiki render wiki modify page
|
// EditWiki render wiki modify page
|
||||||
|
@ -257,12 +259,15 @@ func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := ctx.Repo.Repository.EditWikiPage(ctx.User, form.OldTitle, form.Title, form.Content, form.Message); err != nil {
|
oldWikiPath := ctx.Params(":page")
|
||||||
|
newWikiPath := models.ToWikiPageURL(form.Title)
|
||||||
|
|
||||||
|
if err := ctx.Repo.Repository.EditWikiPage(ctx.User, oldWikiPath, newWikiPath, form.Content, form.Message); err != nil {
|
||||||
ctx.Handle(500, "EditWikiPage", err)
|
ctx.Handle(500, "EditWikiPage", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.ToWikiPageURL(form.Title))
|
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + newWikiPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteWikiPagePost delete wiki page
|
// DeleteWikiPagePost delete wiki page
|
||||||
|
@ -272,8 +277,7 @@ func DeleteWikiPagePost(ctx *context.Context) {
|
||||||
pageURL = "Home"
|
pageURL = "Home"
|
||||||
}
|
}
|
||||||
|
|
||||||
pageName := models.ToWikiPageName(pageURL)
|
if err := ctx.Repo.Repository.DeleteWikiPage(ctx.User, pageURL); err != nil {
|
||||||
if err := ctx.Repo.Repository.DeleteWikiPage(ctx.User, pageName); err != nil {
|
|
||||||
ctx.Handle(500, "DeleteWikiPage", err)
|
ctx.Handle(500, "DeleteWikiPage", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,15 +88,15 @@
|
||||||
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||||
<dd>{{.DbCfg.Type}}</dd>
|
<dd>{{.DbCfg.Type}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||||
<dd>{{.DbCfg.Host}}</dd>
|
<dd>{{if .DbCfg.Host}}{{.DbCfg.Host}}{{else}}-{{end}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||||
<dd>{{.DbCfg.Name}}</dd>
|
<dd>{{if .DbCfg.Name}}{{.DbCfg.Name}}{{else}}-{{end}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||||
<dd>{{.DbCfg.User}}</dd>
|
<dd>{{if .DbCfg.User}}{{.DbCfg.User}}{{else}}-{{end}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
||||||
<dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
<dd><i class="fa fa{{if .DbCfg.SSLMode}}-check{{end}}-square-o"></i> {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||||
<dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
<dd>{{if .DbCfg.Path}}{{.DbCfg.Path}}{{else}}-{{end}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
||||||
<dd>{{.SessionConfig.Provider}}</dd>
|
<dd>{{.SessionConfig.Provider}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
||||||
<dd><code>{{.SessionConfig.ProviderConfig}}</code></dd>
|
<dd><code>{{if .SessionConfig.ProviderConfig}}{{.SessionConfig.ProviderConfig}}{{else}}-{{end}}</code></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
||||||
<dd>{{.SessionConfig.CookieName}}</dd>
|
<dd>{{.SessionConfig.CookieName}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
{{if .Flash.ErrorMsg}}
|
{{if .Flash.ErrorMsg}}
|
||||||
<div class="ui negative message">
|
<div class="ui negative message">
|
||||||
<p>{{.Flash.ErrorMsg | Safe}}</p>
|
<p>{{.Flash.ErrorMsg | Str2html}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .Flash.SuccessMsg}}
|
{{if .Flash.SuccessMsg}}
|
||||||
<div class="ui positive message">
|
<div class="ui positive message">
|
||||||
<p>{{.Flash.SuccessMsg | Safe}}</p>
|
<p>{{.Flash.SuccessMsg | Str2html}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .Flash.InfoMsg}}
|
{{if .Flash.InfoMsg}}
|
||||||
<div class="ui info message">
|
<div class="ui info message">
|
||||||
<p>{{.Flash.InfoMsg | Safe}}</p>
|
<p>{{.Flash.InfoMsg | Str2html}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="ui attached segment">
|
<div class="ui attached segment">
|
||||||
{{template "base/alert" .}}
|
{{template "base/alert" .}}
|
||||||
|
|
||||||
<p>{{.i18n.Tr "install.docker_helper" "https://github.com/go-gitea/gitea/tree/master/docker" | Safe}}</p>
|
<p>{{.i18n.Tr "install.docker_helper" "https://docs.gitea.io/en-us/install-with-docker/" | Safe}}</p>
|
||||||
|
|
||||||
<form class="ui form" action="{{AppSubUrl}}/install" method="post">
|
<form class="ui form" action="{{AppSubUrl}}/install" method="post">
|
||||||
<!-- Dtabase Settings -->
|
<!-- Dtabase Settings -->
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
|
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
|
||||||
{{range .Labels}}
|
{{range .Labels}}
|
||||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name | Sanitize}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
|
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
|
||||||
{{range .Milestones}}
|
{{range .Milestones}}
|
||||||
<a class="{{if eq $.MilestoneID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name}}</a>
|
<a class="{{if eq $.MilestoneID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name | Sanitize}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
<a class="title has-emoji" href="{{$.Link}}/{{.Index}}">{{.Title}}</a>
|
<a class="title has-emoji" href="{{$.Link}}/{{.Index}}">{{.Title}}</a>
|
||||||
|
|
||||||
{{range .Labels}}
|
{{range .Labels}}
|
||||||
<a class="ui label" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name}}</a>
|
<a class="ui label" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name | Sanitize}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if .NumComments}}
|
{{if .NumComments}}
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
|
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
|
||||||
{{if .Milestone}}
|
{{if .Milestone}}
|
||||||
<a class="milestone" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
|
<a class="milestone" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
|
||||||
<span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
|
<span class="octicon octicon-milestone"></span> {{.Milestone.Name | Sanitize}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .Assignee}}
|
{{if .Assignee}}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<div class="milestone list">
|
<div class="milestone list">
|
||||||
{{range .Milestones}}
|
{{range .Milestones}}
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&milestone={{.ID}}">{{.Name}}</a>
|
<i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&milestone={{.ID}}">{{.Name | Sanitize}}</a>
|
||||||
<div class="ui right green progress" data-percent="{{.Completeness}}">
|
<div class="ui right green progress" data-percent="{{.Completeness}}">
|
||||||
<div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
|
<div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
|
||||||
<div class="progress"></div>
|
<div class="progress"></div>
|
||||||
|
|
|
@ -263,7 +263,7 @@
|
||||||
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
|
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
|
||||||
{{range .Labels}}
|
{{range .Labels}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<a class="ui label {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name}}</a>
|
<a class="ui label {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name | Sanitize}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
||||||
</div>
|
</div>
|
||||||
{{range .OpenMilestones}}
|
{{range .OpenMilestones}}
|
||||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name | Sanitize}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .ClosedMilestones}}
|
{{if .ClosedMilestones}}
|
||||||
|
@ -295,7 +295,7 @@
|
||||||
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
||||||
</div>
|
</div>
|
||||||
{{range .ClosedMilestones}}
|
{{range .ClosedMilestones}}
|
||||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name | Sanitize}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -304,7 +304,7 @@
|
||||||
<span class="no-select item {{if .Issue.Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
|
<span class="no-select item {{if .Issue.Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
|
||||||
<div class="selected">
|
<div class="selected">
|
||||||
{{if .Issue.Milestone}}
|
{{if .Issue.Milestone}}
|
||||||
<a class="item" href="{{.RepoLink}}/issues?milestone={{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name}}</a>
|
<a class="item" href="{{.RepoLink}}/issues?milestone={{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name | Sanitize}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="repository wiki view">
|
<div class="repository wiki view">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
|
{{ $title := .title | Sanitize}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="ui ten wide column">
|
<div class="ui ten wide column">
|
||||||
|
@ -9,7 +10,7 @@
|
||||||
<div class="ui basic small button">
|
<div class="ui basic small button">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.wiki.page"}}:
|
{{.i18n.Tr "repo.wiki.page"}}:
|
||||||
<strong>{{.title}}</strong>
|
<strong>{{$title}}</strong>
|
||||||
</span>
|
</span>
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="scrolling menu">
|
<div class="scrolling menu">
|
||||||
{{range .Pages}}
|
{{range .Pages}}
|
||||||
<div class="item {{if eq $.Title .Name}}selected{{end}}" data-url="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name}}</div>
|
<div class="item {{if eq $.Title .Name}}selected{{end}}" data-url="{{$.RepoLink}}/wiki/{{.URL}}">{{.Name | Sanitize}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui dividing header">
|
<div class="ui dividing header">
|
||||||
{{.title}}
|
{{$title}}
|
||||||
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
|
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
<a class="ui small button" href="{{.RepoLink}}/wiki/{{EscapePound .PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
|
<a class="ui small button" href="{{.RepoLink}}/wiki/{{EscapePound .PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
|
||||||
|
@ -76,7 +77,7 @@
|
||||||
{{.i18n.Tr "repo.wiki.delete_page_button"}}
|
{{.i18n.Tr "repo.wiki.delete_page_button"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>{{.i18n.Tr "repo.wiki.delete_page_notice_1" .title | Safe}}</p>
|
<p>{{.i18n.Tr "repo.wiki.delete_page_notice_1" $title | Safe}}</p>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/delete_modal_actions" .}}
|
{{template "base/delete_modal_actions" .}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user