mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 05:13:05 +02:00
1 parent
76d4b9288b
commit
e538ff2770
25 files changed
+248
-94
No files matched your search
@@ -5,7 +5,7 @@ Gogs - Go Git Service [
|

|
||||||
|
|
||||||
##### Current version: 0.7.29 Beta
|
##### Current version: 0.7.30 Beta
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
+4
-4
@@ -421,7 +421,7 @@ func runWeb(ctx *cli.Context) {
|
|||||||
m.Get("/action/:action", repo.Action)
|
m.Get("/action/:action", repo.Action)
|
||||||
|
|
||||||
m.Group("/issues", func() {
|
m.Group("/issues", func() {
|
||||||
m.Combo("/new").Get(middleware.RepoRef(), repo.NewIssue).
|
m.Combo("/new", repo.MustEnableIssues).Get(middleware.RepoRef(), repo.NewIssue).
|
||||||
Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost)
|
Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost)
|
||||||
|
|
||||||
m.Combo("/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment)
|
m.Combo("/:index/comments").Post(bindIgnErr(auth.CreateCommentForm{}), repo.NewComment)
|
||||||
@@ -459,7 +459,7 @@ func runWeb(ctx *cli.Context) {
|
|||||||
m.Post("/delete", repo.DeleteRelease)
|
m.Post("/delete", repo.DeleteRelease)
|
||||||
}, reqRepoAdmin, middleware.RepoRef())
|
}, reqRepoAdmin, middleware.RepoRef())
|
||||||
|
|
||||||
m.Combo("/compare/*").Get(repo.CompareAndPullRequest).
|
m.Combo("/compare/*", repo.MustEnablePulls).Get(repo.CompareAndPullRequest).
|
||||||
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
|
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
|
||||||
}, reqSignIn, middleware.RepoAssignment())
|
}, reqSignIn, middleware.RepoAssignment())
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ func runWeb(ctx *cli.Context) {
|
|||||||
m.Combo("/:page/_edit").Get(repo.EditWiki).
|
m.Combo("/:page/_edit").Get(repo.EditWiki).
|
||||||
Post(bindIgnErr(auth.NewWikiForm{}), repo.EditWikiPost)
|
Post(bindIgnErr(auth.NewWikiForm{}), repo.EditWikiPost)
|
||||||
}, reqSignIn, reqRepoPusher)
|
}, reqSignIn, reqRepoPusher)
|
||||||
}, middleware.RepoRef())
|
}, repo.MustEnableWiki, middleware.RepoRef())
|
||||||
|
|
||||||
m.Get("/archive/*", repo.Download)
|
m.Get("/archive/*", repo.Download)
|
||||||
|
|
||||||
@@ -492,7 +492,7 @@ func runWeb(ctx *cli.Context) {
|
|||||||
m.Get("/commits", repo.ViewPullCommits)
|
m.Get("/commits", repo.ViewPullCommits)
|
||||||
m.Get("/files", repo.ViewPullFiles)
|
m.Get("/files", repo.ViewPullFiles)
|
||||||
m.Post("/merge", reqRepoAdmin, repo.MergePullRequest)
|
m.Post("/merge", reqRepoAdmin, repo.MergePullRequest)
|
||||||
})
|
}, repo.MustEnablePulls)
|
||||||
|
|
||||||
m.Group("", func() {
|
m.Group("", func() {
|
||||||
m.Get("/src/*", repo.Home)
|
m.Get("/src/*", repo.Home)
|
||||||
|
|||||||
@@ -558,10 +558,17 @@ settings.collaboration = Collaboration
|
|||||||
settings.hooks = Webhooks
|
settings.hooks = Webhooks
|
||||||
settings.githooks = Git Hooks
|
settings.githooks = Git Hooks
|
||||||
settings.basic_settings = Basic Settings
|
settings.basic_settings = Basic Settings
|
||||||
settings.danger_zone = Danger Zone
|
|
||||||
settings.site = Official Site
|
settings.site = Official Site
|
||||||
settings.update_settings = Update Settings
|
settings.update_settings = Update Settings
|
||||||
settings.change_reponame_prompt = This change will affect how links relate to the repository.
|
settings.change_reponame_prompt = This change will affect how links relate to the repository.
|
||||||
|
settings.advanced_settings = Advanced Settings
|
||||||
|
settings.wiki_desc = Enable wiki to allow people write documents
|
||||||
|
settings.issues_desc = Enable builtin lightweight issue tracker
|
||||||
|
settings.use_external_issue_tracker = Use external issue tracker
|
||||||
|
settings.tracker_url_format = External Issue Tracker URL Format
|
||||||
|
settings.tracker_url_format_desc = You can use placeholder <code>{user} {repo} {index}</code> for user name, repository name and issue index.
|
||||||
|
settings.pulls_desc = Enable pull requests to accept public contributions
|
||||||
|
settings.danger_zone = Danger Zone
|
||||||
settings.transfer = Transfer Ownership
|
settings.transfer = Transfer Ownership
|
||||||
settings.transfer_desc = Transfer this repository to another user or to an organization in which you have admin rights.
|
settings.transfer_desc = Transfer this repository to another user or to an organization in which you have admin rights.
|
||||||
settings.new_owner_has_same_repo = The new owner already has a repository with same name. Please choose another name.
|
settings.new_owner_has_same_repo = The new owner already has a repository with same name. Please choose another name.
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ Directory `/var/gogs` keeps Git repositories and Gogs data:
|
|||||||
|-- conf
|
|-- conf
|
||||||
|-- data
|
|-- data
|
||||||
|-- log
|
|-- log
|
||||||
|-- templates
|
|
||||||
|
|
||||||
### Volume with data container
|
### Volume with data container
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.7.29.1204 Beta"
|
const APP_VER = "0.7.30.1204 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|||||||
@@ -161,6 +161,14 @@ type Repository struct {
|
|||||||
IsMirror bool
|
IsMirror bool
|
||||||
*Mirror `xorm:"-"`
|
*Mirror `xorm:"-"`
|
||||||
|
|
||||||
|
// Advanced settings
|
||||||
|
EnableWiki bool `xorm:"NOT NULL DEFAULT true"`
|
||||||
|
EnableIssues bool `xorm:"NOT NULL DEFAULT true"`
|
||||||
|
EnableExternalTracker bool
|
||||||
|
ExternalTrackerFormat string
|
||||||
|
ExternalMetas map[string]string `xorm:"-"`
|
||||||
|
EnablePulls bool `xorm:"NOT NULL DEFAULT true"`
|
||||||
|
|
||||||
IsFork bool `xorm:"NOT NULL DEFAULT false"`
|
IsFork bool `xorm:"NOT NULL DEFAULT false"`
|
||||||
ForkID int64
|
ForkID int64
|
||||||
BaseRepo *Repository `xorm:"-"`
|
BaseRepo *Repository `xorm:"-"`
|
||||||
@@ -214,6 +222,20 @@ func (repo *Repository) MustOwner() *User {
|
|||||||
return repo.mustOwner(x)
|
return repo.mustOwner(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ComposeMetas composes a map of metas for rendering external issue tracker URL.
|
||||||
|
func (repo *Repository) ComposeMetas() map[string]string {
|
||||||
|
if !repo.EnableExternalTracker {
|
||||||
|
return nil
|
||||||
|
} else if repo.ExternalMetas == nil {
|
||||||
|
repo.ExternalMetas = map[string]string{
|
||||||
|
"format": repo.ExternalTrackerFormat,
|
||||||
|
"user": repo.MustOwner().Name,
|
||||||
|
"repo": repo.Name,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return repo.ExternalMetas
|
||||||
|
}
|
||||||
|
|
||||||
// GetAssignees returns all users that have write access of repository.
|
// GetAssignees returns all users that have write access of repository.
|
||||||
func (repo *Repository) GetAssignees() (_ []*User, err error) {
|
func (repo *Repository) GetAssignees() (_ []*User, err error) {
|
||||||
if err = repo.GetOwner(); err != nil {
|
if err = repo.GetOwner(); err != nil {
|
||||||
|
|||||||
@@ -87,6 +87,13 @@ type RepoSettingForm struct {
|
|||||||
Branch string
|
Branch string
|
||||||
Interval int
|
Interval int
|
||||||
Private bool
|
Private bool
|
||||||
|
|
||||||
|
// Advanced settings
|
||||||
|
EnableWiki bool
|
||||||
|
EnableIssues bool
|
||||||
|
EnableExternalTracker bool
|
||||||
|
TrackerURLFormat string
|
||||||
|
EnablePulls bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
|
||||||
|
|||||||
+67
-62
@@ -137,50 +137,6 @@ var (
|
|||||||
sha1CurrentPattern = regexp.MustCompile(`\b[0-9a-f]{40}\b`)
|
sha1CurrentPattern = regexp.MustCompile(`\b[0-9a-f]{40}\b`)
|
||||||
)
|
)
|
||||||
|
|
||||||
func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte {
|
|
||||||
ms := MentionPattern.FindAll(rawBytes, -1)
|
|
||||||
for _, m := range ms {
|
|
||||||
m = bytes.TrimSpace(m)
|
|
||||||
rawBytes = bytes.Replace(rawBytes, m,
|
|
||||||
[]byte(fmt.Sprintf(`<a href="%s/%s">%s</a>`, setting.AppSubUrl, m[1:], m)), -1)
|
|
||||||
}
|
|
||||||
|
|
||||||
ms = commitPattern.FindAll(rawBytes, -1)
|
|
||||||
for _, m := range ms {
|
|
||||||
m = bytes.TrimSpace(m)
|
|
||||||
i := strings.Index(string(m), "commit/")
|
|
||||||
j := strings.Index(string(m), "#")
|
|
||||||
if j == -1 {
|
|
||||||
j = len(m)
|
|
||||||
}
|
|
||||||
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(
|
|
||||||
` <code><a href="%s">%s</a></code>`, m, ShortSha(string(m[i+7:j])))), -1)
|
|
||||||
}
|
|
||||||
ms = issueFullPattern.FindAll(rawBytes, -1)
|
|
||||||
for _, m := range ms {
|
|
||||||
m = bytes.TrimSpace(m)
|
|
||||||
i := strings.Index(string(m), "issues/")
|
|
||||||
j := strings.Index(string(m), "#")
|
|
||||||
if j == -1 {
|
|
||||||
j = len(m)
|
|
||||||
}
|
|
||||||
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(
|
|
||||||
` <a href="%s">#%s</a>`, m, ShortSha(string(m[i+7:j])))), -1)
|
|
||||||
}
|
|
||||||
rawBytes = RenderIssueIndexPattern(rawBytes, urlPrefix)
|
|
||||||
rawBytes = RenderSha1CurrentPattern(rawBytes, urlPrefix)
|
|
||||||
return rawBytes
|
|
||||||
}
|
|
||||||
|
|
||||||
func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
|
|
||||||
ms := sha1CurrentPattern.FindAll(rawBytes, -1)
|
|
||||||
for _, m := range ms {
|
|
||||||
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(
|
|
||||||
`<a href="%s/commit/%s"><code>%s</code></a>`, urlPrefix, m, ShortSha(string(m)))), -1)
|
|
||||||
}
|
|
||||||
return rawBytes
|
|
||||||
}
|
|
||||||
|
|
||||||
func cutoutVerbosePrefix(prefix string) string {
|
func cutoutVerbosePrefix(prefix string) string {
|
||||||
count := 0
|
count := 0
|
||||||
for i := 0; i < len(prefix); i++ {
|
for i := 0; i < len(prefix); i++ {
|
||||||
@@ -194,7 +150,7 @@ func cutoutVerbosePrefix(prefix string) string {
|
|||||||
return prefix
|
return prefix
|
||||||
}
|
}
|
||||||
|
|
||||||
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
|
func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string, metas map[string]string) []byte {
|
||||||
urlPrefix = cutoutVerbosePrefix(urlPrefix)
|
urlPrefix = cutoutVerbosePrefix(urlPrefix)
|
||||||
ms := issueIndexPattern.FindAll(rawBytes, -1)
|
ms := issueIndexPattern.FindAll(rawBytes, -1)
|
||||||
for _, m := range ms {
|
for _, m := range ms {
|
||||||
@@ -204,24 +160,45 @@ func RenderIssueIndexPattern(rawBytes []byte, urlPrefix string) []byte {
|
|||||||
space = " "
|
space = " "
|
||||||
m2 = m2[1:]
|
m2 = m2[1:]
|
||||||
}
|
}
|
||||||
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(`%s<a href="%s/issues/%s">%s</a>`,
|
if metas == nil {
|
||||||
space, urlPrefix, m2[1:], m2)), 1)
|
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(`%s<a href="%s/issues/%s">%s</a>`,
|
||||||
|
space, urlPrefix, m2[1:], m2)), 1)
|
||||||
|
} else {
|
||||||
|
// Support for external issue tracker
|
||||||
|
metas["index"] = string(m2[1:])
|
||||||
|
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(`%s<a href="%s">%s</a>`,
|
||||||
|
space, com.Expand(metas["format"], metas), m2)), 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rawBytes
|
||||||
|
}
|
||||||
|
|
||||||
|
func RenderSpecialLink(rawBytes []byte, urlPrefix string, metas map[string]string) []byte {
|
||||||
|
ms := MentionPattern.FindAll(rawBytes, -1)
|
||||||
|
for _, m := range ms {
|
||||||
|
m = bytes.TrimSpace(m)
|
||||||
|
rawBytes = bytes.Replace(rawBytes, m,
|
||||||
|
[]byte(fmt.Sprintf(`<a href="%s/%s">%s</a>`, setting.AppSubUrl, m[1:], m)), -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
rawBytes = RenderIssueIndexPattern(rawBytes, urlPrefix, metas)
|
||||||
|
rawBytes = RenderSha1CurrentPattern(rawBytes, urlPrefix)
|
||||||
|
return rawBytes
|
||||||
|
}
|
||||||
|
|
||||||
|
func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
|
||||||
|
ms := sha1CurrentPattern.FindAll(rawBytes, -1)
|
||||||
|
for _, m := range ms {
|
||||||
|
rawBytes = bytes.Replace(rawBytes, m, []byte(fmt.Sprintf(
|
||||||
|
`<a href="%s/commit/%s"><code>%s</code></a>`, urlPrefix, m, ShortSha(string(m)))), -1)
|
||||||
}
|
}
|
||||||
return rawBytes
|
return rawBytes
|
||||||
}
|
}
|
||||||
|
|
||||||
func RenderRawMarkdown(body []byte, urlPrefix string) []byte {
|
func RenderRawMarkdown(body []byte, urlPrefix string) []byte {
|
||||||
htmlFlags := 0
|
htmlFlags := 0
|
||||||
// htmlFlags |= blackfriday.HTML_USE_XHTML
|
|
||||||
// htmlFlags |= blackfriday.HTML_USE_SMARTYPANTS
|
|
||||||
// htmlFlags |= blackfriday.HTML_SMARTYPANTS_FRACTIONS
|
|
||||||
// htmlFlags |= blackfriday.HTML_SMARTYPANTS_LATEX_DASHES
|
|
||||||
// htmlFlags |= blackfriday.HTML_SKIP_HTML
|
|
||||||
htmlFlags |= blackfriday.HTML_SKIP_STYLE
|
htmlFlags |= blackfriday.HTML_SKIP_STYLE
|
||||||
// htmlFlags |= blackfriday.HTML_SKIP_SCRIPT
|
|
||||||
// htmlFlags |= blackfriday.HTML_GITHUB_BLOCKCODE
|
|
||||||
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
|
htmlFlags |= blackfriday.HTML_OMIT_CONTENTS
|
||||||
// htmlFlags |= blackfriday.HTML_COMPLETE_PAGE
|
|
||||||
renderer := &CustomRender{
|
renderer := &CustomRender{
|
||||||
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
|
Renderer: blackfriday.HtmlRenderer(htmlFlags, "", ""),
|
||||||
urlPrefix: urlPrefix,
|
urlPrefix: urlPrefix,
|
||||||
@@ -252,9 +229,36 @@ var (
|
|||||||
|
|
||||||
var noEndTags = []string{"img", "input", "br", "hr"}
|
var noEndTags = []string{"img", "input", "br", "hr"}
|
||||||
|
|
||||||
|
// PreProcessMarkdown renders full links of commits, issues and pulls to shorter version.
|
||||||
|
func PreProcessMarkdown(rawHTML []byte, urlPrefix string) []byte {
|
||||||
|
ms := commitPattern.FindAll(rawHTML, -1)
|
||||||
|
for _, m := range ms {
|
||||||
|
m = bytes.TrimSpace(m)
|
||||||
|
i := strings.Index(string(m), "commit/")
|
||||||
|
j := strings.Index(string(m), "#")
|
||||||
|
if j == -1 {
|
||||||
|
j = len(m)
|
||||||
|
}
|
||||||
|
rawHTML = bytes.Replace(rawHTML, m, []byte(fmt.Sprintf(
|
||||||
|
` <code><a href="%s">%s</a></code>`, m, ShortSha(string(m[i+7:j])))), -1)
|
||||||
|
}
|
||||||
|
ms = issueFullPattern.FindAll(rawHTML, -1)
|
||||||
|
for _, m := range ms {
|
||||||
|
m = bytes.TrimSpace(m)
|
||||||
|
i := strings.Index(string(m), "issues/")
|
||||||
|
j := strings.Index(string(m), "#")
|
||||||
|
if j == -1 {
|
||||||
|
j = len(m)
|
||||||
|
}
|
||||||
|
rawHTML = bytes.Replace(rawHTML, m, []byte(fmt.Sprintf(
|
||||||
|
` <a href="%s">#%s</a>`, m, ShortSha(string(m[i+7:j])))), -1)
|
||||||
|
}
|
||||||
|
return rawHTML
|
||||||
|
}
|
||||||
|
|
||||||
// PostProcessMarkdown treats different types of HTML differently,
|
// PostProcessMarkdown treats different types of HTML differently,
|
||||||
// and only renders special links for plain text blocks.
|
// and only renders special links for plain text blocks.
|
||||||
func PostProcessMarkdown(rawHtml []byte, urlPrefix string) []byte {
|
func PostProcessMarkdown(rawHtml []byte, urlPrefix string, metas map[string]string) []byte {
|
||||||
startTags := make([]string, 0, 5)
|
startTags := make([]string, 0, 5)
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
tokenizer := html.NewTokenizer(bytes.NewReader(rawHtml))
|
tokenizer := html.NewTokenizer(bytes.NewReader(rawHtml))
|
||||||
@@ -264,7 +268,7 @@ OUTER_LOOP:
|
|||||||
token := tokenizer.Token()
|
token := tokenizer.Token()
|
||||||
switch token.Type {
|
switch token.Type {
|
||||||
case html.TextToken:
|
case html.TextToken:
|
||||||
buf.Write(RenderSpecialLink([]byte(token.String()), urlPrefix))
|
buf.Write(RenderSpecialLink([]byte(token.String()), urlPrefix, metas))
|
||||||
|
|
||||||
case html.StartTagToken:
|
case html.StartTagToken:
|
||||||
buf.WriteString(token.String())
|
buf.WriteString(token.String())
|
||||||
@@ -322,13 +326,14 @@ OUTER_LOOP:
|
|||||||
return rawHtml
|
return rawHtml
|
||||||
}
|
}
|
||||||
|
|
||||||
func RenderMarkdown(rawBytes []byte, urlPrefix string) []byte {
|
func RenderMarkdown(rawBytes []byte, urlPrefix string, metas map[string]string) []byte {
|
||||||
result := RenderRawMarkdown(rawBytes, urlPrefix)
|
result := PreProcessMarkdown(rawBytes, urlPrefix)
|
||||||
result = PostProcessMarkdown(result, urlPrefix)
|
result = RenderRawMarkdown(result, urlPrefix)
|
||||||
|
result = PostProcessMarkdown(result, urlPrefix, metas)
|
||||||
result = Sanitizer.SanitizeBytes(result)
|
result = Sanitizer.SanitizeBytes(result)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
func RenderMarkdownString(raw, urlPrefix string) string {
|
func RenderMarkdownString(raw, urlPrefix string, metas map[string]string) string {
|
||||||
return string(RenderMarkdown([]byte(raw), urlPrefix))
|
return string(RenderMarkdown([]byte(raw), urlPrefix, metas))
|
||||||
}
|
}
|
||||||
@@ -4364,7 +4364,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
|
|||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xfd\x72\xdc\xc6\xae\xe7\xff\x7c\x0a\xc6\xa7\x5c\x4e\xaa\xe4\x49\x25\xb9\xfb\x51\xa9\x38\x59\xd9\x8e\x3f\xee\xb5\x2c\x5d\x4b\x39\x67\xcf\xa6\x5c\x13\x6a\x48\x8d\x78\x3d\x43\xce\x21\x39\x56\x74\x6e\xdd\x37\xd8\x07\xd8\xe7\xdb\x27\x59\xe0\x07\xa0\x1b\x4d\x72\x24\x3b\xf7\xd4\xfa\x0f\x8b\xd3\x8d\xfe\x42\xa3\xd1\x68\x34\x80\x2e\x76\xbb\x65\x59\xf5\xab\xfc\x49\x7e\x9c\xef\x8a\xba\xd9\x54\x7d\x9f\xf7\xd5\xe6\xea\xf1\x75\xdb\x0f\x55\x99\xbf\xac\x07\xfa\xdd\x7d\xac\x57\x55\x96\x5d\xb7\xdb\x8a\x40\x5f\xd1\x9f\xac\x2c\xfa\xeb\xcb\xb6\xe8\x4a\x4a\x78\x6e\xdf\x59\xf5\xfb\x6e\xd3\x76\x0c\xf4\xb3\x7c\x65\xd7\xd5\x66\xc7\x65\xe8\x4f\xd6\xd7\xeb\x66\x59\x37\xf4\xf3\x9c\xbe\xf2\xd7\x8d\xa4\xb4\xfb\xc1\x92\x4e\xf7\x83\xa4\xed\x77\x96\xf4\xcb\x2e\xeb\xaa\x75\x4d\xbd\xe9\x28\xe9\x9d\x7e\x66\x37\xd5\x65\x5f\x0f\xdc\xd2\x5f\xe4\x2b\xfb\x58\x75\x7d\xdd\x72\xed\x7f\x96\xaf\x6c\x57\xac\x19\xe0\x8c\xfe\x64\x43\xb5\xdd\x6d\x0a\x14\xb8\xd0\xcf\x6c\x53\x34\xeb\xbd\xc0\xbc\xd1\xcf\x6c\xd5\x55\x94\xb5\x6c\xaa\x1b\x4a\x7d\x86\x1f\x8b\xc5\x22\xdb\x13\x12\x96\xbb\xae\xbd\xaa\x37\xd5\xb2\x68\xca\xe5\x56\x86\xf9\x0b\xa5\xe7\x9a\x9e\x53\x7a\xce\xe9\x18\x42\x55\xd2\x50\x97\x45\xaf\xe3\x20\x5c\xd2\xc8\x8b\x3e\x43\x55\x4d\xb1\xb5\xd2\xfc\x99\x55\xdb\xa2\xde\x30\xd6\xf8\x2f\xf5\xbb\xef\x6f\x5a\xa0\xf6\x4c\x3f\x09\x07\xcb\xe1\x76\x57\x01\x05\x8f\x2f\xe8\x2b\x5b\x15\xbb\x61\x75\x5d\x70\x37\xe5\x2b\x23\xa0\x5d\x4b\xb8\x68\xbb\x5b\xc0\xd9\x8f\xac\xed\xd6\x45\x53\xff\xbd\x18\x04\x3f\xa7\xee\x67\xb6\xad\xbb\xae\x65\xd4\x9e\xe0\x23\xa3\x91\x2f\xb9\x1e\x4a\x79\x4b\x48\x70\xb5\x70\xce\xb6\x5e\x77\x82\x45\xce\x3c\xc1\x2f\xae\x85\xf3\xae\xda\xee\x83\x66\xbc\xe0\xcf\x51\x51\xea\x84\xe6\xa6\xed\x17\x0d\xe1\x5d\x73\x4f\xf0\x23\x01\xe8\xb3\xa2\xdc\x12\x26\x77\x45\x53\x31\x8a\x8e\xf9\x17\xe1\x85\x7e\x65\xc5\x6a\xd5\xee\x9b\x61\xd9\x57\xc3\x50\x37\x6b\xc6\xf5\xb1\x24\xe5\xe7\x9a\x94\xb9\xbc\x90\x76\xdb\xee\xc3\x6c\x52\xfa\x5f\xe9\x67\x7e\x26\x3f\x25\xcf\x15\x42\x66\x28\xc9\x23\xe9\x97\x57\x55\x55\xca\x58\xfa\xfc\x05\x7d\x67\xbb\xfd\x66\x43\x58\xfb\xdb\xbe\xea\x07\x2e\x74\x46\xbf\x69\xfc\xf2\x3b\xab\xfb\x9e\x3e\x28\xf9\x35\x3e\x32\x9a\xba\x66\x85\xc1\x3c\xc3\x47\x96\xfd\xda\x57\x45\xb7\xba\x7e\x9f\xc9\x5f\xf4\x95\x3f\x98\xf4\x0e\x4d\x2a\xd3\x91\xd2\x90\xb4\x60\x0d\x64\xab\xb6\xe4\x1f\xcf\xe8\x0f\x55\x5d\x37\xfd\x50\x6c\x36\xef\x33\xfd\x60\x30\xf9\x92\x09\x18\xea\x01\x58\xd0\xc4\xfc\x7c\xa8\x76\x3d\xcf\x60\xfe\xa2\xee\xfa\xe1\xf1\x50\x13\xad\xbe\xdb\x37\x59\xd9\xae\x3e\xd0\x2a\xe0\x15\x8d\x96\x5f\x5f\xe5\x84\xac\x47\xb4\x0e\xba\x7d\xd3\x10\x7a\xf2\x97\x2d\xa1\x8c\x9a\xa9\xa9\xfd\xe7\x80\x3e\xca\x77\x9b\xaa\xe8\x09\xa4\x2a\xca\xfc\x87\x22\x1f\x8a\x6e\x5d\x0d\x4f\x1e\x2c\x2f\x69\xf5\x7d\x78\x90\x5f\x77\xd5\xd5\x93\x07\x0f\xfb\x07\x3f\xbe\xdc\x53\xb1\x4d\xdd\x54\xfd\x0f\x5f\x17\x3f\xe6\xab\x82\x72\x08\x8d\xb7\xf9\x65\x75\xc5\x8b\x8d\xda\xca\x89\xca\x9b\x35\x2f\xb4\xdb\xe1\x9a\x1b\x24\x4a\xa0\x8f\x3e\xe7\x95\xfe\x45\xc6\x13\x40\x9c\x60\x59\x5e\x1a\x57\x43\x87\x90\xdc\xd1\x04\x9c\xdc\x9e\xff\xeb\x9b\xa3\xfc\x8c\x58\xdb\xba\xab\xf0\x4d\xff\x51\x89\xef\x72\x1a\xed\x45\xfd\xfc\xe9\x22\xa3\xb2\x86\x90\xe7\xc5\x50\x5c\x72\xdf\xc3\xec\x73\xa6\x2c\xc2\x90\x87\xa5\xc8\xcc\x12\x8c\xb1\x1f\x92\x69\x99\x5b\xc8\x54\x87\xae\xfe\x50\xc7\x5b\x66\x01\x94\x1e\x30\x7b\x26\x38\xa3\xaa\xf2\xd7\x6f\xdf\x9e\x3e\x7f\x9a\x57\xcd\x9a\x30\x93\xdf\xd4\xc3\x75\xbe\x1f\xae\xfe\xfb\x72\x5d\x35\x55\x57\x6c\x96\xab\x9a\x91\xd2\x11\xc1\xe6\x84\x25\x19\xe2\x22\xeb\xfb\x0d\x71\x28\x50\xc1\xf9\xf9\x9b\xfc\x84\x29\x61\x57\x0c\xd7\xe8\xc8\x70\x9d\xf5\x7f\xdb\x30\xa2\x42\x83\x17\xd7\x55\x8e\xc5\x00\xa0\xf6\x6a\x8c\x97\xbc\xd4\xbe\x2e\xb2\xaa\xeb\x96\xc4\x40\x87\x5b\x46\xb3\xd6\x79\x08\x5a\xaa\x23\x6a\x6f\xda\x81\xa6\x31\x47\x39\xa9\xa2\x6e\x3e\x16\x9b\xba\x24\x64\x47\x84\xa4\x65\x91\x58\xb6\x34\x6f\x5c\x9a\x28\xb3\xbd\xc1\x50\x8b\x15\xf1\xff\x3e\x7f\xb0\x78\x00\x86\xfb\xe0\xf1\x83\x45\xd6\xb4\x4b\xe1\x12\xcc\x9a\xcb\xba\x2f\x2e\x89\x4d\xcb\xb6\xd1\x19\xd7\xfb\x2b\xd3\x8f\x74\x45\x21\xf2\x04\x82\x71\xcb\x5b\x11\x76\x00\x26\xae\x82\xf8\x35\x98\x8d\xb2\x19\x3f\x76\xe3\x49\x61\x7e\x85\x2d\x85\x84\xc9\x98\x33\x9b\x30\xa3\xae\xe3\xdd\x6e\x53\xaf\xa4\xe9\x97\x92\x17\x09\x8d\x37\x66\x45\x8a\x87\x03\xa1\x58\x9e\x23\x17\xea\x35\xb3\xad\x3c\xe1\xf3\x28\x7f\x5d\xd1\xca\xb9\xde\xaf\x65\x73\xda\xb4\xfb\xf2\x0b\x30\x14\x9b\xb9\xc8\x4f\xf2\x77\x2d\x75\x18\xd4\x11\x00\x62\x13\xc7\xc4\x18\x58\x16\xe8\xaa\x6d\x3b\x30\xe2\xb4\x58\x4d\xd3\x73\x53\x53\x26\x8d\xb4\x2f\x3e\x12\x5b\x1c\x5a\x59\x92\x25\x2d\xb9\x15\x57\x4c\x1c\x6c\x4f\x1b\xba\x2c\x0b\xe2\x23\xb2\x34\x2c\x2d\xa5\x41\x40\x6d\xf7\xb4\x9a\xae\xa9\x32\x46\x3c\x0b\x24\x54\xe5\x5c\x3f\x31\x24\xaa\x07\xab\x9c\x56\x6e\x4b\x9b\x27\x4f\xf4\x73\x7c\xe8\x6f\x5f\x3f\xf5\xaa\xb8\xba\xa2\x5e\xf5\xb4\x2a\x5e\xe5\xab\x4d\x4b\x4b\xea\x97\x77\x6f\x7a\x5e\x30\xd7\xcb\x5d\xdb\x41\x10\xa1\xac\x33\xfa\x0c\x69\x0e\xd1\x0c\xd1\xec\xb7\x97\xf4\xeb\xe6\xba\x26\x46\x0d\xb4\x73\x09\x16\x92\x28\x95\x9a\xd8\xf7\x3Line truncated
|
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xfd\x72\xdc\x46\xae\xef\xff\x7c\x0a\xc6\x5b\x2e\x27\x55\xf2\xa4\x92\x9c\xfb\x51\xa9\x38\xb9\x8a\x1d\x7f\x9c\x63\x59\x3a\x96\xb2\x7b\xf7\xa6\x5c\x13\x6a\x48\x8d\x78\x3c\x43\xce\x92\x1c\xcb\xda\xad\x7d\x83\xfb\x00\xf7\xf9\xee\x93\x5c\xe0\x07\xa0\x1b\x4d\x72\x24\x7b\xcf\xd6\xf5\x1f\x16\xa7\x1b\xfd\x85\x46\xa3\xd1\x68\x00\x5d\xec\x76\xcb\xb2\xea\x57\xf9\x93\xfc\x38\xdf\x15\x75\xb3\xa9\xfa\x3e\xef\xab\xcd\xd5\xe3\xeb\xb6\x1f\xaa\x32\x7f\x51\x0f\xf4\xbb\xfb\x50\xaf\xaa\x2c\xbb\x6e\xb7\x15\x81\xbe\xa4\x3f\x59\x59\xf4\xd7\x97\x6d\xd1\x95\x94\xf0\xcc\xbe\xb3\xea\xe3\x6e\xd3\x76\x0c\xf4\x8b\x7c\x65\xd7\xd5\x66\xc7\x65\xe8\x4f\xd6\xd7\xeb\x66\x59\x37\xf4\xf3\x9c\xbe\xf2\x57\x8d\xa4\xb4\xfb\xc1\x92\x4e\xf7\x83\xa4\xed\x77\x96\xf4\xeb\x2e\xeb\xaa\x75\x4d\xbd\xe9\x28\xe9\xad\x7e\x66\x37\xd5\x65\x5f\x0f\xdc\xd2\x9f\xe4\x2b\xfb\x50\x75\x7d\xdd\x72\xed\x7f\x94\xaf\x6c\x57\xac\x19\xe0\x8c\xfe\x64\x43\xb5\xdd\x6d\x0a\x14\xb8\xd0\xcf\x6c\x53\x34\xeb\xbd\xc0\xbc\xd6\xcf\x6c\xd5\x55\x94\xb5\x6c\xaa\x1b\x4a\x7d\x8a\x1f\x8b\xc5\x22\xdb\x13\x12\x96\xbb\xae\xbd\xaa\x37\xd5\xb2\x68\xca\xe5\x56\x86\xf9\x2b\xa5\xe7\x9a\x9e\x53\x7a\xce\xe9\x18\x42\x55\xd2\x50\x97\x45\xaf\xe3\x20\x5c\xd2\xc8\x8b\x3e\x43\x55\x4d\xb1\xb5\xd2\xfc\x99\x55\xdb\xa2\xde\x30\xd6\xf8\x2f\xf5\xbb\xef\x6f\x5a\xa0\xf6\x4c\x3f\x09\x07\xcb\xe1\x76\x57\x01\x05\x8f\x2f\xe8\x2b\x5b\x15\xbb\x61\x75\x5d\x70\x37\xe5\x2b\x23\xa0\x5d\x4b\xb8\x68\xbb\x5b\xc0\xd9\x8f\xac\xed\xd6\x45\x53\xff\xb5\x18\x04\x3f\xa7\xee\x67\xb6\xad\xbb\xae\x65\xd4\x9e\xe0\x23\xa3\x91\x2f\xb9\x1e\x4a\x79\x43\x48\x70\xb5\x70\xce\xb6\x5e\x77\x82\x45\xce\x3c\xc1\x2f\xae\x85\xf3\xae\xda\xee\xbd\x66\x3c\xe7\xcf\x51\x51\xea\x84\xe6\xa6\xed\x17\x0d\xe1\x5d\x73\x4f\xf0\x23\x01\xe8\xb3\xa2\xdc\x12\x26\x77\x45\x53\x31\x8a\x8e\xf9\x17\xe1\x85\x7e\x65\xc5\x6a\xd5\xee\x9b\x61\xd9\x57\xc3\x50\x37\x6b\xc6\xf5\xb1\x24\xe5\xe7\x9a\x94\xb9\xbc\x90\x76\xdb\xee\xc3\x6c\x52\xfa\x9f\xe9\x67\x7e\x26\x3f\x25\xcf\x15\x42\x66\x28\xc9\x23\xe9\x97\x57\x55\x55\xca\x58\xfa\xfc\x39\x7d\x67\xbb\xfd\x66\x43\x58\xfb\xcb\xbe\xea\x07\x2e\x74\x46\xbf\x69\xfc\xf2\x3b\xab\xfb\x9e\x3e\x28\xf9\x15\x3e\x32\x9a\xba\x66\x85\xc1\x3c\xc5\x47\x96\xfd\xd6\x57\x45\xb7\xba\x7e\x97\xc9\x5f\xf4\x95\x3f\x98\xf4\x0e\x4d\x2a\xd3\x91\xd2\x90\xb4\x60\x0d\x64\xab\xb6\xe4\x1f\x4f\xe9\x0f\x55\x5d\x37\xfd\x50\x6c\x36\xef\x32\xfd\x60\x30\xf9\x92\x09\x18\xea\x01\x58\xd0\xc4\xfc\x7c\xa8\x76\x3d\xcf\x60\xfe\xbc\xee\xfa\xe1\xf1\x50\x13\xad\xbe\xdd\x37\x59\xd9\xae\xde\xd3\x2a\xe0\x15\x8d\x96\x5f\x5d\xe5\x84\xac\x47\xb4\x0e\xba\x7d\xd3\x10\x7a\xf2\x17\x2d\xa1\x8c\x9a\xa9\xa9\xfd\x67\x80\x3e\xca\x77\x9b\xaa\xe8\x09\xa4\x2a\xca\xfc\x87\x22\x1f\x8a\x6e\x5d\x0d\x4f\x1e\x2c\x2f\x69\xf5\xbd\x7f\x90\x5f\x77\xd5\xd5\x93\x07\x0f\xfb\x07\x3f\xbe\xd8\x53\xb1\x4d\xdd\x54\xfd\x0f\x5f\x17\x3f\xe6\xab\x82\x72\x08\x8d\xb7\xf9\x65\x75\xc5\x8b\x8d\xda\xca\x89\xca\x9b\x35\x2f\xb4\xdb\xe1\x9a\x1b\x24\x4a\xa0\x8f\x3e\xe7\x95\xfe\x45\xc6\x13\x40\x9c\x60\x59\x5e\x1a\x57\x43\x87\x90\xdc\xd1\x04\x9c\xdc\x9e\xff\xfb\xeb\xa3\xfc\x8c\x58\xdb\xba\xab\xf0\x4d\xff\x51\x89\xef\x72\x1a\xed\x45\xfd\xec\xe7\x45\x46\x65\x0d\x21\xcf\x8a\xa1\xb8\xe4\xbe\x87\xd9\xe7\x4c\x59\x84\x21\x0f\x4b\x91\x99\x25\x18\x63\x3f\x24\xd3\x32\xb7\x90\xa9\x0e\x5d\xfd\xa1\x8e\x37\xcc\x02\x28\x3d\x60\xf6\x4c\x70\x46\x55\xe5\xaf\xde\xbc\x39\x7d\xf6\x73\x5e\x35\x6b\xc2\x4c\x7e\x53\x0f\xd7\xf9\x7e\xb8\xfa\xef\xcb\x75\xd5\x54\x5d\xb1\x59\xae\x6a\x46\x4a\x47\x04\x9b\x13\x96\x64\x88\x8b\xac\xef\x37\xc4\xa1\x40\x05\xe7\xe7\xaf\xf3\x13\xa6\x84\x5d\x31\x5c\xa3\x23\xc3\x75\xd6\xff\x65\xc3\x88\x0a\x0d\x5e\x5c\x57\x39\x16\x03\x80\xda\xab\x31\x5e\xf2\x52\xfb\xba\xc8\xaa\xae\x5b\x12\x03\x1d\x6e\x19\xcd\x5a\xe7\x21\x68\xa9\x8e\xa8\xbd\x69\x07\x9a\xc6\x1c\xe5\xa4\x8a\xba\xf9\x50\x6c\xea\x92\x90\x1d\x11\x92\x96\x45\x62\xd9\xd2\xbc\x71\x69\xa2\xcc\xf6\x06\x43\x2d\x56\xc4\xff\xfb\xfc\xc1\xe2\x01\x18\xee\x83\xc7\x0f\x16\x59\xd3\x2e\x85\x4b\x30\x6b\x2e\xeb\xbe\xb8\x24\x36\x2d\xdb\x46\x67\x5c\xef\xcf\x4c\x3f\xd2\x15\x85\xc8\x13\x08\xc6\x2d\x6f\x45\xd8\x01\x98\xb8\x0a\xe2\xd7\x60\x36\xca\x66\xfc\xd8\x8d\x27\x85\xf9\x15\xb6\x14\x12\x26\x63\xce\x6c\xc2\x8c\xba\x8e\x77\xbb\x4d\xbd\x92\xa6\x5f\x48\x5e\x24\x34\xde\x98\x15\x29\x1e\x0e\x84\x62\x79\x8e\x5c\xa8\xd7\xcc\xb6\xf2\x84\xcf\xa3\xfc\x75\x45\x2b\xe7\x7a\xbf\x96\xcd\x69\xd3\xee\xcb\x2f\xc0\x50\x6c\xe6\x22\x3f\xc9\xdf\xb6\xd4\x61\x50\x47\x00\x88\x4d\x1c\x13\x63\x60\x59\xa0\xab\xb6\xed\xc0\x88\xd3\x62\x35\x4d\xcf\x4d\x4d\x99\x34\xd2\xbe\xf8\x40\x6c\x71\x68\x65\x49\x96\xb4\xe4\x56\x5c\x31\x71\xb0\x3d\x6d\xe8\xb2\x2c\x88\x8f\xc8\xd2\xb0\xb4\x94\x06\x01\xb5\xdd\xd3\x6a\xba\xa6\xca\x18\xf1\x2c\x90\x50\x95\x73\xfd\xc4\x90\xa8\x1e\xac\x72\x5a\xb9\x2d\x6d\x9e\x3c\xd1\xcf\xf0\xa1\xbf\x7d\xfd\xd4\xab\xe2\xea\x8a\x7a\xd5\xd3\xaa\x78\x99\xaf\x36\x2d\x2d\xa9\x5f\xdf\xbe\xee\x79\xc1\x5c\x2f\x77\x6d\x07\x41\x84\xb2\xce\xe8\x33\xa4\x39\x44\x33\x44\xb3\xdf\x5e\xd2\xaf\x9b\xeb\x9a\x18\x35\xd0\xce\x25\x58\x48\xa2\x54\x6a\x62\xdf\xdLine truncated
|
||||||
|
|
||||||
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
@@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 46411, mode: os.FileMode(420), modTime: time.Unix(1449100425, 0)}
|
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 46933, mode: os.FileMode(420), modTime: time.Unix(1449277581, 0)}
|
||||||
a := &asset{bytes: bytes, info: info}
|
a := &asset{bytes: bytes, info: info}
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ func SendIssueNotifyMail(u, owner *models.User, repo *models.Repository, issue *
|
|||||||
|
|
||||||
subject := fmt.Sprintf("[%s] %s (#%d)", repo.Name, issue.Name, issue.Index)
|
subject := fmt.Sprintf("[%s] %s (#%d)", repo.Name, issue.Name, issue.Index)
|
||||||
content := fmt.Sprintf("%s<br>-<br> <a href=\"%s%s/%s/issues/%d\">View it on Gogs</a>.",
|
content := fmt.Sprintf("%s<br>-<br> <a href=\"%s%s/%s/issues/%d\">View it on Gogs</a>.",
|
||||||
base.RenderSpecialLink([]byte(issue.Content), owner.Name+"/"+repo.Name),
|
base.RenderSpecialLink([]byte(issue.Content), owner.Name+"/"+repo.Name, repo.ComposeMetas()),
|
||||||
setting.AppUrl, owner.Name, repo.Name, issue.Index)
|
setting.AppUrl, owner.Name, repo.Name, issue.Index)
|
||||||
msg := NewMessage(tos, subject, content)
|
msg := NewMessage(tos, subject, content)
|
||||||
msg.Info = fmt.Sprintf("Subject: %s, issue notify", subject)
|
msg.Info = fmt.Sprintf("Subject: %s, issue notify", subject)
|
||||||
@@ -148,7 +148,7 @@ func SendIssueMentionMail(r macaron.Render, u, owner *models.User,
|
|||||||
data["IssueLink"] = fmt.Sprintf("%s/%s/issues/%d", owner.Name, repo.Name, issue.Index)
|
data["IssueLink"] = fmt.Sprintf("%s/%s/issues/%d", owner.Name, repo.Name, issue.Index)
|
||||||
data["Subject"] = subject
|
data["Subject"] = subject
|
||||||
data["ActUserName"] = u.DisplayName()
|
data["ActUserName"] = u.DisplayName()
|
||||||
data["Content"] = string(base.RenderSpecialLink([]byte(issue.Content), owner.Name+"/"+repo.Name))
|
data["Content"] = string(base.RenderSpecialLink([]byte(issue.Content), owner.Name+"/"+repo.Name, repo.ComposeMetas()))
|
||||||
|
|
||||||
body, err := r.HTMLString(string(NOTIFY_MENTION), data)
|
body, err := r.HTMLString(string(NOTIFY_MENTION), data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ func RepoAssignment(args ...bool) macaron.Handler {
|
|||||||
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner()
|
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner()
|
||||||
ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin()
|
ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin()
|
||||||
ctx.Data["IsRepositoryPusher"] = ctx.Repo.IsPusher()
|
ctx.Data["IsRepositoryPusher"] = ctx.Repo.IsPusher()
|
||||||
|
ctx.Data["CanPullRequest"] = ctx.Repo.IsAdmin() && repo.BaseRepo != nil && repo.BaseRepo.EnablePulls
|
||||||
|
|
||||||
ctx.Data["DisableSSH"] = setting.DisableSSH
|
ctx.Data["DisableSSH"] = setting.DisableSSH
|
||||||
ctx.Data["CloneLink"] = repo.CloneLink()
|
ctx.Data["CloneLink"] = repo.CloneLink()
|
||||||
|
|||||||
@@ -183,9 +183,9 @@ func ReplaceLeft(s, old, new string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RenderCommitMessage renders commit message with XSS-safe and special links.
|
// RenderCommitMessage renders commit message with XSS-safe and special links.
|
||||||
func RenderCommitMessage(msg, urlPrefix string) template.HTML {
|
func RenderCommitMessage(msg, urlPrefix string, metas map[string]string) template.HTML {
|
||||||
cleanMsg := template.HTMLEscapeString(msg)
|
cleanMsg := template.HTMLEscapeString(msg)
|
||||||
fullMessage := string(base.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix))
|
fullMessage := string(base.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix, metas))
|
||||||
msgLines := strings.Split(strings.TrimSpace(fullMessage), "\n")
|
msgLines := strings.Split(strings.TrimSpace(fullMessage), "\n")
|
||||||
for i := range msgLines {
|
for i := range msgLines {
|
||||||
msgLines[i] = ReplaceLeft(msgLines[i], " ", " ")
|
msgLines[i] = ReplaceLeft(msgLines[i], " ", " ")
|
||||||
|
|||||||
@@ -911,6 +911,9 @@ pre.raw {
|
|||||||
.ui .form .fake {
|
.ui .form .fake {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
.ui .form .sub.field {
|
||||||
|
margin-left: 25px;
|
||||||
|
}
|
||||||
.ui .sha.label {
|
.ui .sha.label {
|
||||||
font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
|
font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
@@ -217,6 +217,10 @@ pre {
|
|||||||
.fake {
|
.fake {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sub.field {
|
||||||
|
margin-left: 25px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sha.label {
|
.sha.label {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ func Markdown(ctx *middleware.Context, form api.MarkdownOption) {
|
|||||||
|
|
||||||
switch form.Mode {
|
switch form.Mode {
|
||||||
case "gfm":
|
case "gfm":
|
||||||
ctx.Write(base.RenderMarkdown([]byte(form.Text), form.Context))
|
ctx.Write(base.RenderMarkdown([]byte(form.Text), form.Context, nil))
|
||||||
default:
|
default:
|
||||||
ctx.Write(base.RenderRawMarkdown([]byte(form.Text), ""))
|
ctx.Write(base.RenderRawMarkdown([]byte(form.Text), ""))
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-5
@@ -41,6 +41,18 @@ var (
|
|||||||
ErrTooManyFiles = errors.New("Maximum number of files to upload exceeded")
|
ErrTooManyFiles = errors.New("Maximum number of files to upload exceeded")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func MustEnableIssues(ctx *middleware.Context) {
|
||||||
|
if !ctx.Repo.Repository.EnableIssues {
|
||||||
|
ctx.Handle(404, "MustEnableIssues", nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func MustEnablePulls(ctx *middleware.Context) {
|
||||||
|
if !ctx.Repo.Repository.EnablePulls {
|
||||||
|
ctx.Handle(404, "MustEnablePulls", nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func RetrieveLabels(ctx *middleware.Context) {
|
func RetrieveLabels(ctx *middleware.Context) {
|
||||||
labels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID)
|
labels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -60,7 +72,12 @@ func Issues(ctx *middleware.Context) {
|
|||||||
ctx.Data["Title"] = ctx.Tr("repo.pulls")
|
ctx.Data["Title"] = ctx.Tr("repo.pulls")
|
||||||
ctx.Data["PageIsPullList"] = true
|
ctx.Data["PageIsPullList"] = true
|
||||||
ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)
|
ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
MustEnableIssues(ctx)
|
||||||
|
if ctx.Written() {
|
||||||
|
return
|
||||||
|
}
|
||||||
ctx.Data["Title"] = ctx.Tr("repo.issues")
|
ctx.Data["Title"] = ctx.Tr("repo.issues")
|
||||||
ctx.Data["PageIsIssueList"] = true
|
ctx.Data["PageIsIssueList"] = true
|
||||||
}
|
}
|
||||||
@@ -496,6 +513,10 @@ func ViewIssue(ctx *middleware.Context) {
|
|||||||
ctx.Data["PageIsPullConversation"] = true
|
ctx.Data["PageIsPullConversation"] = true
|
||||||
ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)
|
ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)
|
||||||
} else {
|
} else {
|
||||||
|
MustEnableIssues(ctx)
|
||||||
|
if ctx.Written() {
|
||||||
|
return
|
||||||
|
}
|
||||||
ctx.Data["PageIsIssueList"] = true
|
ctx.Data["PageIsIssueList"] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -503,7 +524,8 @@ func ViewIssue(ctx *middleware.Context) {
|
|||||||
ctx.Handle(500, "GetPoster", err)
|
ctx.Handle(500, "GetPoster", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
issue.RenderedContent = string(base.RenderMarkdown([]byte(issue.Content), ctx.Repo.RepoLink))
|
issue.RenderedContent = string(base.RenderMarkdown([]byte(issue.Content), ctx.Repo.RepoLink,
|
||||||
|
ctx.Repo.Repository.ComposeMetas()))
|
||||||
|
|
||||||
repo := ctx.Repo.Repository
|
repo := ctx.Repo.Repository
|
||||||
|
|
||||||
@@ -570,7 +592,8 @@ func ViewIssue(ctx *middleware.Context) {
|
|||||||
// Render comments.
|
// Render comments.
|
||||||
for _, comment = range issue.Comments {
|
for _, comment = range issue.Comments {
|
||||||
if comment.Type == models.COMMENT_TYPE_COMMENT {
|
if comment.Type == models.COMMENT_TYPE_COMMENT {
|
||||||
comment.RenderedContent = string(base.RenderMarkdown([]byte(comment.Content), ctx.Repo.RepoLink))
|
comment.RenderedContent = string(base.RenderMarkdown([]byte(comment.Content), ctx.Repo.RepoLink,
|
||||||
|
ctx.Repo.Repository.ComposeMetas()))
|
||||||
|
|
||||||
// Check tag.
|
// Check tag.
|
||||||
tag, ok = marked[comment.PosterID]
|
tag, ok = marked[comment.PosterID]
|
||||||
@@ -656,7 +679,7 @@ func UpdateIssueContent(ctx *middleware.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.JSON(200, map[string]interface{}{
|
ctx.JSON(200, map[string]interface{}{
|
||||||
"content": string(base.RenderMarkdown([]byte(issue.Content), ctx.Query("context"))),
|
"content": string(base.RenderMarkdown([]byte(issue.Content), ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -893,7 +916,7 @@ func UpdateCommentContent(ctx *middleware.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.JSON(200, map[string]interface{}{
|
ctx.JSON(200, map[string]interface{}{
|
||||||
"content": string(base.RenderMarkdown([]byte(comment.Content), ctx.Query("context"))),
|
"content": string(base.RenderMarkdown([]byte(comment.Content), ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -991,7 +1014,7 @@ func Milestones(ctx *middleware.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, m := range miles {
|
for _, m := range miles {
|
||||||
m.RenderedContent = string(base.RenderMarkdown([]byte(m.Content), ctx.Repo.RepoLink))
|
m.RenderedContent = string(base.RenderMarkdown([]byte(m.Content), ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas()))
|
||||||
m.CalOpenIssues()
|
m.CalOpenIssues()
|
||||||
}
|
}
|
||||||
ctx.Data["Milestones"] = miles
|
ctx.Data["Milestones"] = miles
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ func Releases(ctx *middleware.Context) {
|
|||||||
rel.NumCommitsBehind = ctx.Repo.CommitsCount - rel.NumCommits
|
rel.NumCommitsBehind = ctx.Repo.CommitsCount - rel.NumCommits
|
||||||
}
|
}
|
||||||
|
|
||||||
rel.Note = base.RenderMarkdownString(rel.Note, ctx.Repo.RepoLink)
|
rel.Note = base.RenderMarkdownString(rel.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
|
||||||
tags[i] = rel
|
tags[i] = rel
|
||||||
rels[j] = nil // Mark as used.
|
rels[j] = nil // Mark as used.
|
||||||
break
|
break
|
||||||
@@ -129,7 +129,7 @@ func Releases(ctx *middleware.Context) {
|
|||||||
rel.NumCommitsBehind = ctx.Repo.CommitsCount - rel.NumCommits
|
rel.NumCommitsBehind = ctx.Repo.CommitsCount - rel.NumCommits
|
||||||
}
|
}
|
||||||
|
|
||||||
rel.Note = base.RenderMarkdownString(rel.Note, ctx.Repo.RepoLink)
|
rel.Note = base.RenderMarkdownString(rel.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
|
||||||
tags = append(tags, rel)
|
tags = append(tags, rel)
|
||||||
}
|
}
|
||||||
models.SortReleases(tags)
|
models.SortReleases(tags)
|
||||||
|
|||||||
+19
-2
@@ -104,7 +104,7 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
|
|||||||
ctx.Handle(500, "UpdateRepository", err)
|
ctx.Handle(500, "UpdateRepository", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Trace("Repository updated: %s/%s", ctx.Repo.Owner.Name, repo.Name)
|
log.Trace("Repository basic settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name)
|
||||||
|
|
||||||
if isNameChanged {
|
if isNameChanged {
|
||||||
if err := models.RenameRepoAction(ctx.User, oldRepoName, repo); err != nil {
|
if err := models.RenameRepoAction(ctx.User, oldRepoName, repo); err != nil {
|
||||||
@@ -123,7 +123,24 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
|
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
|
||||||
ctx.Redirect(fmt.Sprintf("%s/%s/%s/settings", setting.AppSubUrl, ctx.Repo.Owner.Name, repo.Name))
|
ctx.Redirect(ctx.Repo.RepoLink + "/settings")
|
||||||
|
|
||||||
|
case "advanced":
|
||||||
|
repo.EnableWiki = form.EnableWiki
|
||||||
|
repo.EnableIssues = form.EnableIssues
|
||||||
|
repo.EnableExternalTracker = form.EnableExternalTracker
|
||||||
|
repo.ExternalTrackerFormat = form.TrackerURLFormat
|
||||||
|
repo.EnablePulls = form.EnablePulls
|
||||||
|
|
||||||
|
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.Redirect(ctx.Repo.RepoLink + "/settings")
|
||||||
|
|
||||||
case "transfer":
|
case "transfer":
|
||||||
if repo.Name != form.RepoName {
|
if repo.Name != form.RepoName {
|
||||||
ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), SETTINGS_OPTIONS, nil)
|
ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), SETTINGS_OPTIONS, nil)
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ func Home(ctx *middleware.Context) {
|
|||||||
readmeExist := base.IsMarkdownFile(blob.Name()) || base.IsReadmeFile(blob.Name())
|
readmeExist := base.IsMarkdownFile(blob.Name()) || base.IsReadmeFile(blob.Name())
|
||||||
ctx.Data["ReadmeExist"] = readmeExist
|
ctx.Data["ReadmeExist"] = readmeExist
|
||||||
if readmeExist {
|
if readmeExist {
|
||||||
ctx.Data["FileContent"] = string(base.RenderMarkdown(buf, path.Dir(treeLink)))
|
ctx.Data["FileContent"] = string(base.RenderMarkdown(buf, path.Dir(treeLink), ctx.Repo.Repository.ComposeMetas()))
|
||||||
} else {
|
} else {
|
||||||
if err, content := template.ToUtf8WithErr(buf); err != nil {
|
if err, content := template.ToUtf8WithErr(buf); err != nil {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -201,7 +201,7 @@ func Home(ctx *middleware.Context) {
|
|||||||
buf = append(buf, d...)
|
buf = append(buf, d...)
|
||||||
switch {
|
switch {
|
||||||
case base.IsMarkdownFile(readmeFile.Name()):
|
case base.IsMarkdownFile(readmeFile.Name()):
|
||||||
buf = base.RenderMarkdown(buf, treeLink)
|
buf = base.RenderMarkdown(buf, treeLink, ctx.Repo.Repository.ComposeMetas())
|
||||||
default:
|
default:
|
||||||
buf = bytes.Replace(buf, []byte("\n"), []byte(`<br>`), -1)
|
buf = bytes.Replace(buf, []byte("\n"), []byte(`<br>`), -1)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ const (
|
|||||||
WIKI_PAGES base.TplName = "repo/wiki/pages"
|
WIKI_PAGES base.TplName = "repo/wiki/pages"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func MustEnableWiki(ctx *middleware.Context) {
|
||||||
|
if !ctx.Repo.Repository.EnableWiki {
|
||||||
|
ctx.Handle(404, "MustEnableWiki", nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type PageMeta struct {
|
type PageMeta struct {
|
||||||
Name string
|
Name string
|
||||||
URL string
|
URL string
|
||||||
@@ -94,7 +100,7 @@ func renderWikiPage(ctx *middleware.Context, isViewPage bool) (*git.Repository,
|
|||||||
return nil, ""
|
return nil, ""
|
||||||
}
|
}
|
||||||
if isViewPage {
|
if isViewPage {
|
||||||
ctx.Data["content"] = string(base.RenderMarkdown(data, ctx.Repo.RepoLink))
|
ctx.Data["content"] = string(base.RenderMarkdown(data, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas()))
|
||||||
} else {
|
} else {
|
||||||
ctx.Data["content"] = string(data)
|
ctx.Data["content"] = string(data)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
0.7.29.1204 Beta
|
0.7.30.1204 Beta
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="message collapsing">
|
<td class="message collapsing">
|
||||||
<a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
|
<a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
|
||||||
{{RenderCommitMessage .Summary $.RepoLink}}
|
{{RenderCommitMessage .Summary $.RepoLink $.Repository.ComposeMetas}}
|
||||||
</td>
|
</td>
|
||||||
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
|
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -51,21 +51,27 @@
|
|||||||
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
||||||
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
||||||
</a>
|
</a>
|
||||||
|
{{if .Repository.EnableIssues}}
|
||||||
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
||||||
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
|
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{if .Repository.EnablePulls}}
|
||||||
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
||||||
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
|
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
|
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
|
||||||
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
|
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
||||||
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span>
|
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span>
|
||||||
</a>
|
</a>
|
||||||
|
{{if .Repository.EnableWiki}}
|
||||||
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
|
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
|
||||||
<i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
|
<i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
{{if .IsRepositoryAdmin}}
|
{{if .IsRepositoryAdmin}}
|
||||||
<div class="right menu">
|
<div class="right menu">
|
||||||
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="ui secondary menu">
|
<div class="ui secondary menu">
|
||||||
{{if and .IsRepositoryAdmin .Repository.BaseRepo}}
|
{{if .CanPullRequest}}
|
||||||
<div class="fitted item">
|
<div class="fitted item">
|
||||||
{{ $baseRepo := .Repository.BaseRepo}}
|
{{ $baseRepo := .Repository.BaseRepo}}
|
||||||
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
|
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
<input id="website" name="website" type="url" value="{{.Repository.Website}}">
|
<input id="website" name="website" type="url" value="{{.Repository.Website}}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
{{if not .Repository.IsBare}}
|
{{if not .Repository.IsBare}}
|
||||||
<div class="required inline field">
|
<div class="required inline field">
|
||||||
<label>{{.i18n.Tr "repo.default_branch"}}</label>
|
<label>{{.i18n.Tr "repo.default_branch"}}</label>
|
||||||
@@ -57,13 +56,68 @@
|
|||||||
<input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
|
<input id="interval" name="interval" type="number" value="{{.MirrorInterval}}">
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h4 class="ui top attached header">
|
||||||
|
{{.i18n.Tr "repo.settings.advanced_settings"}}
|
||||||
|
</h4>
|
||||||
|
<div class="ui attached segment">
|
||||||
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
|
{{.CsrfTokenHtml}}
|
||||||
|
<input type="hidden" name="action" value="advanced">
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.wiki"}}</label>
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input name="enable_wiki" type="checkbox" {{if .Repository.EnableWiki}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.wiki_desc"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.issues"}}</label>
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input name="enable_issues" type="checkbox" {{if .Repository.EnableIssues}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.issues_desc"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input name="enable_external_tracker" type="checkbox" {{if .Repository.EnableExternalTracker}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.use_external_issue_tracker"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
|
||||||
|
<input id="tracker_url_format" name="tracker_url_format" value="{{.Repository.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
|
||||||
|
<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<label>{{.i18n.Tr "repo.pulls"}}</label>
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input name="enable_pulls" type="checkbox" {{if .Repository.EnablePulls}}checked{{end}}>
|
||||||
|
<label>{{.i18n.Tr "repo.settings.pulls_desc"}}</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
<div class="field">
|
||||||
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4 class="ui top attached warning header">
|
<h4 class="ui top attached warning header">
|
||||||
{{.i18n.Tr "repo.settings.danger_zone"}}
|
{{.i18n.Tr "repo.settings.danger_zone"}}
|
||||||
</h4>
|
</h4>
|
||||||
|
|||||||
Reference in new issue
Block a user