mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Refactor project templates (#26448)
This PR refactors a bunch of projects-related code, mostly the templates. The following things were done: - rename boards to columns in frontend code - use the new `ctx.Locale.Tr` method - cleanup template, remove useless newlines, classes, comments - merge org-/user and repo level project template together - move "new column" button into project toolbar - move issue card (shared by projects and pinned issues) to shared template, remove useless duplicated styles - add search function to projects (to make the layout more similar to milestones list where it is inherited from 😆) - maybe more changes I forgot I've done 😆 Closes #24893 After:    --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
74930b1ccd
commit
ab78c39e41
16 changed files with 345 additions and 668 deletions
|
@ -198,6 +198,7 @@ type SearchOptions struct {
|
|||
IsClosed util.OptionalBool
|
||||
OrderBy db.SearchOrderBy
|
||||
Type Type
|
||||
Title string
|
||||
}
|
||||
|
||||
func (opts *SearchOptions) toConds() builder.Cond {
|
||||
|
@ -218,6 +219,10 @@ func (opts *SearchOptions) toConds() builder.Cond {
|
|||
if opts.OwnerID > 0 {
|
||||
cond = cond.And(builder.Eq{"owner_id": opts.OwnerID})
|
||||
}
|
||||
|
||||
if len(opts.Title) != 0 {
|
||||
cond = cond.And(db.BuildCaseInsensitiveLike("title", opts.Title))
|
||||
}
|
||||
return cond
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue