UI: basci issue list without filters
- fix isRead check - fix paging
This commit is contained in:
parent
4447a20f87
commit
86dbda0b42
16 changed files with 95 additions and 164 deletions
22
cmd/web.go
22
cmd/web.go
|
@ -416,14 +416,18 @@ func runWeb(ctx *cli.Context) {
|
||||||
m.Post("/:index/milestone", repo.UpdateIssueMilestone)
|
m.Post("/:index/milestone", repo.UpdateIssueMilestone)
|
||||||
m.Post("/:index/assignee", repo.UpdateAssignee)
|
m.Post("/:index/assignee", repo.UpdateAssignee)
|
||||||
m.Get("/:index/attachment/:id", repo.IssueGetAttachment)
|
m.Get("/:index/attachment/:id", repo.IssueGetAttachment)
|
||||||
m.Post("/labels/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
|
})
|
||||||
m.Post("/labels/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
|
m.Group("/labels", func() {
|
||||||
m.Post("/labels/delete", repo.DeleteLabel)
|
m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
|
||||||
m.Get("/milestones/new", repo.NewMilestone)
|
m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
|
||||||
m.Post("/milestones/new", bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost)
|
m.Post("/delete", repo.DeleteLabel)
|
||||||
m.Get("/milestones/:index/edit", repo.UpdateMilestone)
|
})
|
||||||
m.Post("/milestones/:index/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.UpdateMilestonePost)
|
m.Group("/milestones", func() {
|
||||||
m.Get("/milestones/:index/:action", repo.UpdateMilestone)
|
m.Get("/new", repo.NewMilestone)
|
||||||
|
m.Post("/new", bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost)
|
||||||
|
m.Get("/:index/edit", repo.UpdateMilestone)
|
||||||
|
m.Post("/:index/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.UpdateMilestonePost)
|
||||||
|
m.Get("/:index/:action", repo.UpdateMilestone)
|
||||||
})
|
})
|
||||||
|
|
||||||
m.Post("/comment/:action", repo.Comment)
|
m.Post("/comment/:action", repo.Comment)
|
||||||
|
@ -440,7 +444,7 @@ func runWeb(ctx *cli.Context) {
|
||||||
m.Get("/releases", middleware.RepoRef(), repo.Releases)
|
m.Get("/releases", middleware.RepoRef(), repo.Releases)
|
||||||
m.Get("/issues", repo.Issues)
|
m.Get("/issues", repo.Issues)
|
||||||
m.Get("/issues/:index", repo.ViewIssue)
|
m.Get("/issues/:index", repo.ViewIssue)
|
||||||
m.Get("/issues/milestones", repo.Milestones)
|
m.Get("/milestones", repo.Milestones)
|
||||||
m.Get("/pulls", repo.Pulls)
|
m.Get("/pulls", repo.Pulls)
|
||||||
m.Get("/branches", repo.Branches)
|
m.Get("/branches", repo.Branches)
|
||||||
m.Get("/archive/*", repo.Download)
|
m.Get("/archive/*", repo.Download)
|
||||||
|
|
|
@ -369,6 +369,8 @@ issues.filter_type.assigned_to_you = Assigned to you
|
||||||
issues.filter_type.created_by_you = Created by you
|
issues.filter_type.created_by_you = Created by you
|
||||||
issues.filter_type.mentioning_you = Mentioning you
|
issues.filter_type.mentioning_you = Mentioning you
|
||||||
issues.opened_by = opened %s by <a href="/%[2]s">%[2]s</a>
|
issues.opened_by = opened %s by <a href="/%[2]s">%[2]s</a>
|
||||||
|
issues.previous = Previous Page
|
||||||
|
issues.next = Next Page
|
||||||
|
|
||||||
settings = Settings
|
settings = Settings
|
||||||
settings.options = Options
|
settings.options = Options
|
||||||
|
|
|
@ -17,6 +17,7 @@ import (
|
||||||
"github.com/go-xorm/xorm"
|
"github.com/go-xorm/xorm"
|
||||||
|
|
||||||
"github.com/gogits/gogs/modules/log"
|
"github.com/gogits/gogs/modules/log"
|
||||||
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -114,19 +115,14 @@ func (i *Issue) AfterDelete() {
|
||||||
// CreateIssue creates new issue for repository.
|
// CreateIssue creates new issue for repository.
|
||||||
func NewIssue(issue *Issue) (err error) {
|
func NewIssue(issue *Issue) (err error) {
|
||||||
sess := x.NewSession()
|
sess := x.NewSession()
|
||||||
defer sess.Close()
|
defer sessionRelease(sess)
|
||||||
if err = sess.Begin(); err != nil {
|
if err = sess.Begin(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err = sess.Insert(issue); err != nil {
|
if _, err = sess.Insert(issue); err != nil {
|
||||||
sess.Rollback()
|
|
||||||
return err
|
return err
|
||||||
}
|
} else if _, err = sess.Exec("UPDATE `repository` SET num_issues = num_issues + 1 WHERE id = ?", issue.RepoId); err != nil {
|
||||||
|
|
||||||
rawSql := "UPDATE `repository` SET num_issues = num_issues + 1 WHERE id = ?"
|
|
||||||
if _, err = sess.Exec(rawSql, issue.RepoId); err != nil {
|
|
||||||
sess.Rollback()
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +187,7 @@ func GetIssueById(id int64) (*Issue, error) {
|
||||||
|
|
||||||
// GetIssues returns a list of issues by given conditions.
|
// GetIssues returns a list of issues by given conditions.
|
||||||
func GetIssues(uid, rid, pid, mid int64, page int, isClosed bool, labelIds, sortType string) ([]Issue, error) {
|
func GetIssues(uid, rid, pid, mid int64, page int, isClosed bool, labelIds, sortType string) ([]Issue, error) {
|
||||||
sess := x.Limit(20, (page-1)*20)
|
sess := x.Limit(setting.IssuePagingNum, (page-1)*setting.IssuePagingNum)
|
||||||
|
|
||||||
if rid > 0 {
|
if rid > 0 {
|
||||||
sess.Where("repo_id=?", rid).And("is_closed=?", isClosed)
|
sess.Where("repo_id=?", rid).And("is_closed=?", isClosed)
|
||||||
|
@ -211,9 +207,8 @@ func GetIssues(uid, rid, pid, mid int64, page int, isClosed bool, labelIds, sort
|
||||||
|
|
||||||
if len(labelIds) > 0 {
|
if len(labelIds) > 0 {
|
||||||
for _, label := range strings.Split(labelIds, ",") {
|
for _, label := range strings.Split(labelIds, ",") {
|
||||||
// Prevent SQL inject.
|
|
||||||
if com.StrTo(label).MustInt() > 0 {
|
if com.StrTo(label).MustInt() > 0 {
|
||||||
sess.And("label_ids like '%$" + label + "|%'")
|
sess.And("label_ids like ?", "'%$"+label+"|%'")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,8 +231,7 @@ func GetIssues(uid, rid, pid, mid int64, page int, isClosed bool, labelIds, sort
|
||||||
}
|
}
|
||||||
|
|
||||||
var issues []Issue
|
var issues []Issue
|
||||||
err := sess.Find(&issues)
|
return issues, sess.Find(&issues)
|
||||||
return issues, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type IssueStatus int
|
type IssueStatus int
|
||||||
|
@ -281,6 +275,7 @@ type IssueUser struct {
|
||||||
IsClosed bool
|
IsClosed bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: organization
|
||||||
// NewIssueUserPairs adds new issue-user pairs for new issue of repository.
|
// NewIssueUserPairs adds new issue-user pairs for new issue of repository.
|
||||||
func NewIssueUserPairs(repo *Repository, issueID, orgID, posterID, assigneeID int64) error {
|
func NewIssueUserPairs(repo *Repository, issueID, orgID, posterID, assigneeID int64) error {
|
||||||
users, err := repo.GetCollaborators()
|
users, err := repo.GetCollaborators()
|
||||||
|
@ -316,13 +311,24 @@ func NewIssueUserPairs(repo *Repository, issueID, orgID, posterID, assigneeID in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add owner's as well.
|
||||||
|
if repo.OwnerId != posterID {
|
||||||
|
iu.Id = 0
|
||||||
|
iu.Uid = repo.OwnerId
|
||||||
|
iu.IsAssigned = iu.Uid == assigneeID
|
||||||
|
if _, err = x.Insert(iu); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// PairsContains returns true when pairs list contains given issue.
|
// PairsContains returns true when pairs list contains given issue.
|
||||||
func PairsContains(ius []*IssueUser, issueId int64) int {
|
func PairsContains(ius []*IssueUser, issueId, uid int64) int {
|
||||||
for i := range ius {
|
for i := range ius {
|
||||||
if ius[i].IssueId == issueId {
|
if ius[i].IssueId == issueId &&
|
||||||
|
ius[i].Uid == uid {
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -82,8 +82,9 @@ var (
|
||||||
}
|
}
|
||||||
|
|
||||||
// Repository settings.
|
// Repository settings.
|
||||||
RepoRootPath string
|
RepoRootPath string
|
||||||
ScriptType string
|
ScriptType string
|
||||||
|
IssuePagingNum int = 10
|
||||||
|
|
||||||
// Picture settings.
|
// Picture settings.
|
||||||
PictureService string
|
PictureService string
|
||||||
|
|
2
public/css/gogs.min.css
vendored
2
public/css/gogs.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -35,7 +35,7 @@ function initInstall() {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// Semantic UI modules.
|
// Semantic UI modules.
|
||||||
$('.dropdown').dropdown();
|
$('.dropdown').dropdown();
|
||||||
$('.link.dropdown').dropdown({
|
$('.jump.dropdown').dropdown({
|
||||||
action: 'hide'
|
action: 'hide'
|
||||||
});
|
});
|
||||||
$('.slide.up.dropdown').dropdown({
|
$('.slide.up.dropdown').dropdown({
|
||||||
|
|
|
@ -52,8 +52,9 @@
|
||||||
.issue.list {
|
.issue.list {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding-top: 60px;
|
padding-top: 45px;
|
||||||
.item {
|
.item {
|
||||||
|
padding-top: 15px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
border-bottom: 1px dashed #AAA;
|
border-bottom: 1px dashed #AAA;
|
||||||
.title {
|
.title {
|
||||||
|
@ -74,5 +75,8 @@
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.page.buttons {
|
||||||
|
padding-top: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -43,8 +43,6 @@ var (
|
||||||
func Issues(ctx *middleware.Context) {
|
func Issues(ctx *middleware.Context) {
|
||||||
ctx.Data["Title"] = ctx.Tr("repo.issues")
|
ctx.Data["Title"] = ctx.Tr("repo.issues")
|
||||||
ctx.Data["PageIsIssueList"] = true
|
ctx.Data["PageIsIssueList"] = true
|
||||||
ctx.Data["IsRepoToolbarIssues"] = true
|
|
||||||
ctx.Data["IsRepoToolbarIssuesList"] = true
|
|
||||||
|
|
||||||
viewType := ctx.Query("type")
|
viewType := ctx.Query("type")
|
||||||
types := []string{"assigned", "created_by", "mentioned"}
|
types := []string{"assigned", "created_by", "mentioned"}
|
||||||
|
@ -54,6 +52,7 @@ func Issues(ctx *middleware.Context) {
|
||||||
|
|
||||||
isShowClosed := ctx.Query("state") == "closed"
|
isShowClosed := ctx.Query("state") == "closed"
|
||||||
|
|
||||||
|
// Must sign in to see issues about you.
|
||||||
if viewType != "all" && !ctx.IsSigned {
|
if viewType != "all" && !ctx.IsSigned {
|
||||||
ctx.SetCookie("redirect_to", "/"+url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl)
|
ctx.SetCookie("redirect_to", "/"+url.QueryEscape(setting.AppSubUrl+ctx.Req.RequestURI), 0, setting.AppSubUrl)
|
||||||
ctx.Redirect(setting.AppSubUrl + "/user/login")
|
ctx.Redirect(setting.AppSubUrl + "/user/login")
|
||||||
|
@ -73,21 +72,23 @@ func Issues(ctx *middleware.Context) {
|
||||||
filterMode = models.FM_MENTION
|
filterMode = models.FM_MENTION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repo := ctx.Repo.Repository
|
||||||
|
|
||||||
var mid int64
|
var mid int64
|
||||||
midx, _ := com.StrTo(ctx.Query("milestone")).Int64()
|
midx := ctx.QueryInt64("milestone")
|
||||||
if midx > 0 {
|
if midx > 0 {
|
||||||
mile, err := models.GetMilestoneByIndex(ctx.Repo.Repository.Id, midx)
|
mile, err := models.GetMilestoneByIndex(repo.Id, midx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "issue.Issues(GetMilestoneByIndex): %v", err)
|
ctx.Handle(500, "GetMilestoneByIndex: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
mid = mile.Id
|
mid = mile.Id
|
||||||
}
|
}
|
||||||
|
|
||||||
selectLabels := ctx.Query("labels")
|
selectLabels := ctx.Query("labels")
|
||||||
labels, err := models.GetLabels(ctx.Repo.Repository.Id)
|
labels, err := models.GetLabels(repo.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "issue.Issues(GetLabels): %v", err)
|
ctx.Handle(500, "GetLabels: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, l := range labels {
|
for _, l := range labels {
|
||||||
|
@ -95,20 +96,29 @@ func Issues(ctx *middleware.Context) {
|
||||||
}
|
}
|
||||||
ctx.Data["Labels"] = labels
|
ctx.Data["Labels"] = labels
|
||||||
|
|
||||||
page, _ := com.StrTo(ctx.Query("page")).Int()
|
page := ctx.QueryInt("page")
|
||||||
|
if page <= 1 {
|
||||||
|
page = 1
|
||||||
|
} else {
|
||||||
|
ctx.Data["PreviousPage"] = page - 1
|
||||||
|
}
|
||||||
|
if (!isShowClosed && repo.NumOpenIssues > setting.IssuePagingNum*page) ||
|
||||||
|
(isShowClosed && repo.NumClosedIssues > setting.IssuePagingNum*page) {
|
||||||
|
ctx.Data["NextPage"] = page + 1
|
||||||
|
}
|
||||||
|
|
||||||
// Get issues.
|
// Get issues.
|
||||||
issues, err := models.GetIssues(assigneeId, ctx.Repo.Repository.Id, posterId, mid, page,
|
issues, err := models.GetIssues(assigneeId, repo.Id, posterId, mid, page,
|
||||||
isShowClosed, selectLabels, ctx.Query("sortType"))
|
isShowClosed, selectLabels, ctx.Query("sortType"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "issue.Issues(GetIssues): %v", err)
|
ctx.Handle(500, "GetIssues: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get issue-user pairs.
|
// Get issue-user pairs.
|
||||||
pairs, err := models.GetIssueUserPairs(ctx.Repo.Repository.Id, posterId, isShowClosed)
|
pairs, err := models.GetIssueUserPairs(repo.Id, posterId, isShowClosed)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(500, "issue.Issues(GetIssueUserPairs): %v", err)
|
ctx.Handle(500, "GetIssueUserPairs: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +129,7 @@ func Issues(ctx *middleware.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
idx := models.PairsContains(pairs, issues[i].Id)
|
idx := models.PairsContains(pairs, issues[i].Id, ctx.User.Id)
|
||||||
|
|
||||||
if filterMode == models.FM_MENTION && (idx == -1 || !pairs[idx].IsMentioned) {
|
if filterMode == models.FM_MENTION && (idx == -1 || !pairs[idx].IsMentioned) {
|
||||||
continue
|
continue
|
||||||
|
@ -132,7 +142,7 @@ func Issues(ctx *middleware.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = issues[i].GetPoster(); err != nil {
|
if err = issues[i].GetPoster(); err != nil {
|
||||||
ctx.Handle(500, "issue.Issues(GetPoster)", fmt.Errorf("[#%d]%v", issues[i].Id, err))
|
ctx.Handle(500, "GetPoster", fmt.Errorf("[#%d]%v", issues[i].Id, err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,9 +151,9 @@ func Issues(ctx *middleware.Context) {
|
||||||
if ctx.User != nil {
|
if ctx.User != nil {
|
||||||
uid = ctx.User.Id
|
uid = ctx.User.Id
|
||||||
}
|
}
|
||||||
issueStats := models.GetIssueStats(ctx.Repo.Repository.Id, uid, isShowClosed, filterMode)
|
issueStats := models.GetIssueStats(repo.Id, uid, isShowClosed, filterMode)
|
||||||
ctx.Data["IssueStats"] = issueStats
|
ctx.Data["IssueStats"] = issueStats
|
||||||
ctx.Data["SelectLabels"], _ = com.StrTo(selectLabels).Int64()
|
ctx.Data["SelectLabels"] = com.StrTo(selectLabels).MustInt64()
|
||||||
ctx.Data["ViewType"] = viewType
|
ctx.Data["ViewType"] = viewType
|
||||||
ctx.Data["Issues"] = issues
|
ctx.Data["Issues"] = issues
|
||||||
ctx.Data["IsShowClosed"] = isShowClosed
|
ctx.Data["IsShowClosed"] = isShowClosed
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<img class="img-15" src="{{.SignedUser.AvatarLink}}"/>
|
<img class="img-15" src="{{.SignedUser.AvatarLink}}"/>
|
||||||
<span class="sr-only">{{.SignedUser.Name}}</span>
|
<span class="sr-only">{{.SignedUser.Name}}</span>
|
||||||
</a>
|
</a>
|
||||||
<div class="ui pointing dropdown head link item">
|
<div class="ui pointing dropdown head link jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<i class="octicon octicon-plus"></i>
|
<i class="octicon octicon-plus"></i>
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui right floated secondary filter menu">
|
<div class="ui right floated secondary filter menu">
|
||||||
<div class="ui {{if not .Labels}}disabled{{end}} pointing dropdown item">
|
<div class="ui {{if not .Labels}}disabled{{end}} pointing dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.issues.filter_label"}}
|
{{.i18n.Tr "repo.issues.filter_label"}}
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui {{if not .Milestones}}disabled{{end}} pointing dropdown item">
|
<div class="ui {{if not .Milestones}}disabled{{end}} pointing dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.issues.filter_milestone"}}
|
{{.i18n.Tr "repo.issues.filter_milestone"}}
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui {{if not .Assignees}}disabled{{end}} pointing dropdown item">
|
<div class="ui {{if not .Assignees}}disabled{{end}} pointing dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.issues.filter_assignee"}}
|
{{.i18n.Tr "repo.issues.filter_assignee"}}
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui pointing dropdown type item">
|
<div class="ui pointing dropdown type jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.issues.filter_type"}}
|
{{.i18n.Tr "repo.issues.filter_type"}}
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
|
@ -73,12 +73,17 @@
|
||||||
{{range .Issues}}
|
{{range .Issues}}
|
||||||
{{ $timeStr:= TimeSince .Created $.Lang }}
|
{{ $timeStr:= TimeSince .Created $.Lang }}
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<div class="ui black label">#{{.Id}}</div>
|
<div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Id}}</div>
|
||||||
<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a>
|
<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a>
|
||||||
<p class="desc">{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.Name|Str2html}}</p>
|
|
||||||
{{if .NumComments}}<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>{{end}}
|
{{if .NumComments}}<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>{{end}}
|
||||||
|
<p class="desc">{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.Name|Str2html}}</p>
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
<div class="center page buttons">
|
||||||
|
<a class="ui {{if not .PreviousPage}}disabled{{end}} blue button" href="{{.RepoLink}}/issues?page={{.PreviousPage}}">{{.i18n.Tr "repo.issues.previous"}}</a>
|
||||||
|
<a class="ui {{if not .NextPage}}disabled{{end}} blue button" href="{{.RepoLink}}/issues?page={{.NextPage}}">{{.i18n.Tr "repo.issues.next"}}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
<div id="issue">
|
<div id="issue">
|
||||||
<div class="col-md-3 filter-list">
|
<div class="col-md-3 filter-list">
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li><a href="{{.RepoLink}}/issues/milestones"{{if eq .State "open"}} class="active"{{end}}>Open Milestones <strong class="pull-right">{{.Repository.NumOpenMilestones}}</strong></a></li>
|
<li><a href="{{.RepoLink}}/milestones"{{if eq .State "open"}} class="active"{{end}}>Open Milestones <strong class="pull-right">{{.Repository.NumOpenMilestones}}</strong></a></li>
|
||||||
<li><a href="{{.RepoLink}}/issues/milestones?state=closed"{{if eq .State "closed"}} class="active"{{end}}>Close Milestones <strong class="pull-right">{{.Repository.NumClosedMilestones}}</strong></a></li>
|
<li><a href="{{.RepoLink}}/milestones?state=closed"{{if eq .State "closed"}} class="active"{{end}}>Close Milestones <strong class="pull-right">{{.Repository.NumClosedMilestones}}</strong></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<hr/>
|
<hr/>
|
||||||
<a href="{{.RepoLink}}/issues/milestones/new" class="text-center">
|
<a href="{{.RepoLink}}/milestones/new" class="text-center">
|
||||||
<button class="btn btn-default btn-block">Create new milestone</button>
|
<button class="btn btn-default btn-block">Create new milestone</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,13 +22,13 @@
|
||||||
<span class="issue-open label label-success">{{.NumOpenIssues}}</span>
|
<span class="issue-open label label-success">{{.NumOpenIssues}}</span>
|
||||||
<span class="issue-close label label-warning">{{.NumClosedIssues}}</span>
|
<span class="issue-close label label-warning">{{.NumClosedIssues}}</span>
|
||||||
<p class="actions pull-right">
|
<p class="actions pull-right">
|
||||||
<a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/edit">Edit</a>
|
<a href="{{$.RepoLink}}/milestones/{{.Index}}/edit">Edit</a>
|
||||||
{{if .IsClosed}}
|
{{if .IsClosed}}
|
||||||
<a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/open">Open</a>
|
<a href="{{$.RepoLink}}/milestones/{{.Index}}/open">Open</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/close">Close</a>
|
<a href="{{$.RepoLink}}/milestones/{{.Index}}/close">Close</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="text-danger" href="{{$.RepoLink}}/issues/milestones/{{.Index}}/delete">Delete</a>
|
<a class="text-danger" href="{{$.RepoLink}}/milestones/{{.Index}}/delete">Delete</a>
|
||||||
<a href="{{$.RepoLink}}/issues?milestone={{.Index}}{{if .IsClosed}}&state=closed{{end}}">Issues</a>
|
<a href="{{$.RepoLink}}/issues?milestone={{.Index}}{{if .IsClosed}}&state=closed{{end}}">Issues</a>
|
||||||
</p>
|
</p>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{template "repo/toolbar" .}}
|
{{template "repo/toolbar" .}}
|
||||||
<div id="body" class="container">
|
<div id="body" class="container">
|
||||||
<div id="issue">
|
<div id="issue">
|
||||||
<form class="form" action="{{.RepoLink}}/issues/milestones/{{.Milestone.Index}}/edit" method="post" id="issue-create-form">
|
<form class="form" action="{{.RepoLink}}/milestones/{{.Milestone.Index}}/edit" method="post" id="issue-create-form">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
{{template "base/alert" .}}
|
{{template "base/alert" .}}
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{template "repo/toolbar" .}}
|
{{template "repo/toolbar" .}}
|
||||||
<div id="body" class="container">
|
<div id="body" class="container">
|
||||||
<div id="issue">
|
<div id="issue">
|
||||||
<form class="form" action="{{.RepoLink}}/issues/milestones/new" method="post" id="issue-create-form">
|
<form class="form" action="{{.RepoLink}}/milestones/new" method="post" id="issue-create-form">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
{{template "base/alert" .}}
|
{{template "base/alert" .}}
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
|
|
|
@ -1,101 +0,0 @@
|
||||||
{{template "ng/base/head" .}}
|
|
||||||
{{template "ng/base/header" .}}
|
|
||||||
<div id="repo-wrapper">
|
|
||||||
{{template "repo/header_old" .}}
|
|
||||||
<div class="issue-main container repo-wide-wrapper">
|
|
||||||
<ul id="issue-list-nav" class="menu menu-line">
|
|
||||||
<li class="current"><a href="#">Issue</a></li>
|
|
||||||
<li><a href="#">Pull Request</a></li>
|
|
||||||
<li><a href="#">Labels</a></li>
|
|
||||||
<li><a href="#">Milestones</a></li>
|
|
||||||
<li class="right" id="issue-new"><a href="#"><button id="issue-new-btn" class="btn btn-green text-bold">New Issue</button></a></li>
|
|
||||||
<!--<li class="right"><a href="#">Filter</a></li>-->
|
|
||||||
</ul>
|
|
||||||
<div id="issue-list-container">
|
|
||||||
<div id="issue-list-menu">
|
|
||||||
<div class="left">
|
|
||||||
<span class="mark open hover"><a href="#">
|
|
||||||
<i class="octicon octicon-issue-opened"></i> 88 Open
|
|
||||||
</a></span>
|
|
||||||
<span class="mark close"><a href="">
|
|
||||||
<i class="octicon octicon-issue-closed"></i> 12 Close
|
|
||||||
</a></span>
|
|
||||||
</div>
|
|
||||||
<ul id="issue-list-filter" class="right menu menu-line">
|
|
||||||
<li class="down drop label-filter">
|
|
||||||
<a href="#">Labels</a>
|
|
||||||
<div class="drop-down">
|
|
||||||
<h4>Labels</h4>
|
|
||||||
<ul class="labels list-no-style">
|
|
||||||
<li class="no-label"><strong>no label</strong></li>
|
|
||||||
<li><a href="#"><span class="color"></span><span class="name">bug</span></a></li>
|
|
||||||
<li><a href="#"><span class="color"></span><span class="name">feature</span></a></li>
|
|
||||||
<li><a href="#"><span class="color"></span><span class="name">roadmap</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="down drop milestone-filter">
|
|
||||||
<a href="#">Milestones</a>
|
|
||||||
<div class="drop-down">
|
|
||||||
<h4>Milestones</h4>
|
|
||||||
<ul class="milestones list-no-style">
|
|
||||||
<li class="no-label"><strong>no milestone</strong></li>
|
|
||||||
<li><a href="#">v1</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<li class="down drop assignee-list">
|
|
||||||
<a href="#">Assignee</a>
|
|
||||||
<div class="drop-down">
|
|
||||||
aabbcc
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
<ul id="issue-list" class="list-no-style">
|
|
||||||
<li class="item" id="issue-id">
|
|
||||||
<a class="comment" href="#">
|
|
||||||
<i class="octicon octicon-comment"></i> 7
|
|
||||||
</a>
|
|
||||||
<p class="title text-bold">
|
|
||||||
<span class="label label-black index-num">#588</span>
|
|
||||||
<a href="#" class="title-text">Delete account text and/or translations missing</a>
|
|
||||||
<span class="label label-red issue-label"><a href="#">bug</a></span>
|
|
||||||
</p>
|
|
||||||
<p class="desc">opened 7 days ago by <a href="#">marcuspoehls</a></p>
|
|
||||||
</li>
|
|
||||||
<li class="item" id="issue-id2">
|
|
||||||
<a class="comment" href="#">
|
|
||||||
<i class="octicon octicon-comment"></i> 7
|
|
||||||
</a>
|
|
||||||
<p class="title text-bold">
|
|
||||||
<span class="label label-black index-num">#588</span>
|
|
||||||
<a href="#" class="title-text">Delete account text and/or translations missing</a>
|
|
||||||
<span class="label label-red issue-label"><a href="#">bug</a></span>
|
|
||||||
</p>
|
|
||||||
<p class="desc">opened 7 days ago by <a href="#">marcuspoehls</a></p>
|
|
||||||
</li>
|
|
||||||
<li class="item" id="issue-id3">
|
|
||||||
<a class="comment" href="#">
|
|
||||||
<i class="octicon octicon-comment"></i> 7
|
|
||||||
</a>
|
|
||||||
<p class="title text-bold">
|
|
||||||
<span class="label label-black index-num">#588</span>
|
|
||||||
<a href="#" class="title-text">Disabling attachments breaks issues and comments ajax submit</a>
|
|
||||||
<span class="label label-red issue-label"><a href="#">bug</a></span>
|
|
||||||
</p>
|
|
||||||
<p class="desc">opened 7 days ago by <a href="#">marcuspoehls</a></p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div id="issue-list-pager" class="pager text-center">
|
|
||||||
<a class="prev invalid" href="#">Prev</a>
|
|
||||||
<a class="page" href="#">1</a>
|
|
||||||
<a class="page hover" href="#">2</a>
|
|
||||||
<a class="page" href="#">3</a>
|
|
||||||
<a class="next" href="#">Next</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{template "ng/base/footer" .}}
|
|
|
@ -12,7 +12,7 @@
|
||||||
{{if .IsRepoToolbarIssues}}
|
{{if .IsRepoToolbarIssues}}
|
||||||
<li class="tmp">{{if .IsRepoToolbarIssuesList}}
|
<li class="tmp">{{if .IsRepoToolbarIssuesList}}
|
||||||
<a href="{{.RepoLink}}/issues/new"><button class="btn btn-primary btn-sm">New Issue</button></a>
|
<a href="{{.RepoLink}}/issues/new"><button class="btn btn-primary btn-sm">New Issue</button></a>
|
||||||
<a href="{{.RepoLink}}/issues/milestones"><button class="btn btn-success btn-sm">Milestones</button></a>
|
<a href="{{.RepoLink}}/milestones"><button class="btn btn-success btn-sm">Milestones</button></a>
|
||||||
{{end}}</li>
|
{{end}}</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
<li class="{{if .IsRepoToolbarReleases}}active{{end}}"><a href="{{.RepoLink}}/releases">{{if .Repository.NumTags}}<span class="badge">{{.Repository.NumTags}}</span> {{end}}Releases</a></li>
|
<li class="{{if .IsRepoToolbarReleases}}active{{end}}"><a href="{{.RepoLink}}/releases">{{if .Repository.NumTags}}<span class="badge">{{.Repository.NumTags}}</span> {{end}}Releases</a></li>
|
||||||
|
|
Reference in a new issue