0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-20 04:50:08 +01:00
forgejo/modules
wxiaoguang fdbd646113
Group template helper functions, remove Printf, improve template error messages ()
Follow  


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>
2023-04-08 21:15:22 +08:00
..
actions Do not crash when parsing an invalid workflow file () 2023-04-07 20:12:10 +08:00
activitypub Add Chef package registry () 2023-02-06 09:49:21 +08:00
analyze
auth Fix various bugs for "install" page () 2023-03-04 10:12:02 +08:00
avatar Use minio/sha256-simd for accelerated SHA256 () 2023-02-22 14:21:46 -05:00
base Use a general Eval function for expressions in templates. () 2023-04-07 21:25:49 +08:00
cache Improve cache context () 2023-03-08 11:57:05 -06:00
charset Use data-tooltip-content for tippy tooltip () 2023-03-24 18:35:38 +08:00
container
context Group template helper functions, remove Printf, improve template error messages () 2023-04-08 21:15:22 +08:00
csv Add context when rendering labels or emojis () 2023-03-05 22:59:05 +01:00
doctor Check LFS/Packages settings in dump and doctor command () 2023-03-23 20:30:28 +08:00
emoji
eventsource
generate
git Remove Repository.getFilesChanged to fix Actions paths and paths-ignore filter () 2023-04-07 14:42:43 +08:00
gitgraph Add context cache as a request level cache () 2023-02-15 21:37:34 +08:00
graceful
hcaptcha
highlight test_env: hardcode major go version in use () 2023-03-14 16:09:01 -04:00
hostmatcher
html
httpcache Set X-Gitea-Debug header once () 2023-03-08 15:40:04 -05:00
httplib Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" () 2023-03-29 14:32:26 +08:00
indexer Add meilisearch support () 2023-03-28 22:23:23 -04:00
issue/template
json
label Reduce duplicate and useless code in options () 2023-03-08 17:31:27 +08:00
lfs Make minio package support legacy MD5 checksum () 2023-03-28 11:10:24 -04:00
log Improve trace logging for pulls and processes () 2023-02-03 18:11:48 -05:00
markup Append (comment) when a link points at a comment rather than the whole issue () 2023-04-03 16:02:57 +08:00
mcaptcha
metrics include build info in Prometheus metrics () 2023-02-08 19:54:01 +02:00
migration Scoped labels () 2023-02-18 21:17:39 +02:00
mirror
nosql
notification Implement actions () 2023-01-31 09:45:19 +08:00
options Introduce path Clean/Join helper functions () 2023-03-21 16:02:49 -04:00
packages Display image size for multiarch container images () 2023-04-02 17:53:37 +08:00
paginator
pprof
private Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" () 2023-03-29 14:32:26 +08:00
process Improve trace logging for pulls and processes () 2023-02-03 18:11:48 -05:00
proxy Use proxy for pull mirror () 2023-02-11 08:39:50 +08:00
proxyprotocol
public Fix incorrect CORS failure detection logic () 2023-03-31 11:35:48 -04:00
queue Properly flush unique queues on startup () 2023-02-28 17:55:43 -05:00
recaptcha
references Use correct captured group range when parsing cross-reference () 2023-01-31 10:08:05 +01:00
regexplru
repository Allow repo admins too to delete the repo () 2023-04-07 11:21:02 -04:00
secret Use minio/sha256-simd for accelerated SHA256 () 2023-02-22 14:21:46 -05:00
session Use Get/Set instead of Rename when Regenerate session id () 2023-04-07 18:11:24 +02:00
setting Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict () 2023-03-29 08:41:45 -05:00
sitemap
ssh
storage Make minio package support legacy MD5 checksum () 2023-03-28 11:10:24 -04:00
structs Add activity feeds API () 2023-04-04 21:35:31 +08:00
svg Keep (add if not existing) xmlns attribute for generated SVG images () 2023-03-21 13:39:27 +08:00
sync
system
templates Group template helper functions, remove Printf, improve template error messages () 2023-04-08 21:15:22 +08:00
test Group template helper functions, remove Printf, improve template error messages () 2023-04-08 21:15:22 +08:00
timeutil Use data-tooltip-content for tippy tooltip () 2023-03-24 18:35:38 +08:00
translation Append (comment) when a link points at a comment rather than the whole issue () 2023-04-03 16:02:57 +08:00
turnstile Add new captcha: cloudflare turnstile () 2023-02-05 15:29:03 +08:00
typesniffer Do not recognize text files as audio () 2023-03-07 22:40:41 -05:00
updatechecker
upload
uri
user
util Merge template functions "dict/Dict/mergeinto" () 2023-04-07 09:39:08 -05:00
validation Map OIDC groups to Orgs/Teams () 2023-02-08 14:44:42 +08:00
watcher
web Map OIDC groups to Orgs/Teams () 2023-02-08 14:44:42 +08:00
webhook