forked from forgejo/forgejo
milestone: create page
This commit is contained in:
parent
ce4dcf1e83
commit
3e4cdccf6b
76 changed files with 2883 additions and 3484 deletions
|
@ -640,6 +640,7 @@ type Milestone struct {
|
|||
Completeness int // Percentage(1-100).
|
||||
Deadline time.Time
|
||||
DeadlineString string `xorm:"-"`
|
||||
IsOverDue bool `xorm:"-"`
|
||||
ClosedDate time.Time
|
||||
}
|
||||
|
||||
|
@ -651,6 +652,9 @@ func (m *Milestone) BeforeSet(colName string, val xorm.Cell) {
|
|||
}
|
||||
|
||||
m.DeadlineString = t.Format("2006-01-02")
|
||||
if time.Now().After(t) {
|
||||
m.IsOverDue = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue