You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wxiaoguang fdbd646113
Group template helper functions, remove `Printf`, improve template error messages (#23982)
Follow #23328 


Major changes:

* Group the function in `templates/help.go` by their purposes. It could
make future work easier.
* Remove the `Printf` helper function, there is already a builtin
`printf`.
* Remove `DiffStatsWidth`, replace with `Eval` in template
* Rename the `NewTextFuncMap` to `mailSubjectTextFuncMap`, it's for
subject text template only, no need to make it support HTML functions.


----

And fine tune template error messages, to make it more friendly to
developers and users.


![image](https://user-images.githubusercontent.com/2114189/230714245-4fd202d1-2b25-41b2-8be5-03c5fee45091.png)


![image](https://user-images.githubusercontent.com/2114189/230714277-66783577-2a03-49d5-8e8c-ceba5e07a2d4.png)

---------

Co-authored-by: silverwind <me@silverwind.io>
1 year ago
..
admin Clean template/helper.go (#23922) 1 year ago
auth Group template helper functions, remove `Printf`, improve template error messages (#23982) 1 year ago
devtest Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 1 year ago
events Implement FSFE REUSE for golang files (#21840) 2 years ago
explore Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (#23766) 1 year ago
feed User/Org Feed render description as per web (#23887) 1 year ago
healthcheck Refactor `setting.Database.UseXXX` to methods (#23354) 1 year ago
misc Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 1 year ago
org Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 1 year ago
repo Fix redirect bug when creating issue from a project (#23971) 1 year ago
shared Add missing tabs to org projects page (#22705) 1 year ago
user Fix profile page email display, respect settings (#23747) 1 year ago
auth.go Implement FSFE REUSE for golang files (#21840) 2 years ago
auth_windows.go Implement FSFE REUSE for golang files (#21840) 2 years ago
base.go Introduce path Clean/Join helper functions (#23495) 1 year ago
goget.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
home.go Implement FSFE REUSE for golang files (#21840) 2 years ago
metrics.go Implement FSFE REUSE for golang files (#21840) 2 years ago
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
swagger_json.go Group template helper functions, remove `Printf`, improve template error messages (#23982) 1 year ago
web.go Support "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... (#23874) 1 year ago
webfinger.go Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) 1 year ago