forgejo/templates/repo
wxiaoguang 8820191476
Improve template helper functions: string/slice (#24266)
Follow #23328

The improvements:

1. The `contains` functions are covered by tests
2. The inconsistent behavior of `containGeneric` is replaced by
`StringUtils.Contains` and `SliceUtils.Contains`
3. In the future we can move more help functions into XxxUtils to
simplify the `helper.go` and reduce unnecessary global functions.

FAQ:

1. Why it's called `StringUtils.Contains` but not `strings.Contains`
like Golang?

Because our `StringUtils` is not Golang's `strings` package. There will
be our own string functions.

---------

Co-authored-by: silverwind <me@silverwind.io>
2023-04-22 14:16:22 -04:00
..
actions Add runner check in repo action page (#24124) 2023-04-19 20:51:20 +08:00
branch
cite
diff Fix issue attachment handling (#24202) 2023-04-20 02:39:44 -04:00
editor Allow adding new files to an empty repo (#24164) 2023-04-19 21:40:42 +08:00
find
graph Improve template helper functions: string/slice (#24266) 2023-04-22 14:16:22 -04:00
issue Improve template helper functions: string/slice (#24266) 2023-04-22 14:16:22 -04:00
migrate
projects Add unset default project column (#23531) 2023-04-19 10:28:28 -04:00
pulls
release Refactor locale number (#24134) 2023-04-17 11:37:23 +08:00
settings Improve template helper functions: string/slice (#24266) 2023-04-22 14:16:22 -04:00
wiki Make wiki title supports dashes and improve wiki name related features (#24143) 2023-04-19 13:50:10 -04:00
activity.tmpl
blame.tmpl
branch_dropdown.tmpl
clone_buttons.tmpl
clone_script.tmpl
commit_page.tmpl
commit_status.tmpl
commit_statuses.tmpl
commits.tmpl
commits_list.tmpl
commits_list_small.tmpl
commits_table.tmpl
create.tmpl
create_helper.tmpl
empty.tmpl Allow adding new files to an empty repo (#24164) 2023-04-19 21:40:42 +08:00
file_info.tmpl
forks.tmpl
graph.tmpl
header.tmpl Improve template helper functions: string/slice (#24266) 2023-04-22 14:16:22 -04:00
home.tmpl Allow adding new files to an empty repo (#24164) 2023-04-19 21:40:42 +08:00
icon.tmpl
packages.tmpl
search.tmpl
search_name.tmpl
shabox_badge.tmpl
sub_menu.tmpl Refactor locale number (#24134) 2023-04-17 11:37:23 +08:00
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl
view_file.tmpl
view_list.tmpl
watchers.tmpl