1
0
Fork 0
forgejo/modules
wxiaoguang 56ae853ca0
Simplify template helper functions (#24570)
To avoid bloating the template helper functions, some functions could be
provided by type methods.

And the new code `data-line-type="{{.GetHTMLDiffLineType}}"` reads
better than `data-line-type="{{DiffLineTypeToStr .GetType}}"`


After the fix, screenshots (the same as before):

<details>


![image](https://user-images.githubusercontent.com/2114189/236657918-20ce01e0-1192-443e-aeb4-6b3fe1aa2102.png)


![image](https://user-images.githubusercontent.com/2114189/236657950-ee19727f-a1fc-4133-afc7-e5d1a8c1783f.png)

</details>
2023-05-07 09:49:46 +00:00
..
actions show workflow config error on file view also (#24267) 2023-04-22 22:16:54 -04:00
activitypub
analyze
assetfs
auth
avatar
base
cache
charset Update go tool dependencies, restructure lint targets (#24239) 2023-04-22 14:53:00 -04:00
container
context Sort users and orgs on explore by recency by default (#24279) 2023-05-06 22:04:55 +08:00
csv
doctor Merge setting.InitXXX into one function with options (#24389) 2023-05-04 11:55:35 +08:00
emoji
eventsource
generate
git Faster git.GetDivergingCommits (#24482) 2023-05-04 05:08:41 +00:00
gitgraph
graceful
hcaptcha
highlight
hostmatcher
html
httpcache
httplib
indexer Refactor config provider (#24245) 2023-04-25 23:06:39 +08:00
issue/template
json
label
lfs Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
log Enable forbidigo linter (#24278) 2023-04-24 05:50:58 -04:00
markup Merge setting.InitXXX into one function with options (#24389) 2023-05-04 11:55:35 +08:00
mcaptcha
metrics
migration
mirror
nosql
notification
options
packages Add RPM registry (#23380) 2023-05-05 20:33:37 +00:00
paginator Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
pprof
private
process
proxy
proxyprotocol
public
queue Fix intermittent CI failure in EmptyQueue (#23753) 2023-05-03 21:37:30 -04:00
recaptcha
references
regexplru
repository Replace placeholders in licenses (#24354) 2023-05-05 13:46:17 +00:00
secret Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
session
setting Add RPM registry (#23380) 2023-05-05 20:33:37 +00:00
sitemap
ssh
storage Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
structs Add API for gitignore templates (#22783) 2023-04-27 11:51:20 +08:00
svg
sync
system
templates Simplify template helper functions (#24570) 2023-05-07 09:49:46 +00:00
test Improve template system and panic recovery (#24461) 2023-05-04 14:36:34 +08:00
timeutil Fix incorrect webhook time and use relative-time to display it (#24477) 2023-05-03 19:53:43 -04:00
translation Make repo size style matches others (commits/branches/tags) (#24408) 2023-04-28 17:23:19 -04:00
turnstile
typesniffer
updatechecker
upload
uri
user
util Add Debian package registry (#24426) 2023-05-02 12:31:35 -04:00
validation
web Improve template system and panic recovery (#24461) 2023-05-04 14:36:34 +08:00
webhook