mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-13 02:02:53 +09:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ceb78caad | ||
|
|
4dccac3dbf | ||
|
|
73e70f3c44 | ||
|
|
499257d81e | ||
|
|
84fa30e3d5 | ||
|
|
f1a0b64109 | ||
|
|
bfdbc626cb | ||
|
|
3abbf5fc21 | ||
|
|
d9d3f5234e | ||
|
|
7d7ba76c08 | ||
|
|
e76b3f72b2 |
16
.drone.yml
16
.drone.yml
@@ -1162,7 +1162,7 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: dev-linux-amd64
|
tags: nightly-linux-amd64
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
@@ -1184,7 +1184,7 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: dev-linux-amd64-rootless
|
tags: nightly-linux-amd64-rootless
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
@@ -1233,7 +1233,7 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
|
tags: ${DRONE_BRANCH##release/v}-nightly-linux-amd64
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
@@ -1255,7 +1255,7 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
|
tags: ${DRONE_BRANCH##release/v}-nightlf-linux-amd64-rootless
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
@@ -1487,7 +1487,7 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: dev-linux-arm64
|
tags: nightly-linux-arm64
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
@@ -1509,7 +1509,7 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: dev-linux-arm64-rootless
|
tags: nightly-linux-arm64-rootless
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
@@ -1558,7 +1558,7 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
settings:
|
settings:
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
|
tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
@@ -1580,7 +1580,7 @@ steps:
|
|||||||
settings:
|
settings:
|
||||||
dockerfile: Dockerfile.rootless
|
dockerfile: Dockerfile.rootless
|
||||||
auto_tag: false
|
auto_tag: false
|
||||||
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
|
tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64-rootless
|
||||||
repo: gitea/gitea
|
repo: gitea/gitea
|
||||||
build_args:
|
build_args:
|
||||||
- GOPROXY=https://goproxy.io
|
- GOPROXY=https://goproxy.io
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -4,6 +4,19 @@ This changelog goes through all the changes that have been made in each release
|
|||||||
without substantial changes to our git log; to see the highlights of what has
|
without substantial changes to our git log; to see the highlights of what has
|
||||||
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
been added to each release, please refer to the [blog](https://blog.gitea.io).
|
||||||
|
|
||||||
|
## [1.19.3](https://github.com/go-gitea/gitea/releases/tag/1.19.3) - 2023-05-03
|
||||||
|
|
||||||
|
* SECURITY
|
||||||
|
* Use golang 1.20.4 to fix CVE-2023-24539, CVE-2023-24540, and CVE-2023-29400
|
||||||
|
* ENHANCEMENTS
|
||||||
|
* Enable whitespace rendering on selection in Monaco (#24444) (#24485)
|
||||||
|
* Improve milestone filter on issues page (#22423) (#24440)
|
||||||
|
* BUGFIXES
|
||||||
|
* Fix api error message if fork exists (#24487) (#24493)
|
||||||
|
* Fix user-cards format (#24428) (#24431)
|
||||||
|
* Fix incorrect CurrentUser check for docker rootless (#24435)
|
||||||
|
* Getting the tag list does not require being signed in (#24413) (#24416)
|
||||||
|
|
||||||
## [1.19.2](https://github.com/go-gitea/gitea/releases/tag/1.19.2) - 2023-04-26
|
## [1.19.2](https://github.com/go-gitea/gitea/releases/tag/1.19.2) - 2023-04-26
|
||||||
|
|
||||||
* SECURITY
|
* SECURITY
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ const (
|
|||||||
const (
|
const (
|
||||||
// Which means a condition to filter the records which don't match any id.
|
// Which means a condition to filter the records which don't match any id.
|
||||||
// It's different from zero which means the condition could be ignored.
|
// It's different from zero which means the condition could be ignored.
|
||||||
NoneID = -1
|
NoConditionID = -1
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1266,7 +1266,9 @@ func (opts *IssuesOptions) setupSessionNoLimit(sess *xorm.Session) {
|
|||||||
applySubscribedCondition(sess, opts.SubscriberID)
|
applySubscribedCondition(sess, opts.SubscriberID)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(opts.MilestoneIDs) > 0 {
|
if len(opts.MilestoneIDs) == 1 && opts.MilestoneIDs[0] == db.NoConditionID {
|
||||||
|
sess.And("issue.milestone_id = 0")
|
||||||
|
} else if len(opts.MilestoneIDs) > 0 {
|
||||||
sess.In("issue.milestone_id", opts.MilestoneIDs)
|
sess.In("issue.milestone_id", opts.MilestoneIDs)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1280,7 +1282,7 @@ func (opts *IssuesOptions) setupSessionNoLimit(sess *xorm.Session) {
|
|||||||
if opts.ProjectID > 0 {
|
if opts.ProjectID > 0 {
|
||||||
sess.Join("INNER", "project_issue", "issue.id = project_issue.issue_id").
|
sess.Join("INNER", "project_issue", "issue.id = project_issue.issue_id").
|
||||||
And("project_issue.project_id=?", opts.ProjectID)
|
And("project_issue.project_id=?", opts.ProjectID)
|
||||||
} else if opts.ProjectID == db.NoneID { // show those that are in no project
|
} else if opts.ProjectID == db.NoConditionID { // show those that are in no project
|
||||||
sess.And(builder.NotIn("issue.id", builder.Select("issue_id").From("project_issue")))
|
sess.And(builder.NotIn("issue.id", builder.Select("issue_id").From("project_issue")))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1680,6 +1682,8 @@ func getIssueStatsChunk(opts *IssueStatsOptions, issueIDs []int64) (*IssueStats,
|
|||||||
|
|
||||||
if opts.MilestoneID > 0 {
|
if opts.MilestoneID > 0 {
|
||||||
sess.And("issue.milestone_id = ?", opts.MilestoneID)
|
sess.And("issue.milestone_id = ?", opts.MilestoneID)
|
||||||
|
} else if opts.MilestoneID == db.NoConditionID {
|
||||||
|
sess.And("issue.milestone_id = 0")
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.ProjectID > 0 {
|
if opts.ProjectID > 0 {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
package queue
|
package queue
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@@ -101,6 +102,9 @@ func TestChannelQueue_Batch(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestChannelQueue_Pause(t *testing.T) {
|
func TestChannelQueue_Pause(t *testing.T) {
|
||||||
|
if os.Getenv("CI") != "" {
|
||||||
|
t.Skip("Skipping because test is flaky on CI")
|
||||||
|
}
|
||||||
lock := sync.Mutex{}
|
lock := sync.Mutex{}
|
||||||
var queue Queue
|
var queue Queue
|
||||||
var err error
|
var err error
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ package queue
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
@@ -16,6 +17,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestPersistableChannelUniqueQueue(t *testing.T) {
|
func TestPersistableChannelUniqueQueue(t *testing.T) {
|
||||||
|
if os.Getenv("CI") != "" {
|
||||||
|
t.Skip("Skipping because test is flaky on CI")
|
||||||
|
}
|
||||||
tmpDir := t.TempDir()
|
tmpDir := t.TempDir()
|
||||||
fmt.Printf("TempDir %s\n", tmpDir)
|
fmt.Printf("TempDir %s\n", tmpDir)
|
||||||
_ = log.NewLogger(1000, "console", "console", `{"level":"warn","stacktracelevel":"NONE","stderr":true}`)
|
_ = log.NewLogger(1000, "console", "console", `{"level":"warn","stacktracelevel":"NONE","stderr":true}`)
|
||||||
|
|||||||
@@ -282,6 +282,9 @@ func loadCommonSettingsFrom(cfg ConfigProvider) {
|
|||||||
loadLogFrom(cfg)
|
loadLogFrom(cfg)
|
||||||
loadServerFrom(cfg)
|
loadServerFrom(cfg)
|
||||||
loadSSHFrom(cfg)
|
loadSSHFrom(cfg)
|
||||||
|
|
||||||
|
mustCurrentRunUserMatch(cfg) // it depends on the SSH config, only non-builtin SSH server requires this check
|
||||||
|
|
||||||
loadOAuth2From(cfg)
|
loadOAuth2From(cfg)
|
||||||
loadSecurityFrom(cfg)
|
loadSecurityFrom(cfg)
|
||||||
loadAttachmentFrom(cfg)
|
loadAttachmentFrom(cfg)
|
||||||
@@ -314,14 +317,6 @@ func loadRunModeFrom(rootCfg ConfigProvider) {
|
|||||||
RunMode = rootSec.Key("RUN_MODE").MustString("prod")
|
RunMode = rootSec.Key("RUN_MODE").MustString("prod")
|
||||||
}
|
}
|
||||||
IsProd = strings.EqualFold(RunMode, "prod")
|
IsProd = strings.EqualFold(RunMode, "prod")
|
||||||
// Does not check run user when the install lock is off.
|
|
||||||
installLock := rootCfg.Section("security").Key("INSTALL_LOCK").MustBool(false)
|
|
||||||
if installLock {
|
|
||||||
currentUser, match := IsRunUserMatchCurrentUser(RunUser)
|
|
||||||
if !match {
|
|
||||||
log.Fatal("Expect user '%s' but current user is: %s", RunUser, currentUser)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if we run as root
|
// check if we run as root
|
||||||
if os.Getuid() == 0 {
|
if os.Getuid() == 0 {
|
||||||
@@ -333,6 +328,17 @@ func loadRunModeFrom(rootCfg ConfigProvider) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func mustCurrentRunUserMatch(rootCfg ConfigProvider) {
|
||||||
|
// Does not check run user when the "InstallLock" is off.
|
||||||
|
installLock := rootCfg.Section("security").Key("INSTALL_LOCK").MustBool(false)
|
||||||
|
if installLock {
|
||||||
|
currentUser, match := IsRunUserMatchCurrentUser(RunUser)
|
||||||
|
if !match {
|
||||||
|
log.Fatal("Expect user '%s' but current user is: %s", RunUser, currentUser)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CreateOrAppendToCustomConf creates or updates the custom config.
|
// CreateOrAppendToCustomConf creates or updates the custom config.
|
||||||
// Use the callback to set individual values.
|
// Use the callback to set individual values.
|
||||||
func CreateOrAppendToCustomConf(purpose string, callback func(cfg *ini.File)) {
|
func CreateOrAppendToCustomConf(purpose string, callback func(cfg *ini.File)) {
|
||||||
|
|||||||
@@ -1310,7 +1310,10 @@ issues.filter_label = Label
|
|||||||
issues.filter_label_exclude = `Use <code>alt</code> + <code>click/enter</code> to exclude labels`
|
issues.filter_label_exclude = `Use <code>alt</code> + <code>click/enter</code> to exclude labels`
|
||||||
issues.filter_label_no_select = All labels
|
issues.filter_label_no_select = All labels
|
||||||
issues.filter_milestone = Milestone
|
issues.filter_milestone = Milestone
|
||||||
issues.filter_milestone_no_select = All milestones
|
issues.filter_milestone_all = All milestones
|
||||||
|
issues.filter_milestone_none = No milestones
|
||||||
|
issues.filter_milestone_open = Open milestones
|
||||||
|
issues.filter_milestone_closed = Closed milestones
|
||||||
issues.filter_project = Project
|
issues.filter_project = Project
|
||||||
issues.filter_project_all = All projects
|
issues.filter_project_all = All projects
|
||||||
issues.filter_project_none = No project
|
issues.filter_project_none = No project
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ func CreateFork(ctx *context.APIContext) {
|
|||||||
Description: repo.Description,
|
Description: repo.Description,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if repo_model.IsErrReachLimitOfRepo(err) || repo_model.IsErrRepoAlreadyExist(err) {
|
if repo_service.IsErrForkAlreadyExist(err) || repo_model.IsErrRepoAlreadyExist(err) || repo_model.IsErrReachLimitOfRepo(err) {
|
||||||
ctx.Error(http.StatusConflict, "ForkRepository", err)
|
ctx.Error(http.StatusConflict, "ForkRepository", err)
|
||||||
} else {
|
} else {
|
||||||
ctx.Error(http.StatusInternalServerError, "ForkRepository", err)
|
ctx.Error(http.StatusInternalServerError, "ForkRepository", err)
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
|
|||||||
pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5)
|
pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5)
|
||||||
|
|
||||||
var mileIDs []int64
|
var mileIDs []int64
|
||||||
if milestoneID > 0 {
|
if milestoneID > 0 || milestoneID == db.NoConditionID { // -1 to get those issues which have no any milestone assigned
|
||||||
mileIDs = []int64{milestoneID}
|
mileIDs = []int64{milestoneID}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -438,14 +438,8 @@ func Issues(ctx *context.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var err error
|
renderMilestones(ctx)
|
||||||
// Get milestones
|
if ctx.Written() {
|
||||||
ctx.Data["Milestones"], _, err = issues_model.GetMilestones(issues_model.GetMilestonesOption{
|
|
||||||
RepoID: ctx.Repo.Repository.ID,
|
|
||||||
State: api.StateType(ctx.FormString("state")),
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
ctx.ServerError("GetAllRepoMilestones", err)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -454,6 +448,29 @@ func Issues(ctx *context.Context) {
|
|||||||
ctx.HTML(http.StatusOK, tplIssues)
|
ctx.HTML(http.StatusOK, tplIssues)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func renderMilestones(ctx *context.Context) {
|
||||||
|
// Get milestones
|
||||||
|
milestones, _, err := issues_model.GetMilestones(issues_model.GetMilestonesOption{
|
||||||
|
RepoID: ctx.Repo.Repository.ID,
|
||||||
|
State: api.StateAll,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ctx.ServerError("GetAllRepoMilestones", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
openMilestones, closedMilestones := issues_model.MilestoneList{}, issues_model.MilestoneList{}
|
||||||
|
for _, milestone := range milestones {
|
||||||
|
if milestone.IsClosed {
|
||||||
|
closedMilestones = append(closedMilestones, milestone)
|
||||||
|
} else {
|
||||||
|
openMilestones = append(openMilestones, milestone)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ctx.Data["OpenMilestones"] = openMilestones
|
||||||
|
ctx.Data["ClosedMilestones"] = closedMilestones
|
||||||
|
}
|
||||||
|
|
||||||
// RetrieveRepoMilestonesAndAssignees find all the milestones and assignees of a repository
|
// RetrieveRepoMilestonesAndAssignees find all the milestones and assignees of a repository
|
||||||
func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *repo_model.Repository) {
|
func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *repo_model.Repository) {
|
||||||
var err error
|
var err error
|
||||||
|
|||||||
@@ -1226,7 +1226,7 @@ func RegisterRoutes(m *web.Route) {
|
|||||||
}, repo.MustBeNotEmpty, reqRepoCodeReader, context.RepoRefByType(context.RepoRefTag, true))
|
}, repo.MustBeNotEmpty, reqRepoCodeReader, context.RepoRefByType(context.RepoRefTag, true))
|
||||||
m.Post("/tags/delete", repo.DeleteTag, reqSignIn,
|
m.Post("/tags/delete", repo.DeleteTag, reqSignIn,
|
||||||
repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoCodeWriter, context.RepoRef())
|
repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoCodeWriter, context.RepoRef())
|
||||||
}, reqSignIn, context.RepoAssignment, context.UnitTypes())
|
}, ignSignIn, context.RepoAssignment, context.UnitTypes())
|
||||||
|
|
||||||
// Releases
|
// Releases
|
||||||
m.Group("/{username}/{reponame}", func() {
|
m.Group("/{username}/{reponame}", func() {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Milestone -->
|
<!-- Milestone -->
|
||||||
<div class="ui {{if not .Milestones}}disabled{{end}} dropdown jump item">
|
<div class="ui {{if not (or .OpenMilestones .ClosedMilestones)}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.locale.Tr "repo.issues.filter_milestone"}}
|
{{.locale.Tr "repo.issues.filter_milestone"}}
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||||
@@ -73,9 +73,28 @@
|
|||||||
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
|
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
|
||||||
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestone"}}">
|
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestone"}}">
|
||||||
</div>
|
</div>
|
||||||
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_no_select"}}</a>
|
<div class="divider"></div>
|
||||||
{{range .Milestones}}
|
<a class="{{if not $.MilestoneID}}active selected {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone=0&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_all"}}</a>
|
||||||
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.Name}}</a>
|
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID -1}}active selected {{end}}{{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone=-1&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_milestone_none"}}</a>
|
||||||
|
{{if .OpenMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">{{.locale.Tr "repo.issues.filter_milestone_open"}}</div>
|
||||||
|
{{range .OpenMilestones}}
|
||||||
|
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
|
||||||
|
{{svg "octicon-milestone" 16 "mr-2"}}
|
||||||
|
{{.Name}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if .ClosedMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">{{.locale.Tr "repo.issues.filter_milestone_closed"}}</div>
|
||||||
|
{{range .ClosedMilestones}}
|
||||||
|
<a class="{{if $.MilestoneID}}{{if eq $.MilestoneID .ID}}active selected {{end}}{{end}}item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
|
||||||
|
{{svg "octicon-milestone" 16 "mr-2"}}
|
||||||
|
{{.Name}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
39
templates/repo/issue/milestone/select_menu.tmpl
Normal file
39
templates/repo/issue/milestone/select_menu.tmpl
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_milestone_title"}}</div>
|
||||||
|
{{if or .OpenMilestones .ClosedMilestones}}
|
||||||
|
<div class="ui icon search input">
|
||||||
|
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
|
||||||
|
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestones"}}">
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
{{end}}
|
||||||
|
<div class="no-select item">{{.locale.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||||
|
{{if and (not .OpenMilestones) (not .ClosedMilestones)}}
|
||||||
|
<div class="header" style="text-transform: none;font-size:14px;">
|
||||||
|
{{.locale.Tr "repo.issues.new.no_items"}}
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
{{if .OpenMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">
|
||||||
|
{{.locale.Tr "repo.issues.new.open_milestone"}}
|
||||||
|
</div>
|
||||||
|
{{range .OpenMilestones}}
|
||||||
|
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}">
|
||||||
|
{{svg "octicon-milestone" 16 "gt-mr-2"}}
|
||||||
|
{{.Name}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{if .ClosedMilestones}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="header">
|
||||||
|
{{.locale.Tr "repo.issues.new.closed_milestone"}}
|
||||||
|
</div>
|
||||||
|
{{range .ClosedMilestones}}
|
||||||
|
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}">
|
||||||
|
{{svg "octicon-milestone" 16 "gt-mr-2"}}
|
||||||
|
{{.Name}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
@@ -93,44 +93,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_milestone_title"}}</div>
|
{{template "repo/issue/milestone/select_menu" .}}
|
||||||
{{if or .OpenMilestones .ClosedMilestones}}
|
|
||||||
<div class="ui icon search input">
|
|
||||||
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
|
|
||||||
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestones"}}">
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="no-select item">{{.locale.Tr "repo.issues.new.clear_milestone"}}</div>
|
|
||||||
{{if and (not .OpenMilestones) (not .ClosedMilestones)}}
|
|
||||||
<div class="header" style="text-transform: none;font-size:14px;">
|
|
||||||
{{.locale.Tr "repo.issues.new.no_items"}}
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
{{if .OpenMilestones}}
|
|
||||||
<div class="divider"></div>
|
|
||||||
<div class="header">
|
|
||||||
{{.locale.Tr "repo.issues.new.open_milestone"}}
|
|
||||||
</div>
|
|
||||||
{{range .OpenMilestones}}
|
|
||||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}">
|
|
||||||
{{svg "octicon-milestone" 16 "gt-mr-2"}}
|
|
||||||
{{.Name}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if .ClosedMilestones}}
|
|
||||||
<div class="divider"></div>
|
|
||||||
<div class="header">
|
|
||||||
{{.locale.Tr "repo.issues.new.closed_milestone"}}
|
|
||||||
</div>
|
|
||||||
{{range .ClosedMilestones}}
|
|
||||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}">
|
|
||||||
{{svg "octicon-milestone" 16 "gt-mr-2"}}
|
|
||||||
{{.Name}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui select-milestone list">
|
<div class="ui select-milestone list">
|
||||||
|
|||||||
@@ -161,44 +161,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</a>
|
</a>
|
||||||
<div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone">
|
<div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone">
|
||||||
<div class="header" style="text-transform: none;font-size:16px;">{{.locale.Tr "repo.issues.new.add_milestone_title"}}</div>
|
{{template "repo/issue/milestone/select_menu" .}}
|
||||||
{{if or .OpenMilestones .ClosedMilestones}}
|
|
||||||
<div class="ui icon search input">
|
|
||||||
<i class="icon gt-df gt-ac gt-jc">{{svg "octicon-search" 16}}</i>
|
|
||||||
<input type="text" placeholder="{{.locale.Tr "repo.issues.filter_milestones"}}">
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="no-select item">{{.locale.Tr "repo.issues.new.clear_milestone"}}</div>
|
|
||||||
{{if and (not .OpenMilestones) (not .ClosedMilestones)}}
|
|
||||||
<div class="header" style="text-transform: none;font-size:14px;">
|
|
||||||
{{.locale.Tr "repo.issues.new.no_items"}}
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
{{if .OpenMilestones}}
|
|
||||||
<div class="divider"></div>
|
|
||||||
<div class="header">
|
|
||||||
{{.locale.Tr "repo.issues.new.open_milestone"}}
|
|
||||||
</div>
|
|
||||||
{{range .OpenMilestones}}
|
|
||||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}">
|
|
||||||
{{svg "octicon-milestone" 16 "gt-mr-2"}}
|
|
||||||
{{.Name}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if .ClosedMilestones}}
|
|
||||||
<div class="divider"></div>
|
|
||||||
<div class="header">
|
|
||||||
{{.locale.Tr "repo.issues.new.closed_milestone"}}
|
|
||||||
</div>
|
|
||||||
{{range .ClosedMilestones}}
|
|
||||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}">
|
|
||||||
{{svg "octicon-milestone" 16 "gt-mr-2"}}
|
|
||||||
{{.Name}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui select-milestone list">
|
<div class="ui select-milestone list">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="ui container user-cards">
|
<div class="user-cards">
|
||||||
{{if .CardsTitle}}
|
{{if .CardsTitle}}
|
||||||
<h2 class="ui dividing header">
|
<h2 class="ui dividing header">
|
||||||
{{.CardsTitle}}
|
{{.CardsTitle}}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div role="main" aria-label="{{.Title}}" class="page-content repository watchers">
|
<div role="main" aria-label="{{.Title}}" class="page-content repository watchers">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
{{template "repo/user_cards" .}}
|
<div class="ui container">
|
||||||
|
{{template "repo/user_cards" .}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const baseOptions = {
|
|||||||
overviewRulerLanes: 0,
|
overviewRulerLanes: 0,
|
||||||
renderLineHighlight: 'all',
|
renderLineHighlight: 'all',
|
||||||
renderLineHighlightOnlyWhenFocus: true,
|
renderLineHighlightOnlyWhenFocus: true,
|
||||||
renderWhitespace: 'none',
|
|
||||||
rulers: false,
|
rulers: false,
|
||||||
scrollbar: {horizontalScrollbarSize: 6, verticalScrollbarSize: 6},
|
scrollbar: {horizontalScrollbarSize: 6, verticalScrollbarSize: 6},
|
||||||
scrollBeyondLastLine: false,
|
scrollBeyondLastLine: false,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user