0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 14:14:21 +01:00
gitea/modules/templates
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
..
eval
scopedtmpl
vars
base.go Improve template system and panic recovery (#24461) 2023-05-04 14:36:34 +08:00
dynamic.go
helper.go Simplify template helper functions (#24570) 2023-05-07 09:49:46 +00:00
helper_test.go
htmlrenderer.go Use globally shared HTMLRender (#24436) 2023-04-30 08:22:23 -04:00
htmlrenderer_test.go
mailer.go Use globally shared HTMLRender (#24436) 2023-04-30 08:22:23 -04:00
static.go
templates_bindata.go
util_avatar.go Improve template helper (#24417) 2023-04-29 08:02:29 -04:00
util_dict.go Update go tool dependencies, restructure lint targets (#24239) 2023-04-22 14:53:00 -04:00
util_json.go Improve template helper (#24417) 2023-04-29 08:02:29 -04:00
util_misc.go Simplify template helper functions (#24570) 2023-05-07 09:49:46 +00:00
util_render.go Improve template helper (#24417) 2023-04-29 08:02:29 -04:00
util_slice.go Improve template helper functions: string/slice (#24266) 2023-04-22 14:16:22 -04:00
util_string.go Improve template helper (#24417) 2023-04-29 08:02:29 -04:00
util_test.go Improve template helper functions: string/slice (#24266) 2023-04-22 14:16:22 -04:00