Compare commits

..

No commits in common. "8df1b4bd699897264c60da7ce982b09cee57f345" and "b46c46f3a3a0c09ade5a57e1693e2e6a5d07c120" have entirely different histories.

68 changed files with 238 additions and 378 deletions

View File

@ -18,7 +18,7 @@ params:
description: Git with a cup of tea description: Git with a cup of tea
author: The Gitea Authors author: The Gitea Authors
website: https://docs.gitea.io website: https://docs.gitea.io
version: 1.19.0 version: 1.18.5
minGoVersion: 1.19 minGoVersion: 1.19
goVersion: 1.20 goVersion: 1.20
minNodeVersion: 16 minNodeVersion: 16

View File

@ -16,7 +16,6 @@ import (
"github.com/gobwas/glob" "github.com/gobwas/glob"
"github.com/nektos/act/pkg/jobparser" "github.com/nektos/act/pkg/jobparser"
"github.com/nektos/act/pkg/model" "github.com/nektos/act/pkg/model"
"github.com/nektos/act/pkg/workflowpattern"
) )
func ListWorkflows(commit *git.Commit) (git.Entries, error) { func ListWorkflows(commit *git.Commit) (git.Entries, error) {
@ -153,94 +152,40 @@ func matchPushEvent(commit *git.Commit, pushPayload *api.PushPayload, evt *jobpa
} }
matchTimes := 0 matchTimes := 0
hasBranchFilter := false
hasTagFilter := false
refName := git.RefName(pushPayload.Ref)
// all acts conditions should be satisfied // all acts conditions should be satisfied
for cond, vals := range evt.Acts { for cond, vals := range evt.Acts {
switch cond { switch cond {
case "branches": case "branches", "tags":
hasBranchFilter = true refShortName := git.RefName(pushPayload.Ref).ShortName()
if !refName.IsBranch() { for _, val := range vals {
break if glob.MustCompile(val, '/').Match(refShortName) {
} matchTimes++
patterns, err := workflowpattern.CompilePatterns(vals...) break
if err != nil { }
break
}
if !workflowpattern.Skip(patterns, []string{refName.ShortName()}, &workflowpattern.EmptyTraceWriter{}) {
matchTimes++
}
case "branches-ignore":
hasBranchFilter = true
if !refName.IsBranch() {
break
}
patterns, err := workflowpattern.CompilePatterns(vals...)
if err != nil {
break
}
if !workflowpattern.Filter(patterns, []string{refName.ShortName()}, &workflowpattern.EmptyTraceWriter{}) {
matchTimes++
}
case "tags":
hasTagFilter = true
if !refName.IsTag() {
break
}
patterns, err := workflowpattern.CompilePatterns(vals...)
if err != nil {
break
}
if !workflowpattern.Skip(patterns, []string{refName.ShortName()}, &workflowpattern.EmptyTraceWriter{}) {
matchTimes++
}
case "tags-ignore":
hasTagFilter = true
if !refName.IsTag() {
break
}
patterns, err := workflowpattern.CompilePatterns(vals...)
if err != nil {
break
}
if !workflowpattern.Filter(patterns, []string{refName.ShortName()}, &workflowpattern.EmptyTraceWriter{}) {
matchTimes++
} }
case "paths": case "paths":
filesChanged, err := commit.GetFilesChangedSinceCommit(pushPayload.Before) filesChanged, err := commit.GetFilesChangedSinceCommit(pushPayload.Before)
if err != nil { if err != nil {
log.Error("GetFilesChangedSinceCommit [commit_sha1: %s]: %v", commit.ID.String(), err) log.Error("GetFilesChangedSinceCommit [commit_sha1: %s]: %v", commit.ID.String(), err)
} else { } else {
patterns, err := workflowpattern.CompilePatterns(vals...) for _, val := range vals {
if err != nil { matched := false
break for _, file := range filesChanged {
} if glob.MustCompile(val, '/').Match(file) {
if !workflowpattern.Skip(patterns, filesChanged, &workflowpattern.EmptyTraceWriter{}) { matched = true
matchTimes++ break
} }
} }
case "paths-ignore": if matched {
filesChanged, err := commit.GetFilesChangedSinceCommit(pushPayload.Before) matchTimes++
if err != nil { break
log.Error("GetFilesChangedSinceCommit [commit_sha1: %s]: %v", commit.ID.String(), err) }
} else {
patterns, err := workflowpattern.CompilePatterns(vals...)
if err != nil {
break
}
if !workflowpattern.Filter(patterns, filesChanged, &workflowpattern.EmptyTraceWriter{}) {
matchTimes++
} }
} }
default: default:
log.Warn("push event unsupported condition %q", cond) log.Warn("push event unsupported condition %q", cond)
} }
} }
// if both branch and tag filter are defined in the workflow only one needs to match
if hasBranchFilter && hasTagFilter {
matchTimes++
}
return matchTimes == len(evt.Acts) return matchTimes == len(evt.Acts)
} }
@ -292,47 +237,30 @@ func matchPullRequestEvent(commit *git.Commit, prPayload *api.PullRequestPayload
} }
} }
case "branches": case "branches":
refName := git.RefName(prPayload.PullRequest.Base.Ref) refShortName := git.RefName(prPayload.PullRequest.Base.Ref).ShortName()
patterns, err := workflowpattern.CompilePatterns(vals...) for _, val := range vals {
if err != nil { if glob.MustCompile(val, '/').Match(refShortName) {
break matchTimes++
} break
if !workflowpattern.Skip(patterns, []string{refName.ShortName()}, &workflowpattern.EmptyTraceWriter{}) { }
matchTimes++
}
case "branches-ignore":
refName := git.RefName(prPayload.PullRequest.Base.Ref)
patterns, err := workflowpattern.CompilePatterns(vals...)
if err != nil {
break
}
if !workflowpattern.Filter(patterns, []string{refName.ShortName()}, &workflowpattern.EmptyTraceWriter{}) {
matchTimes++
} }
case "paths": case "paths":
filesChanged, err := commit.GetFilesChangedSinceCommit(prPayload.PullRequest.Base.Ref) filesChanged, err := commit.GetFilesChangedSinceCommit(prPayload.PullRequest.Base.Ref)
if err != nil { if err != nil {
log.Error("GetFilesChangedSinceCommit [commit_sha1: %s]: %v", commit.ID.String(), err) log.Error("GetFilesChangedSinceCommit [commit_sha1: %s]: %v", commit.ID.String(), err)
} else { } else {
patterns, err := workflowpattern.CompilePatterns(vals...) for _, val := range vals {
if err != nil { matched := false
break for _, file := range filesChanged {
} if glob.MustCompile(val, '/').Match(file) {
if !workflowpattern.Skip(patterns, filesChanged, &workflowpattern.EmptyTraceWriter{}) { matched = true
matchTimes++ break
} }
} }
case "paths-ignore": if matched {
filesChanged, err := commit.GetFilesChangedSinceCommit(prPayload.PullRequest.Base.Ref) matchTimes++
if err != nil { break
log.Error("GetFilesChangedSinceCommit [commit_sha1: %s]: %v", commit.ID.String(), err) }
} else {
patterns, err := workflowpattern.CompilePatterns(vals...)
if err != nil {
break
}
if !workflowpattern.Filter(patterns, filesChanged, &workflowpattern.EmptyTraceWriter{}) {
matchTimes++
} }
} }
default: default:

View File

@ -1068,7 +1068,6 @@ release = Release
releases = Releases releases = Releases
tag = Tag tag = Tag
released_this = released this released_this = released this
tagged_this = tagged this
file.title = %s at %s file.title = %s at %s
file_raw = Raw file_raw = Raw
file_history = History file_history = History
@ -2288,7 +2287,6 @@ release.compare = Compare
release.edit = edit release.edit = edit
release.ahead.commits = <strong>%d</strong> commits release.ahead.commits = <strong>%d</strong> commits
release.ahead.target = to %s since this release release.ahead.target = to %s since this release
tag.ahead.target = to %s since this tag
release.source_code = Source Code release.source_code = Source Code
release.new_subheader = Releases organize project versions. release.new_subheader = Releases organize project versions.
release.edit_subheader = Releases organize project versions. release.edit_subheader = Releases organize project versions.

View File

@ -14,7 +14,6 @@ import (
"code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/actions" "code.gitea.io/gitea/modules/actions"
"code.gitea.io/gitea/modules/base"
context_module "code.gitea.io/gitea/modules/context" context_module "code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/timeutil"
@ -58,7 +57,6 @@ type ViewResponse struct {
CanApprove bool `json:"canApprove"` // the run needs an approval and the doer has permission to approve CanApprove bool `json:"canApprove"` // the run needs an approval and the doer has permission to approve
Done bool `json:"done"` Done bool `json:"done"`
Jobs []*ViewJob `json:"jobs"` Jobs []*ViewJob `json:"jobs"`
Commit ViewCommit `json:"commit"`
} `json:"run"` } `json:"run"`
CurrentJob struct { CurrentJob struct {
Title string `json:"title"` Title string `json:"title"`
@ -78,25 +76,6 @@ type ViewJob struct {
CanRerun bool `json:"canRerun"` CanRerun bool `json:"canRerun"`
} }
type ViewCommit struct {
LocaleCommit string `json:"localeCommit"`
LocalePushedBy string `json:"localePushedBy"`
ShortSha string `json:"shortSHA"`
Link string `json:"link"`
Pusher ViewUser `json:"pusher"`
Branch ViewBranch `json:"branch"`
}
type ViewUser struct {
DisplayName string `json:"displayName"`
Link string `json:"link"`
}
type ViewBranch struct {
Name string `json:"name"`
Link string `json:"link"`
}
type ViewJobStep struct { type ViewJobStep struct {
Summary string `json:"summary"` Summary string `json:"summary"`
Duration string `json:"duration"` Duration string `json:"duration"`
@ -125,10 +104,6 @@ func ViewPost(ctx *context_module.Context) {
return return
} }
run := current.Run run := current.Run
if err := run.LoadAttributes(ctx); err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())
return
}
resp := &ViewResponse{} resp := &ViewResponse{}
@ -148,23 +123,6 @@ func ViewPost(ctx *context_module.Context) {
}) })
} }
pusher := ViewUser{
DisplayName: run.TriggerUser.GetDisplayName(),
Link: run.TriggerUser.HomeLink(),
}
branch := ViewBranch{
Name: run.PrettyRef(),
Link: run.RefLink(),
}
resp.State.Run.Commit = ViewCommit{
LocaleCommit: ctx.Tr("actions.runs.commit"),
LocalePushedBy: ctx.Tr("actions.runs.pushed_by"),
ShortSha: base.ShortSha(run.CommitSHA),
Link: fmt.Sprintf("%s/commit/%s", run.Repo.Link(), run.CommitSHA),
Pusher: pusher,
Branch: branch,
}
var task *actions_model.ActionTask var task *actions_model.ActionTask
if current.TaskID > 0 { if current.TaskID > 0 {
var err error var err error

View File

@ -226,8 +226,8 @@ func releasesOrTagsFeed(ctx *context.Context, isReleasesOnly bool, formatType st
// SingleRelease renders a single release's page // SingleRelease renders a single release's page
func SingleRelease(ctx *context.Context) { func SingleRelease(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.release.releases")
ctx.Data["PageIsReleaseList"] = true ctx.Data["PageIsReleaseList"] = true
ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch
writeAccess := ctx.Repo.CanWrite(unit.TypeReleases) writeAccess := ctx.Repo.CanWrite(unit.TypeReleases)
ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived
@ -241,12 +241,6 @@ func SingleRelease(ctx *context.Context) {
ctx.ServerError("GetReleasesByRepoID", err) ctx.ServerError("GetReleasesByRepoID", err)
return return
} }
ctx.Data["PageIsSingleTag"] = release.IsTag
if release.IsTag {
ctx.Data["Title"] = release.TagName
} else {
ctx.Data["Title"] = release.Title
}
err = repo_model.GetReleaseAttachments(ctx, release) err = repo_model.GetReleaseAttachments(ctx, release)
if err != nil { if err != nil {

View File

@ -308,7 +308,7 @@ func Profile(ctx *context.Context) {
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate ctx.Data["ShowUserEmail"] = len(ctx.ContextUser.Email) > 0 && ctx.IsSigned && (!ctx.ContextUser.KeepEmailPrivate || ctx.ContextUser.ID == ctx.Doer.ID)
ctx.HTML(http.StatusOK, tplProfile) ctx.HTML(http.StatusOK, tplProfile)
} }

View File

@ -374,20 +374,15 @@ func pushUpdateAddTags(ctx context.Context, repo *repo_model.Repository, gitRepo
rel, has := relMap[lowerTag] rel, has := relMap[lowerTag]
if !has { if !has {
parts := strings.SplitN(tag.Message, "\n", 2)
note := ""
if len(parts) > 1 {
note = parts[1]
}
rel = &repo_model.Release{ rel = &repo_model.Release{
RepoID: repo.ID, RepoID: repo.ID,
Title: parts[0], Title: "",
TagName: tags[i], TagName: tags[i],
LowerTagName: lowerTag, LowerTagName: lowerTag,
Target: "", Target: "",
Sha1: commit.ID.String(), Sha1: commit.ID.String(),
NumCommits: commitsCount, NumCommits: commitsCount,
Note: note, Note: "",
IsDraft: false, IsDraft: false,
IsPrerelease: false, IsPrerelease: false,
IsTag: true, IsTag: true,

View File

@ -328,11 +328,11 @@
{{range .OAuth2Providers}}{{if .CustomURLSettings}} {{range .OAuth2Providers}}{{if .CustomURLSettings}}
<input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true"> <input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true">
<input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden"> <input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden" />
<input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden"> <input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden" />
<input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden"> <input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden" />
<input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden"> <input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden" />
<input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden"> <input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden" />
{{end}}{{end}} {{end}}{{end}}
<div class="field"> <div class="field">

View File

@ -38,7 +38,7 @@
<!-- PAM --> <!-- PAM -->
<div class="pam required field {{if not (eq .type 4)}}gt-hidden{{end}}"> <div class="pam required field {{if not (eq .type 4)}}gt-hidden{{end}}">
<label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label> <label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label>
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}"> <input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
<label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label> <label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label>
<input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}"> <input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}">
</div> </div>

View File

@ -65,11 +65,11 @@
{{range .OAuth2Providers}}{{if .CustomURLSettings}} {{range .OAuth2Providers}}{{if .CustomURLSettings}}
<input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true"> <input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true">
<input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden"> <input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden" />
<input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden"> <input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden" />
<input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden"> <input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden" />
<input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden"> <input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden" />
<input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden"> <input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden" />
{{end}}{{end}} {{end}}{{end}}
<div class="field"> <div class="field">

View File

@ -29,7 +29,7 @@
{{end}} {{end}}
</tbody> </tbody>
</table> </table>
<input type="hidden" name="from" value="monitor"> <input type="hidden" name="from" value="monitor"/>
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
</form> </form>
</div> </div>

View File

@ -42,12 +42,12 @@
</tr> </tr>
{{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}} {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.resync_all_sshkeys"}}<br> <td>{{.locale.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
{{.locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td> {{.locale.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>
<tr> <tr>
<td>{{.locale.Tr "admin.dashboard.resync_all_sshprincipals"}}<br> <td>{{.locale.Tr "admin.dashboard.resync_all_sshprincipals"}}<br/>
{{.locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td> {{.locale.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td> <td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.locale.Tr "admin.dashboard.operation_run"}}</button></td>
</tr> </tr>

View File

@ -171,7 +171,7 @@
</div> </div>
<div class="field {{if .Err_Gravatar}}error{{end}}"> <div class="field {{if .Err_Gravatar}}error{{end}}">
<label for="gravatar">Avatar {{.locale.Tr "email"}}</label> <label for="gravatar">Avatar {{.locale.Tr "email"}}</label>
<input id="gravatar" name="gravatar" value="{{.User.AvatarEmail}}"> <input id="gravatar" name="gravatar" value="{{.User.AvatarEmail}}" />
</div> </div>
{{end}} {{end}}

View File

@ -8,7 +8,7 @@
{{range .PackageDescriptors}} {{range .PackageDescriptors}}
{{$p := .}} {{$p := .}}
{{range .Files}} {{range .Files}}
<a href="{{$.RegistryURL}}/files/{{$p.Package.LowerName}}/{{$p.Version.Version}}/{{.File.Name}}#sha256-{{.Blob.HashSHA256}}"{{if $p.Metadata.RequiresPython}} data-requires-python="{{$p.Metadata.RequiresPython}}"{{end}}>{{.File.Name}}</a><br> <a href="{{$.RegistryURL}}/files/{{$p.Package.LowerName}}/{{$p.Version.Version}}/{{.File.Name}}#sha256-{{.Blob.HashSHA256}}"{{if $p.Metadata.RequiresPython}} data-requires-python="{{$p.Metadata.RequiresPython}}"{{end}}>{{.File.Name}}</a><br/>
{{end}} {{end}}
{{end}} {{end}}
</body> </body>

View File

@ -3,7 +3,7 @@
<div class="ui stackable middle very relaxed page grid"> <div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column"> <div class="sixteen wide center aligned centered column">
<div> <div>
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}"> <img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}"/>
</div> </div>
<div class="hero"> <div class="hero">
<h1 class="ui icon header title"> <h1 class="ui icon header title">

View File

@ -346,5 +346,5 @@
</div> </div>
</div> </div>
</div> </div>
<img class="gt-hidden" src="{{AssetUrlPrefix}}/img/loading.png"> <img class="gt-hidden" src="{{AssetUrlPrefix}}/img/loading.png"/>
{{template "base/footer" .}} {{template "base/footer" .}}

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"> <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"/>
<title>{{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}}</title> <title>{{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}}</title>
</head> </head>

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta Name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"> <meta Name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"/>
<title>{{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}}</title> <title>{{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}}</title>
</head> </head>

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"> <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"/>
<title>{{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}}</title> <title>{{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}}</title>
</head> </head>

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"> <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"/>
<title>{{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}}</title> <title>{{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}}</title>
</head> </head>

View File

@ -4,7 +4,7 @@
<style> <style>
.footer { font-size:small; color:#666;} .footer { font-size:small; color:#666;}
</style> </style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title> <title>{{.Subject}}</title>
</head> </head>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title> <title>{{.Subject}}</title>
<style> <style>

View File

@ -4,7 +4,7 @@
<style> <style>
.footer { font-size:small; color:#666;} .footer { font-size:small; color:#666;}
</style> </style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title> <title>{{.Subject}}</title>
</head> </head>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title> <title>{{.Subject}}</title>
</head> </head>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title> <title>{{.Subject}}</title>
<style> <style>

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"> <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"/>
</head> </head>
{{$invite_url := printf "%sorg/invite/%s" AppUrl (QueryEscape .Invite.Token)}} {{$invite_url := printf "%sorg/invite/%s" AppUrl (QueryEscape .Invite.Token)}}
<body> <body>

View File

@ -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="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="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="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 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>

View File

@ -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="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="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="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 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>

View File

@ -52,7 +52,7 @@
<div class="item"> <div class="item">
<form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post"> <form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="iid" value="{{.ID}}"> <input type="hidden" name="iid" value="{{.ID}}" />
<button class="ui red button right">{{$.locale.Tr "org.members.remove"}}</button> <button class="ui red button right">{{$.locale.Tr "org.members.remove"}}</button>
</form> </form>
{{.Email}} {{.Email}}

View File

@ -11,7 +11,7 @@
{{else if .IsOrganizationOwner}} {{else if .IsOrganizationOwner}}
<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join"> <form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="page" value="team"> <input type="hidden" name="page" value="team"/>
<button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button> <button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button>
</form> </form>
{{end}} {{end}}

View File

@ -7,7 +7,7 @@
<div class="ui stackable middle very relaxed page grid"> <div class="ui stackable middle very relaxed page grid">
<div id="repo_migrating" class="sixteen wide center aligned centered column"> <div id="repo_migrating" class="sixteen wide center aligned centered column">
<div> <div>
<img src="{{AssetUrlPrefix}}/img/loading.png"> <img src="{{AssetUrlPrefix}}/img/loading.png"/>
</div> </div>
</div> </div>
</div> </div>

View File

@ -38,7 +38,7 @@
<input type="hidden" name="board_type" value="{{.type}}"> <input type="hidden" name="board_type" value="{{.type}}">
<div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div> <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div>
<div class="menu"> <div class="menu">
{{range $element := .BoardTypes}} {{range $element := .ProjectTypes}}
<div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div> <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div>
{{end}} {{end}}
</div> </div>

View File

@ -73,7 +73,7 @@
<form method="GET" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{if $.BranchName}}{{PathEscapeSegments $.BranchName}}{{else}}{{PathEscapeSegments $.Repository.DefaultBranch}}{{end}}" id="branch-dropdown-form"> <form method="GET" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{if $.BranchName}}{{PathEscapeSegments $.BranchName}}{{else}}{{PathEscapeSegments $.Repository.DefaultBranch}}{{end}}" id="branch-dropdown-form">
<input type="hidden" name="ref" value="{{if $.BranchName}}{{$.BranchName}}{{else}}{{$.Repository.DefaultBranch}}{{end}}"> <input type="hidden" name="ref" value="{{if $.BranchName}}{{$.BranchName}}{{else}}{{$.Repository.DefaultBranch}}{{end}}">
<input type="hidden" name="refType" value="branch"> <input type="hidden" name="refType" value="branch">
<input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br> <input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br/>
<button type="submit" id="cherry-pick-submit" class="ui green button"></button> <button type="submit" id="cherry-pick-submit" class="ui green button"></button>
</form> </form>
</div> </div>

View File

@ -13,8 +13,6 @@
{{avatarByEmail $.root.Context .Author.Email .Author.Name}} {{avatarByEmail $.root.Context .Author.Email .Author.Name}}
{{end}} {{end}}
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
<span class="ui float right shabox"> <span class="ui float right shabox">
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}} {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}}
{{$class := "ui sha label"}} {{$class := "ui sha label"}}
@ -32,14 +30,23 @@
{{$class = (printf "%s%s" $class " isWarning")}} {{$class = (printf "%s%s" $class " isWarning")}}
{{end}} {{end}}
{{end}} {{end}}
<a href="{{$commitLink}}" rel="nofollow" class="{{$class}}"> {{if $.comment.Issue.PullRequest.BaseRepo.Name}}
<span class="shortsha">{{ShortSha .ID.String}}</span> <a href="{{$.comment.Issue.PullRequest.BaseRepo.Link}}/commit/{{PathEscape .ID.String}}" rel="nofollow" class="{{$class}}">
{{if .Signature}} {{else}}
{{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}} <span class="{{$class}}">
{{end}} {{end}}
</a> <span class="shortsha">{{ShortSha .ID.String}}</span>
{{if .Signature}}
{{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}}
{{end}}
{{if $.comment.Issue.PullRequest.BaseRepo.Name}}
</a>
{{else}}
</span>
{{end}}
</span> </span>
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
<span class="gt-mono commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</span> <span class="gt-mono commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</span>
{{if IsMultilineCommitMessage .Message}} {{if IsMultilineCommitMessage .Message}}
<button class="ui button ellipsis-button" aria-expanded="false">...</button> <button class="ui button ellipsis-button" aria-expanded="false">...</button>

View File

@ -118,7 +118,7 @@
<div class="menu"> <div class="menu">
<div class="item" data-value="">{{.locale.Tr "repo.issue_labels_helper"}}</div> <div class="item" data-value="">{{.locale.Tr "repo.issue_labels_helper"}}</div>
{{range $template, $labels := .LabelTemplates}} {{range $template, $labels := .LabelTemplates}}
<div class="item" data-value="{{$template}}">{{$template}}<br><i>({{$labels}})</i></div> <div class="item" data-value="{{$template}}">{{$template}}<br/><i>({{$labels}})</i></div>
{{end}} {{end}}
</div> </div>
</div> </div>
@ -210,7 +210,7 @@
</div> </div>
</div> </div>
<br> <br/>
<div class="inline field"> <div class="inline field">
<label></label> <label></label>
<button class="ui green button{{if not .CanCreateRepo}} disabled{{end}}"> <button class="ui green button{{if not .CanCreateRepo}} disabled{{end}}">

View File

@ -2,7 +2,7 @@
<form class="ui form {{if $.hidden}}gt-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post"> <form class="ui form {{if $.hidden}}gt-hidden comment-form{{end}}" action="{{$.root.Issue.Link}}/files/reviews/comments" method="post">
{{$.root.CsrfTokenHtml}} {{$.root.CsrfTokenHtml}}
<input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}"> <input type="hidden" name="origin" value="{{if $.root.PageIsPullFiles}}diff{{else}}timeline{{end}}">
<input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}"> <input type="hidden" name="latest_commit_id" value="{{$.root.AfterCommitID}}"/>
<input type="hidden" name="side" value="{{if $.Side}}{{$.Side}}{{end}}"> <input type="hidden" name="side" value="{{if $.Side}}{{$.Side}}{{end}}">
<input type="hidden" name="line" value="{{if $.Line}}{{$.Line}}{{end}}"> <input type="hidden" name="line" value="{{if $.Line}}{{$.Line}}{{end}}">
<input type="hidden" name="path" value="{{if $.File}}{{$.File}}{{end}}"> <input type="hidden" name="path" value="{{if $.File}}{{$.File}}{{end}}">

View File

@ -17,7 +17,7 @@
{{if .blobBase}} {{if .blobBase}}
<span class="side"> <span class="side">
<p class="side-header">{{.root.locale.Tr "repo.diff.file_before"}}</p> <p class="side-header">{{.root.locale.Tr "repo.diff.file_before"}}</p>
<span class="before-container"><img class="image-before"></span> <span class="before-container"><img class="image-before" /></span>
<p> <p>
<span class="bounds-info-before"> <span class="bounds-info-before">
{{.root.locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span> {{.root.locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
@ -32,7 +32,7 @@
{{if .blobHead}} {{if .blobHead}}
<span class="side"> <span class="side">
<p class="side-header">{{.root.locale.Tr "repo.diff.file_after"}}</p> <p class="side-header">{{.root.locale.Tr "repo.diff.file_after"}}</p>
<span class="after-container"><img class="image-after"></span> <span class="after-container"><img class="image-after" /></span>
<p> <p>
<span class="bounds-info-after"> <span class="bounds-info-after">
{{.root.locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span> {{.root.locale.Tr "repo.diff.file_image_width"}}: <span class="text bounds-info-width"></span>
@ -50,9 +50,9 @@
<div class="ui bottom attached tab image-diff-container" data-tab="diff-swipe-{{.file.Index}}"> <div class="ui bottom attached tab image-diff-container" data-tab="diff-swipe-{{.file.Index}}">
<div class="diff-swipe"> <div class="diff-swipe">
<div class="swipe-frame"> <div class="swipe-frame">
<span class="before-container"><img class="image-before"></span> <span class="before-container"><img class="image-before" /></span>
<span class="swipe-container"> <span class="swipe-container">
<span class="after-container"><img class="image-after"></span> <span class="after-container"><img class="image-after" /></span>
</span> </span>
<span class="swipe-bar"> <span class="swipe-bar">
<span class="handle top-handle"></span> <span class="handle top-handle"></span>
@ -65,10 +65,10 @@
<div class="diff-overlay"> <div class="diff-overlay">
<div class="overlay-frame"> <div class="overlay-frame">
<div class="ui centered"> <div class="ui centered">
<input type="range" min="0" max="100" value="50"> <input type="range" min="0" max="100" value="50" />
</div> </div>
<span class="before-container"><img class="image-before"></span> <span class="before-container"><img class="image-before"/></span>
<span class="after-container"><img class="image-after"></span> <span class="after-container"><img class="image-after" /></span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@
<div class="ui segment"> <div class="ui segment">
<form class="ui form" action="{{.Link}}/reviews/submit" method="post"> <form class="ui form" action="{{.Link}}/reviews/submit" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}"> <input type="hidden" name="commit_id" value="{{.AfterCommitID}}"/>
<div class="header gt-df gt-ac gt-pb-3"> <div class="header gt-df gt-ac gt-pb-3">
<div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div> <div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div>
<a class="muted close gt-px-3">{{svg "octicon-x" 16}}</a> <a class="muted close gt-px-3">{{svg "octicon-x" 16}}</a>

View File

@ -28,10 +28,10 @@
{{- end -}} {{- end -}}
</a> </a>
</span> </span>
<span class="message gt-dib gt-ellipsis gt-mr-3"> <span class="message gt-dib gt-ellipsis gt-mr-2">
<span>{{RenderCommitMessage $.Context $commit.Subject $.RepoLink $.Repository.ComposeMetas}}</span> <span>{{RenderCommitMessage $.Context $commit.Subject $.RepoLink $.Repository.ComposeMetas}}</span>
</span> </span>
<span class="tags gt-df gt-ac gt-mr-2"> <span class="tags gt-df gt-ac">
{{range $commit.Refs}} {{range $commit.Refs}}
{{$refGroup := .RefGroup}} {{$refGroup := .RefGroup}}
{{if eq $refGroup "pull"}} {{if eq $refGroup "pull"}}
@ -54,20 +54,20 @@
{{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.ShortName}} {{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.ShortName}}
</a> </a>
{{else}} {{else}}
<!-- Unknown ref type .Name --> <!-- Unknown ref type {{.Name}} -->
{{end}} {{end}}
{{end}} {{end}}
</span> </span>
<span class="author gt-df gt-ac gt-mr-3"> <span class="author gt-df gt-ac gt-mr-2">
{{$userName := $commit.Commit.Author.Name}} {{$userName := $commit.Commit.Author.Name}}
{{if $commit.User}} {{if $commit.User}}
{{if $commit.User.FullName}} {{if $commit.User.FullName}}
{{$userName = $commit.User.FullName}} {{$userName = $commit.User.FullName}}
{{end}} {{end}}
<span class="gt-mr-2">{{avatar $.Context $commit.User}}</span> {{avatar $.Context $commit.User}}
<a href="{{$commit.User.HomeLink}}">{{$userName}}</a> <a href="{{$commit.User.HomeLink}}">{{$userName}}</a>
{{else}} {{else}}
<span class="gt-mr-2">{{avatarByEmail $.Context $commit.Commit.Author.Email $userName}}</span> {{avatarByEmail $.Context $commit.Commit.Author.Email $userName}}
{{$userName}} {{$userName}}
{{end}} {{end}}
</span> </span>

View File

@ -14,9 +14,9 @@
{{- else if eq $glyph.Glyph '_' -}} {{- else if eq $glyph.Glyph '_' -}}
M {{Add (Mul $glyph.Column 5) 0}} {{Add (Mul $glyph.Row 12) 12}} h 10 {{/* */ -}} M {{Add (Mul $glyph.Column 5) 0}} {{Add (Mul $glyph.Row 12) 12}} h 10 {{/* */ -}}
{{- end -}} {{- end -}}
{{- end}}" stroke-width="1" fill="none" id="flow-{{$flow.ID}}-path" stroke-linecap="round"></path> {{- end}}" stroke-width="1" fill="none" id="flow-{{$flow.ID}}-path" stroke-linecap="round"/>
{{range $flow.Commits}} {{range $flow.Commits}}
<circle class="flow-commit" cx="{{Add (Mul .Column 5) 5}}" cy="{{Add (Mul .Row 12) 6}}" r="2.5" stroke="none" id="flow-commit-{{.Rev}}" data-rev="{{.Rev}}"></circle> <circle class="flow-commit" cx="{{Add (Mul .Column 5) 5}}" cy="{{Add (Mul .Row 12) 6}}" r="2.5" stroke="none" id="flow-commit-{{.Rev}}" data-rev="{{.Rev}}"/>
{{end}} {{end}}
</g> </g>
{{end}} {{end}}

View File

@ -12,7 +12,7 @@
<div class="ui two column grid"> <div class="ui two column grid">
<div class="column left aligned"> <div class="column left aligned">
<strong>{{.Name | RenderEmojiPlain}}</strong> <strong>{{.Name | RenderEmojiPlain}}</strong>
<br>{{.About | RenderEmojiPlain}} <br/>{{.About | RenderEmojiPlain}}
</div> </div>
<div class="column right aligned"> <div class="column right aligned">
<a href="{{$.RepoLink}}/issues/new?template={{.FileName}}{{if $.milestone}}&milestone={{$.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a> <a href="{{$.RepoLink}}/issues/new?template={{.FileName}}{{if $.milestone}}&milestone={{$.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a>
@ -24,7 +24,7 @@
<div class="ui two column grid"> <div class="ui two column grid">
<div class="column left aligned"> <div class="column left aligned">
<strong>{{.locale.Tr "repo.issues.choose.blank"}}</strong> <strong>{{.locale.Tr "repo.issues.choose.blank"}}</strong>
<br>{{.locale.Tr "repo.issues.choose.blank_about"}} <br/>{{.locale.Tr "repo.issues.choose.blank_about"}}
</div> </div>
<div class="column right aligned"> <div class="column right aligned">
<a href="{{.RepoLink}}/issues/new?{{if .milestone}}&milestone={{.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a> <a href="{{.RepoLink}}/issues/new?{{if .milestone}}&milestone={{.milestone}}{{end}}{{if $.project}}&project={{$.project}}{{end}}" class="ui green button">{{$.locale.Tr "repo.issues.choose.get_started"}}</a>

View File

@ -28,7 +28,7 @@
<input class="label-exclusive-input" name="exclusive" type="checkbox"> <input class="label-exclusive-input" name="exclusive" type="checkbox">
<label>{{.locale.Tr "repo.issues.label_exclusive"}}</label> <label>{{.locale.Tr "repo.issues.label_exclusive"}}</label>
</div> </div>
<br> <br/>
<small class="desc">{{.locale.Tr "repo.issues.label_exclusive_desc" | Safe}}</small> <small class="desc">{{.locale.Tr "repo.issues.label_exclusive_desc" | Safe}}</small>
<div class="desc gt-ml-2 gt-mt-3 gt-hidden label-exclusive-warning"> <div class="desc gt-ml-2 gt-mt-3 gt-hidden label-exclusive-warning">
{{svg "octicon-alert"}} {{.locale.Tr "repo.issues.label_exclusive_warning" | Safe}} {{svg "octicon-alert"}} {{.locale.Tr "repo.issues.label_exclusive_warning" | Safe}}

View File

@ -2,7 +2,7 @@
<div class="twelve wide computer column"> <div class="twelve wide computer column">
<div class="ui attached left aligned segment"> <div class="ui attached left aligned segment">
<p>{{.locale.Tr "repo.issues.label_templates.info"}}</p> <p>{{.locale.Tr "repo.issues.label_templates.info"}}</p>
<br> <br/>
<form class="ui form center" action="{{.Link}}/initialize" method="post"> <form class="ui form center" action="{{.Link}}/initialize" method="post">
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
<div class="field"> <div class="field">
@ -11,7 +11,7 @@
<div class="default text">{{.locale.Tr "repo.issues.label_templates.helper"}}</div> <div class="default text">{{.locale.Tr "repo.issues.label_templates.helper"}}</div>
<div class="menu"> <div class="menu">
{{range $template, $labels := .LabelTemplates}} {{range $template, $labels := .LabelTemplates}}
<div class="item" data-value="{{$template}}">{{$template}}<br><i>({{$labels}})</i></div> <div class="item" data-value="{{$template}}">{{$template}}<br/><i>({{$labels}})</i></div>
{{end}} {{end}}
</div> </div>
{{svg "octicon-triangle-down" 18 "dropdown icon"}} {{svg "octicon-triangle-down" 18 "dropdown icon"}}

View File

@ -16,7 +16,7 @@
<input class="label-exclusive-input" name="exclusive" type="checkbox"> <input class="label-exclusive-input" name="exclusive" type="checkbox">
<label>{{.locale.Tr "repo.issues.label_exclusive"}}</label> <label>{{.locale.Tr "repo.issues.label_exclusive"}}</label>
</div> </div>
<br> <br/>
<small class="desc">{{.locale.Tr "repo.issues.label_exclusive_desc" | Safe}}</small> <small class="desc">{{.locale.Tr "repo.issues.label_exclusive_desc" | Safe}}</small>
</div> </div>
<div class="field"> <div class="field">

View File

@ -31,7 +31,7 @@
<div class="column center aligned"> <div class="column center aligned">
<form class="ui form ignore-dirty"> <form class="ui form ignore-dirty">
<div class="ui search fluid action input"> <div class="ui search fluid action input">
<input type="hidden" name="state" value="{{$.State}}"> <input type="hidden" name="state" value="{{$.State}}"/>
<input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..."> <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
<button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
</div> </div>

View File

@ -1,12 +1,12 @@
<form class="ui form ignore-dirty"> <form class="ui form ignore-dirty">
<div class="ui search fluid action input"> <div class="ui search fluid action input">
<input type="hidden" name="type" value="{{$.ViewType}}"> <input type="hidden" name="type" value="{{$.ViewType}}"/>
<input type="hidden" name="state" value="{{$.State}}"> <input type="hidden" name="state" value="{{$.State}}"/>
<input type="hidden" name="labels" value="{{.SelectLabels}}"> <input type="hidden" name="labels" value="{{.SelectLabels}}"/>
<input type="hidden" name="milestone" value="{{$.MilestoneID}}"> <input type="hidden" name="milestone" value="{{$.MilestoneID}}"/>
<input type="hidden" name="project" value="{{$.ProjectID}}"> <input type="hidden" name="project" value="{{$.ProjectID}}"/>
<input type="hidden" name="assignee" value="{{$.AssigneeID}}"> <input type="hidden" name="assignee" value="{{$.AssigneeID}}"/>
<input type="hidden" name="poster" value="{{$.PosterID}}"> <input type="hidden" name="poster" value="{{$.PosterID}}"/>
<input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..."> <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
<button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
</div> </div>

View File

@ -12,7 +12,7 @@
<!-- Agree, there should be a better way, eg: introduce window.config.pageData (original author: wxiaoguang @ 2021-09-05) --> <!-- Agree, there should be a better way, eg: introduce window.config.pageData (original author: wxiaoguang @ 2021-09-05) -->
<input type="hidden" id="repolink" value="{{$.RepoRelPath}}"> <input type="hidden" id="repolink" value="{{$.RepoRelPath}}">
<input type="hidden" id="repoId" value="{{.Repository.ID}}"> <input type="hidden" id="repoId" value="{{.Repository.ID}}">
<input type="hidden" id="issueIndex" value="{{.Issue.Index}}"> <input type="hidden" id="issueIndex" value="{{.Issue.Index}}"/>
<input type="hidden" id="type" value="{{.IssueType}}"> <input type="hidden" id="type" value="{{.IssueType}}">
{{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}} {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}}

View File

@ -294,7 +294,7 @@
<span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span> <span class="text"><strong>{{.locale.Tr "notification.notifications"}}</strong></span>
<div class="gt-mt-3"> <div class="gt-mt-3">
<form method="POST" action="{{.Issue.Link}}/watch"> <form method="POST" action="{{.Issue.Link}}/watch">
<input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}"> <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}" />
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<button class="fluid ui button gt-df gt-jc"> <button class="fluid ui button gt-df gt-jc">
{{if $.IssueWatch.IsWatching}} {{if $.IssueWatch.IsWatching}}
@ -517,8 +517,8 @@
<div class="content"> <div class="content">
<form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm"> <form method="POST" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"> <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID"/>
<input type="hidden" value="" name="dependencyType" id="dependencyType"> <input type="hidden" value="" name="dependencyType" id="dependencyType"/>
</form> </form>
<p>{{if .Issue.IsPull}} <p>{{if .Issue.IsPull}}
{{.locale.Tr "repo.issues.dependency.pr_remove_text"}} {{.locale.Tr "repo.issues.dependency.pr_remove_text"}}

View File

@ -9,12 +9,12 @@
<div class="ui stackable middle very relaxed page grid"> <div class="ui stackable middle very relaxed page grid">
<div id="repo_migrating" class="sixteen wide center aligned centered column" task="{{.MigrateTask.ID}}"> <div id="repo_migrating" class="sixteen wide center aligned centered column" task="{{.MigrateTask.ID}}">
<div> <div>
<img src="{{AssetUrlPrefix}}/img/loading.png"> <img src="{{AssetUrlPrefix}}/img/loading.png"/>
</div> </div>
</div> </div>
<div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column gt-hidden"> <div id="repo_migrating_failed_image" class="sixteen wide center aligned centered column gt-hidden">
<div> <div>
<img src="{{AssetUrlPrefix}}/img/failed.png"> <img src="{{AssetUrlPrefix}}/img/failed.png"/>
</div> </div>
</div> </div>
</div> </div>

View File

@ -54,7 +54,7 @@
<div class="ui selection dropdown"> <div class="ui selection dropdown">
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{range $element := .CardTypes}} {{range $element := .CardTypes}}
{{if or (eq $.card_type $element.CardType) (and (not $.PageIsEditProjects) (eq $element.CardType 1))}} {{if or (eq $.card_type $element.CardType) (and (not $.card_type) (eq $element.CardType 2))}}
<input type="hidden" name="card_type" value="{{$element.CardType}}"> <input type="hidden" name="card_type" value="{{$element.CardType}}">
<div class="default text">{{$.locale.Tr $element.Translation}}</div> <div class="default text">{{$.locale.Tr $element.Translation}}</div>
{{end}} {{end}}

View File

@ -182,7 +182,7 @@
{{if eq $.Project.CardType 1}}{{/* Images and Text*/}} {{if eq $.Project.CardType 1}}{{/* Images and Text*/}}
<div class="card-attachment-images"> <div class="card-attachment-images">
{{range (index $.issuesAttachmentMap .ID)}} {{range (index $.issuesAttachmentMap .ID)}}
<img src="{{.DownloadURL}}" alt="{{.Name}}"> <img src="{{.DownloadURL}}" alt="{{.Name}}" />
{{end}} {{end}}
</div> </div>
{{end}} {{end}}

View File

@ -1,7 +1,7 @@
{{template "base/head" .}} {{template "base/head" .}}
<input type="hidden" id="repolink" value="{{$.RepoRelPath}}"> <input type="hidden" id="repolink" value="{{$.RepoRelPath}}">
<input type="hidden" id="issueIndex" value="{{.Issue.Index}}"> <input type="hidden" id="issueIndex" value="{{.Issue.Index}}"/>
<div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull files diff"> <div role="main" aria-label="{{.Title}}" class="page-content repository view issue pull files diff">
{{template "repo/header" .}} {{template "repo/header" .}}

View File

@ -5,10 +5,10 @@
{{template "base/alert" .}} {{template "base/alert" .}}
<h2 class="ui compact small menu header"> <h2 class="ui compact small menu header">
{{if .Permission.CanRead $.UnitTypeReleases}} {{if .Permission.CanRead $.UnitTypeReleases}}
<a class="{{if (and (not .PageIsSingleTag) (not .PageIsTagList))}}active {{end}}item" href="{{.RepoLink}}/releases">{{.locale.Tr "repo.release.releases"}}</a> <a class="{{if (not .PageIsTagList)}}active {{end}}item" href="{{.RepoLink}}/releases">{{.locale.Tr "repo.release.releases"}}</a>
{{end}} {{end}}
{{if .Permission.CanRead $.UnitTypeCode}} {{if .Permission.CanRead $.UnitTypeCode}}
<a class="{{if (or .PageIsSingleTag .PageIsTagList)}}active {{end}}item" href="{{.RepoLink}}/tags">{{.locale.Tr "repo.release.tags"}}</a> <a class="{{if .PageIsTagList}}active {{end}}item" href="{{.RepoLink}}/tags">{{.locale.Tr "repo.release.tags"}}</a>
{{end}} {{end}}
</h2> </h2>
{{if .EnableFeed}} {{if .EnableFeed}}
@ -35,7 +35,7 @@
<tr> <tr>
<td class="tag"> <td class="tag">
<h3 class="release-tag-name gt-mb-3"> <h3 class="release-tag-name gt-mb-3">
<a class="gt-df gt-ac" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> <a class="gt-df gt-ac" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a>
</h3> </h3>
<div class="download gt-df gt-ac"> <div class="download gt-df gt-ac">
{{if $.Permission.CanRead $.UnitTypeCode}} {{if $.Permission.CanRead $.UnitTypeCode}}
@ -69,6 +69,9 @@
{{range $idx, $release := .Releases}} {{range $idx, $release := .Releases}}
<li class="ui grid"> <li class="ui grid">
<div class="ui four wide column meta gt-mt-2"> <div class="ui four wide column meta gt-mt-2">
{{if .IsTag}}
{{if .CreatedUnix}}<span class="time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>{{end}}
{{else}}
<a class="gt-df gt-ac gt-je muted" href="{{if not .Sha1}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "gt-mr-2"}}{{.TagName}}</a> <a class="gt-df gt-ac gt-je muted" href="{{if not .Sha1}}#{{else}}{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "gt-mr-2"}}{{.TagName}}</a>
{{if .Sha1}} {{if .Sha1}}
<span class="commit"> <span class="commit">
@ -76,8 +79,41 @@
</span> </span>
{{template "repo/branch_dropdown" dict "root" $ "release" .}} {{template "repo/branch_dropdown" dict "root" $ "release" .}}
{{end}} {{end}}
{{end}}
</div> </div>
<div class="ui twelve wide column detail"> <div class="ui twelve wide column detail">
{{if .IsTag}}
<div class="gt-df gt-ac gt-sb gt-fw gt-mb-3">
<h4 class="release-list-title gt-df gt-ac">
<a class="gt-df gt-ac" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{svg "octicon-tag" 24 "gt-mr-3"}}{{.TagName}}</a>
</h4>
</div>
<p class="text grey">
{{if gt .Publisher.ID 0}}
<span class="author">
{{avatar $.Context .Publisher 20}}
<a href="{{.Publisher.HomeLink}}">{{.Publisher.Name}}</a>
</span>
<span class="released">
{{$.locale.Tr "repo.released_this"}}
</span>
{{if .CreatedUnix}}
<span class="time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
{{end}}
|
{{end}}
<span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | PathEscapeSegments}}{{if .Target}}...{{.Target | PathEscapeSegments}}{{end}}">{{$.locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.locale.Tr "repo.release.ahead.target" $.DefaultBranch}}</span>
</p>
<div class="download">
{{if $.Permission.CanRead $.UnitTypeCode}}
<a class="gt-mono muted" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .Sha1}}</a>
{{if not $.DisableDownloadSourceArchives}}
<a class="archive-link muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.zip" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;ZIP</a>
<a class="archive-link muted" href="{{$.RepoLink}}/archive/{{.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}}&nbsp;TAR.GZ</a>
{{end}}
{{end}}
</div>
{{else}}
<div class="gt-df gt-ac gt-sb gt-fw gt-mb-3"> <div class="gt-df gt-ac gt-sb gt-fw gt-mb-3">
<h4 class="release-list-title gt-df gt-ac"> <h4 class="release-list-title gt-df gt-ac">
<a href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{.Title}}</a> <a href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{.Title}}</a>
@ -97,24 +133,6 @@
{{end}} {{end}}
</div> </div>
</div> </div>
{{if .IsTag}}
<p class="text grey">
{{if gt .Publisher.ID 0}}
<span class="author">
{{avatar $.Context .Publisher 20}}
<a href="{{.Publisher.HomeLink}}">{{.Publisher.Name}}</a>
</span>
<span class="released">
{{$.locale.Tr "repo.tagged_this"}}
</span>
{{if .CreatedUnix}}
<span class="time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
{{end}}
|
{{end}}
<span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | PathEscapeSegments}}{{if .Target}}...{{.Target | PathEscapeSegments}}{{end}}">{{$.locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.locale.Tr "repo.tag.ahead.target" $.DefaultBranch}}</span>
</p>
{{else}}
<p class="text grey"> <p class="text grey">
<span class="author"> <span class="author">
{{if .OriginalAuthor}} {{if .OriginalAuthor}}
@ -136,7 +154,6 @@
| <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | PathEscapeSegments}}...{{.Target | PathEscapeSegments}}">{{$.locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.locale.Tr "repo.release.ahead.target" .Target}}</span> | <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | PathEscapeSegments}}...{{.Target | PathEscapeSegments}}">{{$.locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.locale.Tr "repo.release.ahead.target" .Target}}</span>
{{end}} {{end}}
</p> </p>
{{end}}
<div class="markup desc"> <div class="markup desc">
{{Str2html .Note}} {{Str2html .Note}}
</div> </div>
@ -170,6 +187,7 @@
{{end}} {{end}}
</ul> </ul>
</details> </details>
{{end}}
<span class="dot">&nbsp;</span> <span class="dot">&nbsp;</span>
</div> </div>
</li> </li>

View File

@ -20,11 +20,11 @@
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong> <b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
{{else}} {{else}}
<input id="tag-name" name="tag_name" value="{{.tag_name}}" placeholder="{{.locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255"> <input id="tag-name" name="tag_name" value="{{.tag_name}}" placeholder="{{.locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255">
<input id="tag-name-editor" type="hidden" data-existing-tags={{Json .Tags}} data-tag-helper={{.locale.Tr "repo.release.tag_helper"}} data-tag-helper-new={{.locale.Tr "repo.release.tag_helper_new"}} data-tag-helper-existing={{.locale.Tr "repo.release.tag_helper_existing"}}> <input id="tag-name-editor" type="hidden" data-existing-tags={{Json .Tags}} data-tag-helper={{.locale.Tr "repo.release.tag_helper"}} data-tag-helper-new={{.locale.Tr "repo.release.tag_helper_new"}} data-tag-helper-existing={{.locale.Tr "repo.release.tag_helper_existing"}} />
<div id="tag-target-selector" class="gt-dib"> <div id="tag-target-selector" class="gt-dib">
<span class="at">@</span> <span class="at">@</span>
<div class="ui selection dropdown"> <div class="ui selection dropdown">
<input type="hidden" name="tag_target" value="{{.tag_target}}"> <input type="hidden" name="tag_target" value="{{.tag_target}}"/>
{{svg "octicon-git-branch"}} {{svg "octicon-git-branch"}}
<div class="text"> <div class="text">
{{.locale.Tr "repo.release.target"}} : {{.locale.Tr "repo.release.target"}} :
@ -70,8 +70,8 @@
</a> </a>
</div> </div>
<div class="gt-df gt-ac"> <div class="gt-df gt-ac">
<input name="attachment-edit-{{.UUID}}" class="gt-mr-3 attachment_edit" required value="{{.Name}}"> <input name="attachment-edit-{{.UUID}}" class="gt-mr-3 attachment_edit" required value="{{.Name}}"/>
<input name="attachment-del-{{.UUID}}" type="hidden" value="false"> <input name="attachment-del-{{.UUID}}" type="hidden" value="false"/>
<span class="ui text grey gt-mr-3">{{.Size | FileSize}}</span> <span class="ui text grey gt-mr-3">{{.Size | FileSize}}</span>
<span data-tooltip-content="{{$.locale.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}"> <span data-tooltip-content="{{$.locale.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}">
{{svg "octicon-info"}} {{svg "octicon-info"}}

View File

@ -12,7 +12,7 @@
{{.CsrfTokenHtml}} {{.CsrfTokenHtml}}
{{range .Pointers}} {{range .Pointers}}
{{if .Associatable}} {{if .Associatable}}
<input type="hidden" name="oid" value="{{.Oid}} {{.Size}}"> <input type="hidden" name="oid" value="{{.Oid}} {{.Size}}"/>
{{end}} {{end}}
{{end}} {{end}}
<button class="ui green button">{{$.locale.Tr "repo.settings.lfs_pointers.associateAccessible" $.NumAssociatable}}</button> <button class="ui green button">{{$.locale.Tr "repo.settings.lfs_pointers.associateAccessible" $.NumAssociatable}}</button>

View File

@ -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="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="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="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="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>

View File

@ -112,7 +112,7 @@
<a class="ui tiny primary button" href="{{$.RepoLink}}/settings/tags/{{.ID}}">{{$.locale.Tr "edit"}}</a> <a class="ui tiny primary button" href="{{$.RepoLink}}/settings/tags/{{.ID}}">{{$.locale.Tr "edit"}}</a>
<form class="gt-dib" action="{{$.RepoLink}}/settings/tags/delete" method="post"> <form class="gt-dib" action="{{$.RepoLink}}/settings/tags/delete" method="post">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="id" value="{{.ID}}"> <input type="hidden" name="id" value="{{.ID}}" />
<button class="ui tiny red button">{{$.locale.Tr "remove"}}</button> <button class="ui tiny red button">{{$.locale.Tr "remove"}}</button>
</form> </form>
</td> </td>

View File

@ -2,7 +2,7 @@
<div role="main" aria-label="{{.Title}}" class="page-content ui container center gt-full-screen-width {{if .IsRepo}}repository{{end}}"> <div role="main" aria-label="{{.Title}}" class="page-content ui container center gt-full-screen-width {{if .IsRepo}}repository{{end}}">
{{if .IsRepo}}{{template "repo/header" .}}{{end}} {{if .IsRepo}}{{template "repo/header" .}}{{end}}
<div class="ui container center"> <div class="ui container center">
<p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"></p> <p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"/></p>
<div class="ui divider"></div> <div class="ui divider"></div>
<br> <br>
<p>{{.locale.Tr "error404" | Safe}} <p>{{.locale.Tr "error404" | Safe}}

View File

@ -1,6 +1,6 @@
{{template "base/head" .}} {{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content ui container gt-full-screen-width center"> <div role="main" aria-label="{{.Title}}" class="page-content ui container gt-full-screen-width center">
<p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/500.png" alt="500"></p> <p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/500.png" alt="500"/></p>
<div class="ui divider"></div> <div class="ui divider"></div>
<br> <br>
{{if .ErrorMsg}} {{if .ErrorMsg}}

View File

@ -8,7 +8,7 @@
<div class="ui attached segment"> <div class="ui attached segment">
{{template "base/alert" .}} {{template "base/alert" .}}
<p> <p>
<b>{{.locale.Tr "auth.authorize_application_description"}}</b><br> <b>{{.locale.Tr "auth.authorize_application_description"}}</b><br/>
{{.locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML | Str2html}} {{.locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML | Str2html}}
</p> </p>
</div> </div>

View File

@ -76,10 +76,10 @@
<div class="column center aligned"> <div class="column center aligned">
<form class="ui form ignore-dirty"> <form class="ui form ignore-dirty">
<div class="ui search fluid action input"> <div class="ui search fluid action input">
<input type="hidden" name="type" value="{{$.ViewType}}"> <input type="hidden" name="type" value="{{$.ViewType}}"/>
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"> <input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/>
<input type="hidden" name="sort" value="{{$.SortType}}"> <input type="hidden" name="sort" value="{{$.SortType}}"/>
<input type="hidden" name="state" value="{{$.State}}"> <input type="hidden" name="state" value="{{$.State}}"/>
<input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..."> <input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
<button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
</div> </div>

View File

@ -50,10 +50,10 @@
<div class="column center aligned"> <div class="column center aligned">
<form class="ui form ignore-dirty"> <form class="ui form ignore-dirty">
<div class="ui search fluid action input"> <div class="ui search fluid action input">
<input type="hidden" name="type" value="{{$.ViewType}}"> <input type="hidden" name="type" value="{{$.ViewType}}"/>
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]"> <input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]"/>
<input type="hidden" name="sort" value="{{$.SortType}}"> <input type="hidden" name="sort" value="{{$.SortType}}"/>
<input type="hidden" name="state" value="{{$.State}}"> <input type="hidden" name="state" value="{{$.State}}"/>
<input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..."> <input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
<button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button> <button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
</div> </div>

View File

@ -74,8 +74,8 @@
{{if ne .Status 3}} {{if ne .Status 3}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="POST">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}"> <input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="pinned"> <input type="hidden" name="status" value="pinned" />
<button class="ui mini button" title='{{$.locale.Tr "notification.pin"}}' <button class="ui mini button" title='{{$.locale.Tr "notification.pin"}}'
data-url="{{AppSubUrl}}/notifications/status" data-url="{{AppSubUrl}}/notifications/status"
data-status="pinned" data-status="pinned"
@ -91,9 +91,9 @@
{{if or (eq .Status 1) (eq .Status 3)}} {{if or (eq .Status 1) (eq .Status 3)}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="POST">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}"> <input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="read"> <input type="hidden" name="status" value="read" />
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}"> <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
<button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_read"}}' <button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_read"}}'
data-url="{{AppSubUrl}}/notifications/status" data-url="{{AppSubUrl}}/notifications/status"
data-status="read" data-status="read"
@ -106,9 +106,9 @@
{{else if eq .Status 2}} {{else if eq .Status 2}}
<form action="{{AppSubUrl}}/notifications/status" method="POST"> <form action="{{AppSubUrl}}/notifications/status" method="POST">
{{$.CsrfTokenHtml}} {{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}"> <input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="unread"> <input type="hidden" name="status" value="unread" />
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}"> <input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
<button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_unread"}}' <button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_unread"}}'
data-url="{{AppSubUrl}}/notifications/status" data-url="{{AppSubUrl}}/notifications/status"
data-status="unread" data-status="unread"

View File

@ -4,7 +4,7 @@
<div class="ui stackable grid"> <div class="ui stackable grid">
<div class="ui five wide column"> <div class="ui five wide column">
<div class="ui card"> <div class="ui card">
<div id="profile-avatar" class="content gt-df"> <div id="profile-avatar" class="content gt-df"/>
{{if eq .SignedUserName .Owner.Name}} {{if eq .SignedUserName .Owner.Name}}
<a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{.locale.Tr "user.change_avatar"}}"> <a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{.locale.Tr "user.change_avatar"}}">
{{avatar $.Context .Owner 290}} {{avatar $.Context .Owner 290}}

View File

@ -110,7 +110,7 @@
</div> </div>
<div class="field {{if .Err_Gravatar}}error{{end}}"> <div class="field {{if .Err_Gravatar}}error{{end}}">
<label for="gravatar">Avatar {{.locale.Tr "email"}}</label> <label for="gravatar">Avatar {{.locale.Tr "email"}}</label>
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}"> <input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
</div> </div>
{{end}} {{end}}

View File

@ -45,49 +45,38 @@ func TestSettingShowUserEmailProfile(t *testing.T) {
defer tests.PrepareTestEnv(t)() defer tests.PrepareTestEnv(t)()
showUserEmail := setting.UI.ShowUserEmail showUserEmail := setting.UI.ShowUserEmail
// user1: keep_email_private = false, user2: keep_email_private = true
setting.UI.ShowUserEmail = true setting.UI.ShowUserEmail = true
// user1 can see self session := loginUser(t, "user2")
session := loginUser(t, "user1") req := NewRequest(t, "GET", "/user2")
req := NewRequest(t, "GET", "/user1")
resp := session.MakeRequest(t, req, http.StatusOK) resp := session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body) htmlDoc := NewHTMLParser(t, resp.Body)
assert.Contains(t, htmlDoc.doc.Find(".user.profile").Text(), "user1@example.com") assert.Contains(t,
htmlDoc.doc.Find(".user.profile").Text(),
// user1 can not see user2 "user2@example.com",
req = NewRequest(t, "GET", "/user2") )
resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc = NewHTMLParser(t, resp.Body)
// Should not contain even if the user visits their own profile page
assert.NotContains(t, htmlDoc.doc.Find(".user.profile").Text(), "user2@example.com")
// user2 can see user1
session = loginUser(t, "user2")
req = NewRequest(t, "GET", "/user1")
resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc = NewHTMLParser(t, resp.Body)
assert.Contains(t, htmlDoc.doc.Find(".user.profile").Text(), "user1@example.com")
// user2 can not see self
session = loginUser(t, "user2")
req = NewRequest(t, "GET", "/user2")
resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc = NewHTMLParser(t, resp.Body)
assert.NotContains(t, htmlDoc.doc.Find(".user.profile").Text(), "user2@example.com")
setting.UI.ShowUserEmail = false setting.UI.ShowUserEmail = false
// user1 can not see self req = NewRequest(t, "GET", "/user2")
session = loginUser(t, "user1")
req = NewRequest(t, "GET", "/user1")
resp = session.MakeRequest(t, req, http.StatusOK) resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc = NewHTMLParser(t, resp.Body) htmlDoc = NewHTMLParser(t, resp.Body)
assert.NotContains(t, htmlDoc.doc.Find(".user.profile").Text(), "user1@example.com") // Should contain since this user owns the profile page
assert.Contains(t,
htmlDoc.doc.Find(".user.profile").Text(),
"user2@example.com",
)
setting.UI.ShowUserEmail = showUserEmail setting.UI.ShowUserEmail = showUserEmail
session = loginUser(t, "user4")
req = NewRequest(t, "GET", "/user2")
resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc = NewHTMLParser(t, resp.Body)
assert.NotContains(t,
htmlDoc.doc.Find(".user.profile").Text(),
"user2@example.com",
)
} }
func TestSettingLandingPage(t *testing.T) { func TestSettingLandingPage(t *testing.T) {

View File

@ -13,15 +13,6 @@
<i class="stop circle outline icon"/> <i class="stop circle outline icon"/>
</button> </button>
</div> </div>
<div class="action-commit-summary">
{{ run.commit.localeCommit }}
<a :href="run.commit.link">{{ run.commit.shortSHA }}</a>
&nbsp;<span class="ui label">
<a :href="run.commit.branch.link">{{ run.commit.branch.name }}</a>
</span>
&nbsp;{{ run.commit.localePushedBy }}
<a :href="run.commit.pusher.link">{{ run.commit.pusher.displayName }}</a>
</div>
</div> </div>
<div class="action-view-body"> <div class="action-view-body">
<div class="action-view-left"> <div class="action-view-left">
@ -114,20 +105,6 @@ const sfc = {
// canRerun: false, // canRerun: false,
// }, // },
], ],
commit: {
localeCommit: '',
localePushedBy: '',
shortSHA: '',
link: '',
pusher: {
displayName: '',
link: '',
},
branch: {
name: '',
link: '',
},
}
}, },
currentJob: { currentJob: {
title: '', title: '',
@ -355,10 +332,6 @@ export function initRepositoryActionView() {
padding: 0 5px; padding: 0 5px;
} }
.action-commit-summary {
padding: 10px 10px;
}
/* ================ */ /* ================ */
/* action view left */ /* action view left */

View File

@ -78,7 +78,7 @@ function updateDeadline(deadlineString) {
export function initRepoIssueDue() { export function initRepoIssueDue() {
$(document).on('click', '.issue-due-edit', () => { $(document).on('click', '.issue-due-edit', () => {
toggleElem('#deadlineForm'); $('#deadlineForm').fadeToggle(150);
}); });
$(document).on('click', '.issue-due-remove', () => { $(document).on('click', '.issue-due-remove', () => {
updateDeadline(''); updateDeadline('');