mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-14 00:01:44 -04:00
Compare commits
No commits in common. "eb5e1bcd2175c05c724e19c1a261c3f3d063abe6" and "b0f18726a34edeb47b6442ce06ebee102b9c8a83" have entirely different histories.
eb5e1bcd21
...
b0f18726a3
@ -101,15 +101,6 @@ func (te *TreeEntry) FollowLinks() (*TreeEntry, error) {
|
|||||||
return entry, nil
|
return entry, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns the subtree, or nil if this is not a tree
|
|
||||||
func (te *TreeEntry) Tree() *Tree {
|
|
||||||
t, err := te.ptree.repo.getTree(te.ID)
|
|
||||||
if err != nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return t
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetSubJumpablePathName return the full path of subdirectory jumpable ( contains only one directory )
|
// GetSubJumpablePathName return the full path of subdirectory jumpable ( contains only one directory )
|
||||||
func (te *TreeEntry) GetSubJumpablePathName() string {
|
func (te *TreeEntry) GetSubJumpablePathName() string {
|
||||||
if te.IsSubModule() || !te.IsDir() {
|
if te.IsSubModule() || !te.IsDir() {
|
||||||
|
@ -27,7 +27,6 @@ import (
|
|||||||
"github.com/blevesearch/bleve/v2"
|
"github.com/blevesearch/bleve/v2"
|
||||||
analyzer_custom "github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
|
analyzer_custom "github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
|
||||||
analyzer_keyword "github.com/blevesearch/bleve/v2/analysis/analyzer/keyword"
|
analyzer_keyword "github.com/blevesearch/bleve/v2/analysis/analyzer/keyword"
|
||||||
"github.com/blevesearch/bleve/v2/analysis/token/camelcase"
|
|
||||||
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
|
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
|
||||||
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
|
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
|
||||||
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
|
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
|
||||||
@ -108,7 +107,7 @@ func (d *RepoIndexerData) Type() string {
|
|||||||
const (
|
const (
|
||||||
repoIndexerAnalyzer = "repoIndexerAnalyzer"
|
repoIndexerAnalyzer = "repoIndexerAnalyzer"
|
||||||
repoIndexerDocType = "repoIndexerDocType"
|
repoIndexerDocType = "repoIndexerDocType"
|
||||||
repoIndexerLatestVersion = 6
|
repoIndexerLatestVersion = 5
|
||||||
)
|
)
|
||||||
|
|
||||||
// createBleveIndexer create a bleve repo indexer if one does not already exist
|
// createBleveIndexer create a bleve repo indexer if one does not already exist
|
||||||
@ -139,7 +138,7 @@ func createBleveIndexer(path string, latestVersion int) (bleve.Index, error) {
|
|||||||
"type": analyzer_custom.Name,
|
"type": analyzer_custom.Name,
|
||||||
"char_filters": []string{},
|
"char_filters": []string{},
|
||||||
"tokenizer": unicode.Name,
|
"tokenizer": unicode.Name,
|
||||||
"token_filters": []string{unicodeNormalizeName, camelcase.Name, lowercase.Name},
|
"token_filters": []string{unicodeNormalizeName, lowercase.Name},
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ import (
|
|||||||
|
|
||||||
"github.com/blevesearch/bleve/v2"
|
"github.com/blevesearch/bleve/v2"
|
||||||
"github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
|
"github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
|
||||||
"github.com/blevesearch/bleve/v2/analysis/token/camelcase"
|
|
||||||
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
|
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
|
||||||
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
|
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
|
||||||
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
|
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
|
||||||
@ -28,7 +27,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
issueIndexerAnalyzer = "issueIndexer"
|
issueIndexerAnalyzer = "issueIndexer"
|
||||||
issueIndexerDocType = "issueIndexerDocType"
|
issueIndexerDocType = "issueIndexerDocType"
|
||||||
issueIndexerLatestVersion = 2
|
issueIndexerLatestVersion = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
// indexerID a bleve-compatible unique identifier for an integer id
|
// indexerID a bleve-compatible unique identifier for an integer id
|
||||||
@ -135,7 +134,7 @@ func createIssueIndexer(path string, latestVersion int) (bleve.Index, error) {
|
|||||||
"type": custom.Name,
|
"type": custom.Name,
|
||||||
"char_filters": []string{},
|
"char_filters": []string{},
|
||||||
"tokenizer": unicode.Name,
|
"tokenizer": unicode.Name,
|
||||||
"token_filters": []string{unicodeNormalizeName, camelcase.Name, lowercase.Name},
|
"token_filters": []string{unicodeNormalizeName, lowercase.Name},
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -56,15 +56,18 @@ type namedBlob struct {
|
|||||||
blob *git.Blob
|
blob *git.Blob
|
||||||
}
|
}
|
||||||
|
|
||||||
// locate a README for a tree in one of the supported paths.
|
|
||||||
//
|
|
||||||
// entries is passed to reduce calls to ListEntries(), so
|
|
||||||
// this has precondition:
|
|
||||||
//
|
|
||||||
// entries == ctx.Repo.Commit.SubTree(ctx.Repo.TreePath).ListEntries()
|
|
||||||
//
|
|
||||||
// FIXME: There has to be a more efficient way of doing this
|
// FIXME: There has to be a more efficient way of doing this
|
||||||
func findReadmeFileInEntries(ctx *context.Context, entries []*git.TreeEntry) (*namedBlob, error) {
|
func getReadmeFileFromPath(ctx *context.Context, commit *git.Commit, treePath string) (*namedBlob, error) {
|
||||||
|
tree, err := commit.SubTree(treePath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
entries, err := tree.ListEntries()
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
// Create a list of extensions in priority order
|
// Create a list of extensions in priority order
|
||||||
// 1. Markdown files - with and without localisation - e.g. README.en-us.md or README.md
|
// 1. Markdown files - with and without localisation - e.g. README.en-us.md or README.md
|
||||||
// 2. Txt files - e.g. README.txt
|
// 2. Txt files - e.g. README.txt
|
||||||
@ -72,38 +75,16 @@ func findReadmeFileInEntries(ctx *context.Context, entries []*git.TreeEntry) (*n
|
|||||||
exts := append(localizedExtensions(".md", ctx.Language()), ".txt", "") // sorted by priority
|
exts := append(localizedExtensions(".md", ctx.Language()), ".txt", "") // sorted by priority
|
||||||
extCount := len(exts)
|
extCount := len(exts)
|
||||||
readmeFiles := make([]*namedBlob, extCount+1)
|
readmeFiles := make([]*namedBlob, extCount+1)
|
||||||
|
|
||||||
docsEntries := make([]*git.TreeEntry, 3) // (one of docs/, .gitea/ or .github/)
|
|
||||||
for _, entry := range entries {
|
for _, entry := range entries {
|
||||||
if entry.IsDir() {
|
if entry.IsDir() {
|
||||||
// as a special case for the top-level repo introduction README,
|
|
||||||
// fall back to subfolders, looking for e.g. docs/README.md, .gitea/README.zh-CN.txt, .github/README.txt, ...
|
|
||||||
// (note that docsEntries is ignored unless we are at the root)
|
|
||||||
lowerName := strings.ToLower(entry.Name())
|
|
||||||
switch lowerName {
|
|
||||||
case "docs":
|
|
||||||
if entry.Name() == "docs" || docsEntries[0] == nil {
|
|
||||||
docsEntries[0] = entry
|
|
||||||
}
|
|
||||||
case ".gitea":
|
|
||||||
if entry.Name() == ".gitea" || docsEntries[1] == nil {
|
|
||||||
docsEntries[1] = entry
|
|
||||||
}
|
|
||||||
case ".github":
|
|
||||||
if entry.Name() == ".github" || docsEntries[2] == nil {
|
|
||||||
docsEntries[2] = entry
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if i, ok := markup.IsReadmeFileExtension(entry.Name(), exts...); ok {
|
if i, ok := markup.IsReadmeFileExtension(entry.Name(), exts...); ok {
|
||||||
log.Debug("Potential readme file: %s", entry.Name())
|
|
||||||
if readmeFiles[i] == nil || base.NaturalSortLess(readmeFiles[i].name, entry.Blob().Name()) {
|
if readmeFiles[i] == nil || base.NaturalSortLess(readmeFiles[i].name, entry.Blob().Name()) {
|
||||||
name := entry.Name()
|
name := entry.Name()
|
||||||
isSymlink := entry.IsLink()
|
isSymlink := entry.IsLink()
|
||||||
target := entry
|
target := entry
|
||||||
if isSymlink {
|
if isSymlink {
|
||||||
var err error
|
|
||||||
target, err = entry.FollowLinks()
|
target, err = entry.FollowLinks()
|
||||||
if err != nil && !git.IsErrBadLink(err) {
|
if err != nil && !git.IsErrBadLink(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -126,33 +107,6 @@ func findReadmeFileInEntries(ctx *context.Context, entries []*git.TreeEntry) (*n
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Repo.TreePath == "" && readmeFile == nil {
|
|
||||||
for _, subTreeEntry := range docsEntries {
|
|
||||||
if subTreeEntry == nil {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
subTree := subTreeEntry.Tree()
|
|
||||||
if subTree == nil {
|
|
||||||
// this should be impossible; if subTreeEntry exists so should this.
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
var err error
|
|
||||||
childEntries, err := subTree.ListEntries()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
readmeFile, err = findReadmeFileInEntries(ctx, childEntries)
|
|
||||||
if err != nil && !git.IsErrNotExist(err) {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if readmeFile != nil {
|
|
||||||
readmeFile.name = subTreeEntry.Name() + "/" + readmeFile.name
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return readmeFile, nil
|
return readmeFile, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,20 +127,12 @@ func renderDirectory(ctx *context.Context, treeLink string) {
|
|||||||
ctx.Data["CanUploadFile"] = setting.Repository.Upload.Enabled && !ctx.Repo.Repository.IsArchived
|
ctx.Data["CanUploadFile"] = setting.Repository.Upload.Enabled && !ctx.Repo.Repository.IsArchived
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.Written() {
|
readmeFile, readmeTreelink := findReadmeFile(ctx, entries, treeLink)
|
||||||
|
if ctx.Written() || readmeFile == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
readmeFile, err := findReadmeFileInEntries(ctx, entries)
|
renderReadmeFile(ctx, readmeFile, readmeTreelink)
|
||||||
if err != nil {
|
|
||||||
ctx.ServerError("findReadmeFileInEntries", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if readmeFile == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
renderReadmeFile(ctx, readmeFile, treeLink)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// localizedExtensions prepends the provided language code with and without a
|
// localizedExtensions prepends the provided language code with and without a
|
||||||
@ -211,6 +157,89 @@ func localizedExtensions(ext, languageCode string) (localizedExts []string) {
|
|||||||
return []string{lowerLangCode + ext, ext}
|
return []string{lowerLangCode + ext, ext}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func findReadmeFile(ctx *context.Context, entries git.Entries, treeLink string) (*namedBlob, string) {
|
||||||
|
// Create a list of extensions in priority order
|
||||||
|
// 1. Markdown files - with and without localisation - e.g. README.en-us.md or README.md
|
||||||
|
// 2. Txt files - e.g. README.txt
|
||||||
|
// 3. No extension - e.g. README
|
||||||
|
exts := append(localizedExtensions(".md", ctx.Language()), ".txt", "") // sorted by priority
|
||||||
|
extCount := len(exts)
|
||||||
|
readmeFiles := make([]*namedBlob, extCount+1)
|
||||||
|
|
||||||
|
docsEntries := make([]*git.TreeEntry, 3) // (one of docs/, .gitea/ or .github/)
|
||||||
|
for _, entry := range entries {
|
||||||
|
if entry.IsDir() {
|
||||||
|
lowerName := strings.ToLower(entry.Name())
|
||||||
|
switch lowerName {
|
||||||
|
case "docs":
|
||||||
|
if entry.Name() == "docs" || docsEntries[0] == nil {
|
||||||
|
docsEntries[0] = entry
|
||||||
|
}
|
||||||
|
case ".gitea":
|
||||||
|
if entry.Name() == ".gitea" || docsEntries[1] == nil {
|
||||||
|
docsEntries[1] = entry
|
||||||
|
}
|
||||||
|
case ".github":
|
||||||
|
if entry.Name() == ".github" || docsEntries[2] == nil {
|
||||||
|
docsEntries[2] = entry
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if i, ok := markup.IsReadmeFileExtension(entry.Name(), exts...); ok {
|
||||||
|
log.Debug("Potential readme file: %s", entry.Name())
|
||||||
|
name := entry.Name()
|
||||||
|
isSymlink := entry.IsLink()
|
||||||
|
target := entry
|
||||||
|
if isSymlink {
|
||||||
|
var err error
|
||||||
|
target, err = entry.FollowLinks()
|
||||||
|
if err != nil && !git.IsErrBadLink(err) {
|
||||||
|
ctx.ServerError("FollowLinks", err)
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if target != nil && (target.IsExecutable() || target.IsRegular()) {
|
||||||
|
readmeFiles[i] = &namedBlob{
|
||||||
|
name,
|
||||||
|
isSymlink,
|
||||||
|
target.Blob(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var readmeFile *namedBlob
|
||||||
|
readmeTreelink := treeLink
|
||||||
|
for _, f := range readmeFiles {
|
||||||
|
if f != nil {
|
||||||
|
readmeFile = f
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ctx.Repo.TreePath == "" && readmeFile == nil {
|
||||||
|
for _, entry := range docsEntries {
|
||||||
|
if entry == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
var err error
|
||||||
|
readmeFile, err = getReadmeFileFromPath(ctx, ctx.Repo.Commit, entry.GetSubJumpablePathName())
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("getReadmeFileFromPath", err)
|
||||||
|
return nil, ""
|
||||||
|
}
|
||||||
|
if readmeFile != nil {
|
||||||
|
readmeFile.name = entry.Name() + "/" + readmeFile.name
|
||||||
|
readmeTreelink = treeLink + "/" + util.PathEscapeSegments(entry.GetSubJumpablePathName())
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return readmeFile, readmeTreelink
|
||||||
|
}
|
||||||
|
|
||||||
type fileInfo struct {
|
type fileInfo struct {
|
||||||
isTextFile bool
|
isTextFile bool
|
||||||
isLFSFile bool
|
isLFSFile bool
|
||||||
@ -313,7 +342,7 @@ func renderReadmeFile(ctx *context.Context, readmeFile *namedBlob, readmeTreelin
|
|||||||
ctx.Data["EscapeStatus"], ctx.Data["FileContent"], err = markupRender(ctx, &markup.RenderContext{
|
ctx.Data["EscapeStatus"], ctx.Data["FileContent"], err = markupRender(ctx, &markup.RenderContext{
|
||||||
Ctx: ctx,
|
Ctx: ctx,
|
||||||
RelativePath: path.Join(ctx.Repo.TreePath, readmeFile.name), // ctx.Repo.TreePath is the directory not the Readme so we must append the Readme filename (and path).
|
RelativePath: path.Join(ctx.Repo.TreePath, readmeFile.name), // ctx.Repo.TreePath is the directory not the Readme so we must append the Readme filename (and path).
|
||||||
URLPrefix: path.Dir(readmeTreelink),
|
URLPrefix: readmeTreelink,
|
||||||
Metas: ctx.Repo.Repository.ComposeDocumentMetas(),
|
Metas: ctx.Repo.Repository.ComposeDocumentMetas(),
|
||||||
GitRepo: ctx.Repo.GitRepo,
|
GitRepo: ctx.Repo.GitRepo,
|
||||||
}, rd)
|
}, rd)
|
||||||
|
@ -19,15 +19,15 @@
|
|||||||
<span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span>
|
<span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span>
|
||||||
<div class="inline-grouped-list">
|
<div class="inline-grouped-list">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
|
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
|
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
|
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
<label>{{.locale.Tr "org.settings.permission"}}</label>
|
<label>{{.locale.Tr "org.settings.permission"}}</label>
|
||||||
<div class="inline-grouped-list">
|
<div class="inline-grouped-list">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input type="checkbox" name="repo_admin_change_team_access" checked/>
|
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" checked/>
|
||||||
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
|
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,19 +41,19 @@
|
|||||||
<label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label>
|
<label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
|
<label>{{.locale.Tr "org.settings.visibility.public"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
|
<label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input class="enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
|
<label>{{.locale.Tr "org.settings.visibility.private"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<label>{{.locale.Tr "org.settings.permission"}}</label>
|
<label>{{.locale.Tr "org.settings.permission"}}</label>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}/>
|
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
|
<label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,17 +99,17 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="center aligned">
|
<td class="center aligned">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{$.locale.Tr "org.teams.none_access"}}">
|
<input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{$.locale.Tr "org.teams.none_access"}}">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="center aligned">
|
<td class="center aligned">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.read_access"}}">
|
<input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.read_access"}}">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="center aligned">
|
<td class="center aligned">
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
<input type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.write_access"}}">
|
<input type="radio" class="hidden" name="unit_{{$unit.Type.Value}}" value="2"{{if (eq ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.write_access"}}">
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -121,7 +121,7 @@
|
|||||||
{{if lt $unit.MaxPerm 2}}
|
{{if lt $unit.MaxPerm 2}}
|
||||||
<div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
|
<div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input type="checkbox" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
|
<input type="checkbox" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
|
||||||
<label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label>
|
<label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label>
|
||||||
<span class="help">{{$.locale.Tr $unit.DescKey}}</span>
|
<span class="help">{{$.locale.Tr $unit.DescKey}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -77,33 +77,33 @@
|
|||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{.locale.Tr "repo.template.items"}}</label>
|
<label>{{.locale.Tr "repo.template.items"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="git_content" type="checkbox" tabindex="0" {{if .git_content}}checked{{end}}>
|
<input class="hidden" name="git_content" type="checkbox" tabindex="0" {{if .git_content}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.template.git_content"}}</label>
|
<label>{{.locale.Tr "repo.template.git_content"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui checkbox{{if not .SignedUser.CanEditGitHook}} tooltip{{end}}"{{if not .SignedUser.CanEditGitHook}} data-content="{{.locale.Tr "repo.template.git_hooks_tooltip"}}"{{end}}>
|
<div class="ui checkbox{{if not .SignedUser.CanEditGitHook}} tooltip{{end}}"{{if not .SignedUser.CanEditGitHook}} data-content="{{.locale.Tr "repo.template.git_hooks_tooltip"}}"{{end}}>
|
||||||
<input name="git_hooks" type="checkbox" tabindex="0" {{if .git_hooks}}checked{{end}}>
|
<input class="hidden" name="git_hooks" type="checkbox" tabindex="0" {{if .git_hooks}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.template.git_hooks"}}</label>
|
<label>{{.locale.Tr "repo.template.git_hooks"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label></label>
|
<label></label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="webhooks" type="checkbox" tabindex="0" {{if .webhooks}}checked{{end}}>
|
<input class="hidden" name="webhooks" type="checkbox" tabindex="0" {{if .webhooks}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.template.webhooks"}}</label>
|
<label>{{.locale.Tr "repo.template.webhooks"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="topics" type="checkbox" tabindex="0" {{if .topics}}checked{{end}}>
|
<input class="hidden" name="topics" type="checkbox" tabindex="0" {{if .topics}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.template.topics"}}</label>
|
<label>{{.locale.Tr "repo.template.topics"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label></label>
|
<label></label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="avatar" type="checkbox" tabindex="0" {{if .avatar}}checked{{end}}>
|
<input class="hidden" name="avatar" type="checkbox" tabindex="0" {{if .avatar}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.template.avatar"}}</label>
|
<label>{{.locale.Tr "repo.template.avatar"}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="labels" type="checkbox" tabindex="0" {{if .labels}}checked{{end}}>
|
<input class="hidden" name="labels" type="checkbox" tabindex="0" {{if .labels}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.template.issue_labels"}}</label>
|
<label>{{.locale.Tr "repo.template.issue_labels"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -169,7 +169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui checkbox" id="auto-init">
|
<div class="ui checkbox" id="auto-init">
|
||||||
<input name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
|
<input class="hidden" name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.auto_init"}}</label>
|
<label>{{.locale.Tr "repo.auto_init"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -204,7 +204,7 @@
|
|||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{.locale.Tr "repo.template"}}</label>
|
<label>{{.locale.Tr "repo.template"}}</label>
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="template" type="checkbox" tabindex="0">
|
<input class="hidden" name="template" type="checkbox" tabindex="0">
|
||||||
<label>{{.locale.Tr "repo.template_helper"}}</label>
|
<label>{{.locale.Tr "repo.template_helper"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="signoff" type="checkbox" tabindex="0">
|
<input name="signoff" type="checkbox" tabindex="0" class="hidden">
|
||||||
<label>{{.locale.Tr "repo.editor.signoff_desc"}}</label>
|
<label>{{.locale.Tr "repo.editor.signoff_desc"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="repo-header">
|
<div class="repo-header">
|
||||||
<div class="repo-title-wrap df fc">
|
<div class="repo-title-wrap df fc">
|
||||||
<div class="repo-title" role="heading" aria-level="1">
|
<div class="repo-title">
|
||||||
{{$avatar := (repoAvatar . 32 "mr-3")}}
|
{{$avatar := (repoAvatar . 32 "mr-3")}}
|
||||||
{{if $avatar}}
|
{{if $avatar}}
|
||||||
{{$avatar}}
|
{{$avatar}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<h2 class="ui compact small menu header">
|
<div class="ui compact left small menu">
|
||||||
<a class="{{if .PageIsLabels}}active {{end}}item" href="{{.RepoLink}}/labels">{{.locale.Tr "repo.labels"}}</a>
|
<a class="{{if .PageIsLabels}}active {{end}}item" href="{{.RepoLink}}/labels">{{.locale.Tr "repo.labels"}}</a>
|
||||||
<a class="{{if .PageIsMilestones}}active {{end}}item" href="{{.RepoLink}}/milestones">{{.locale.Tr "repo.milestones"}}</a>
|
<a class="{{if .PageIsMilestones}}active {{end}}item" href="{{.RepoLink}}/milestones">{{.locale.Tr "repo.milestones"}}</a>
|
||||||
</h2>
|
</div>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox {{if .Err_IsWritable}}error{{end}}">
|
<div class="ui checkbox {{if .Err_IsWritable}}error{{end}}">
|
||||||
<input id="ssh-key-is-writable" name="is_writable" type="checkbox" value="1">
|
<input id="ssh-key-is-writable" name="is_writable" class="hidden" type="checkbox" value="1">
|
||||||
<label for="is_writable">
|
<label for="is_writable">
|
||||||
{{.locale.Tr "repo.settings.is_writable"}}
|
{{.locale.Tr "repo.settings.is_writable"}}
|
||||||
</label>
|
</label>
|
||||||
|
@ -281,7 +281,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
{{end}}
|
{{end}}
|
||||||
<input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="false" data-target="#external_wiki_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalWiki)}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label>
|
<label>{{.locale.Tr "repo.settings.use_internal_wiki"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -291,7 +291,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
{{end}}
|
{{end}}
|
||||||
<input class="enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_wiki" type="radio" value="true" data-target="#external_wiki_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalWiki}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label>
|
<label>{{.locale.Tr "repo.settings.use_external_wiki"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -323,7 +323,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
{{end}}
|
{{end}}
|
||||||
<input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="false" data-context="#internal_issue_box" data-target="#external_issue_box" {{if not (.Repository.UnitEnabled $.Context $.UnitTypeExternalTracker)}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label>
|
<label>{{.locale.Tr "repo.settings.use_internal_issue_tracker"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -359,7 +359,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<div class="ui radio checkbox">
|
<div class="ui radio checkbox">
|
||||||
{{end}}
|
{{end}}
|
||||||
<input class="enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}/>
|
<input class="hidden enable-system-radio" tabindex="0" name="enable_external_tracker" type="radio" value="true" data-context="#internal_issue_box" data-target="#external_issue_box" {{if .Repository.UnitEnabled $.Context $.UnitTypeExternalTracker}}checked{{end}}/>
|
||||||
<label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label>
|
<label>{{.locale.Tr "repo.settings.use_external_issue_tracker"}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,19 +4,19 @@
|
|||||||
<div class="grouped event type fields">
|
<div class="grouped event type fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui radio non-events checkbox">
|
<div class="ui radio non-events checkbox">
|
||||||
<input name="events" type="radio" value="push_only" {{if or $isNew .Webhook.PushOnly}}checked{{end}}>
|
<input class="hidden" name="events" type="radio" value="push_only" {{if or $isNew .Webhook.PushOnly}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_push_only" | Str2html}}</label>
|
<label>{{.locale.Tr "repo.settings.event_push_only" | Str2html}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui radio non-events checkbox">
|
<div class="ui radio non-events checkbox">
|
||||||
<input name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
|
<input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_send_everything" | Str2html}}</label>
|
<label>{{.locale.Tr "repo.settings.event_send_everything" | Str2html}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui radio events checkbox">
|
<div class="ui radio events checkbox">
|
||||||
<input name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
|
<input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_choose" | Str2html}}</label>
|
<label>{{.locale.Tr "repo.settings.event_choose" | Str2html}}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
|
<input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_create"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_create"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_create_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_create_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="delete" type="checkbox" tabindex="0" {{if .Webhook.Delete}}checked{{end}}>
|
<input class="hidden" name="delete" type="checkbox" tabindex="0" {{if .Webhook.Delete}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_delete"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_delete"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_delete_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_delete_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="fork" type="checkbox" tabindex="0" {{if .Webhook.Fork}}checked{{end}}>
|
<input class="hidden" name="fork" type="checkbox" tabindex="0" {{if .Webhook.Fork}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_fork"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_fork"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_fork_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_fork_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
|
<input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_push"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_push"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_push_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_push_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="repository" type="checkbox" tabindex="0" {{if .Webhook.Repository}}checked{{end}}>
|
<input class="hidden" name="repository" type="checkbox" tabindex="0" {{if .Webhook.Repository}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_repository"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_repository"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_repository_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_repository_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="release" type="checkbox" tabindex="0" {{if .Webhook.Release}}checked{{end}}>
|
<input class="hidden" name="release" type="checkbox" tabindex="0" {{if .Webhook.Release}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_release"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_release"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_release_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_release_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="package" type="checkbox" tabindex="0" {{if .Webhook.Package}}checked{{end}}>
|
<input class="hidden" name="package" type="checkbox" tabindex="0" {{if .Webhook.Package}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_package"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_package"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_package_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_package_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -102,7 +102,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="wiki" type="checkbox" tabindex="0" {{if .Webhook.Wiki}}checked{{end}}>
|
<input class="hidden" name="wiki" type="checkbox" tabindex="0" {{if .Webhook.Wiki}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_wiki"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_wiki"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_wiki_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_wiki_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -117,7 +117,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="issues" type="checkbox" tabindex="0" {{if .Webhook.Issues}}checked{{end}}>
|
<input class="hidden" name="issues" type="checkbox" tabindex="0" {{if .Webhook.Issues}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_issues"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_issues"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_issues_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_issues_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="issue_assign" type="checkbox" tabindex="0" {{if .Webhook.IssueAssign}}checked{{end}}>
|
<input class="hidden" name="issue_assign" type="checkbox" tabindex="0" {{if .Webhook.IssueAssign}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_issue_assign"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_issue_assign"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_issue_assign_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_assign_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -137,7 +137,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="issue_label" type="checkbox" tabindex="0" {{if .Webhook.IssueLabel}}checked{{end}}>
|
<input class="hidden" name="issue_label" type="checkbox" tabindex="0" {{if .Webhook.IssueLabel}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_issue_label"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_issue_label"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_issue_label_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_label_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -147,7 +147,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="issue_milestone" type="checkbox" tabindex="0" {{if .Webhook.IssueMilestone}}checked{{end}}>
|
<input class="hidden" name="issue_milestone" type="checkbox" tabindex="0" {{if .Webhook.IssueMilestone}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_issue_milestone"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_issue_milestone"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_issue_milestone_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_milestone_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="issue_comment" type="checkbox" tabindex="0" {{if .Webhook.IssueComment}}checked{{end}}>
|
<input class="hidden" name="issue_comment" type="checkbox" tabindex="0" {{if .Webhook.IssueComment}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_issue_comment"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_issue_comment"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_issue_comment_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_issue_comment_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -172,7 +172,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="pull_request" type="checkbox" tabindex="0" {{if .Webhook.PullRequest}}checked{{end}}>
|
<input class="hidden" name="pull_request" type="checkbox" tabindex="0" {{if .Webhook.PullRequest}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_pull_request"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_pull_request"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -182,7 +182,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="pull_request_assign" type="checkbox" tabindex="0" {{if .Webhook.PullRequestAssign}}checked{{end}}>
|
<input class="hidden" name="pull_request_assign" type="checkbox" tabindex="0" {{if .Webhook.PullRequestAssign}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_pull_request_assign"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_pull_request_assign"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_assign_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_assign_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -192,7 +192,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="pull_request_label" type="checkbox" tabindex="0" {{if .Webhook.PullRequestLabel}}checked{{end}}>
|
<input class="hidden" name="pull_request_label" type="checkbox" tabindex="0" {{if .Webhook.PullRequestLabel}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_pull_request_label"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_pull_request_label"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_label_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_label_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -202,7 +202,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="pull_request_milestone" type="checkbox" tabindex="0" {{if .Webhook.PullRequestMilestone}}checked{{end}}>
|
<input class="hidden" name="pull_request_milestone" type="checkbox" tabindex="0" {{if .Webhook.PullRequestMilestone}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_pull_request_milestone"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_pull_request_milestone"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_milestone_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_milestone_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -212,7 +212,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="pull_request_comment" type="checkbox" tabindex="0" {{if .Webhook.PullRequestComment}}checked{{end}}>
|
<input class="hidden" name="pull_request_comment" type="checkbox" tabindex="0" {{if .Webhook.PullRequestComment}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_pull_request_comment"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_pull_request_comment"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_comment_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_comment_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -222,7 +222,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="pull_request_review" type="checkbox" tabindex="0" {{if .Webhook.PullRequestReview}}checked{{end}}>
|
<input class="hidden" name="pull_request_review" type="checkbox" tabindex="0" {{if .Webhook.PullRequestReview}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_pull_request_review"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_pull_request_review"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_review_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_review_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -232,7 +232,7 @@
|
|||||||
<div class="seven wide column">
|
<div class="seven wide column">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="pull_request_sync" type="checkbox" tabindex="0" {{if .Webhook.PullRequestSync}}checked{{end}}>
|
<input class="hidden" name="pull_request_sync" type="checkbox" tabindex="0" {{if .Webhook.PullRequestSync}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.event_pull_request_sync"}}</label>
|
<label>{{.locale.Tr "repo.settings.event_pull_request_sync"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_sync_desc"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.event_pull_request_sync_desc"}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -261,7 +261,7 @@
|
|||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input name="active" type="checkbox" tabindex="0" {{if or $isNew .Webhook.IsActive}}checked{{end}}>
|
<input class="hidden" name="active" type="checkbox" tabindex="0" {{if or $isNew .Webhook.IsActive}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.settings.active"}}</label>
|
<label>{{.locale.Tr "repo.settings.active"}}</label>
|
||||||
<span class="help">{{.locale.Tr "repo.settings.active_helper"}}</span>
|
<span class="help">{{.locale.Tr "repo.settings.active_helper"}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,20 +12,19 @@
|
|||||||
<div class="action-view-left">
|
<div class="action-view-left">
|
||||||
<div class="job-group-section">
|
<div class="job-group-section">
|
||||||
<div class="job-brief-list">
|
<div class="job-brief-list">
|
||||||
<div class="job-brief-item" v-for="(job, index) in run.jobs" :key="job.id">
|
<a class="job-brief-item" v-for="(job, index) in run.jobs" :key="job.id" :href="run.link+'/jobs/'+index">
|
||||||
<a class="job-brief-link" :href="run.link+'/jobs/'+index">
|
<SvgIcon name="octicon-check-circle-fill" class="green" v-if="job.status === 'success'"/>
|
||||||
<SvgIcon name="octicon-check-circle-fill" class="green" v-if="job.status === 'success'"/>
|
<SvgIcon name="octicon-skip" class="ui text grey" v-else-if="job.status === 'skipped'"/>
|
||||||
<SvgIcon name="octicon-skip" class="ui text grey" v-else-if="job.status === 'skipped'"/>
|
<SvgIcon name="octicon-clock" class="ui text yellow" v-else-if="job.status === 'waiting'"/>
|
||||||
<SvgIcon name="octicon-clock" class="ui text yellow" v-else-if="job.status === 'waiting'"/>
|
<SvgIcon name="octicon-blocked" class="ui text yellow" v-else-if="job.status === 'blocked'"/>
|
||||||
<SvgIcon name="octicon-blocked" class="ui text yellow" v-else-if="job.status === 'blocked'"/>
|
<SvgIcon name="octicon-meter" class="ui text yellow" class-name="job-status-rotate" v-else-if="job.status === 'running'"/>
|
||||||
<SvgIcon name="octicon-meter" class="ui text yellow" class-name="job-status-rotate" v-else-if="job.status === 'running'"/>
|
<SvgIcon name="octicon-x-circle-fill" class="red" v-else/>
|
||||||
<SvgIcon name="octicon-x-circle-fill" class="red" v-else/>
|
{{ job.name }}
|
||||||
<span class="ui text">{{ job.name }}</span>
|
<!-- TODO: it will be a better idea to move "button" out from "a", and the ".prevent" will not be needed. But it needs some work with CSS -->
|
||||||
</a>
|
<button class="job-brief-rerun" @click.prevent="rerunJob(index)" v-if="job.canRerun">
|
||||||
<button class="job-brief-rerun" @click="rerunJob(index)" v-if="job.canRerun">
|
|
||||||
<SvgIcon name="octicon-sync" class="ui text black"/>
|
<SvgIcon name="octicon-sync" class="ui text black"/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -292,7 +291,7 @@ export function initRepositoryActionView() {
|
|||||||
|
|
||||||
.action-view-header {
|
.action-view-header {
|
||||||
margin: 0 20px 20px 20px;
|
margin: 0 20px 20px 20px;
|
||||||
.run_cancel {
|
button.run_cancel {
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--color-red);
|
color: var(--color-red);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@ -300,7 +299,7 @@ export function initRepositoryActionView() {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition:transform 0.2s;
|
transition:transform 0.2s;
|
||||||
};
|
};
|
||||||
.run_cancel:hover{
|
button.run_cancel:hover{
|
||||||
transform:scale(130%);
|
transform:scale(130%);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -328,16 +327,14 @@ export function initRepositoryActionView() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.job-brief-list {
|
.job-brief-list {
|
||||||
.job-brief-item {
|
a.job-brief-item {
|
||||||
|
display: block;
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background: var(--color-info-bg);
|
background: var(--color-info-bg);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: flex;
|
button.job-brief-rerun {
|
||||||
justify-items: center;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
.job-brief-rerun {
|
|
||||||
float: right;
|
float: right;
|
||||||
border: none;
|
border: none;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@ -345,20 +342,11 @@ export function initRepositoryActionView() {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition:transform 0.2s;
|
transition:transform 0.2s;
|
||||||
};
|
};
|
||||||
.job-brief-rerun:hover{
|
button.job-brief-rerun:hover{
|
||||||
transform:scale(130%);
|
transform:scale(130%);
|
||||||
};
|
};
|
||||||
.job-brief-link {
|
|
||||||
flex-grow: 1;
|
|
||||||
display: flex;
|
|
||||||
span {
|
|
||||||
margin-right: 8px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.job-brief-item:hover {
|
a.job-brief-item:hover {
|
||||||
background-color: var(--color-secondary);
|
background-color: var(--color-secondary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1803,6 +1803,7 @@ footer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: remove in favor of .hidden helper */
|
||||||
.hide {
|
.hide {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
/* below class names match Tailwind CSS */
|
/* below class names match Tailwind CSS */
|
||||||
.pointer-events-none { pointer-events: none !important; }
|
.pointer-events-none { pointer-events: none !important; }
|
||||||
.relative { position: relative !important; }
|
.relative { position: relative !important; }
|
||||||
|
.hidden { display: none !important; }
|
||||||
|
|
||||||
.mono {
|
.mono {
|
||||||
font-family: var(--fonts-monospace) !important;
|
font-family: var(--fonts-monospace) !important;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user