0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-28 17:08:22 +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_test.go
helper.go Simplify template helper functions (#24570) 2023-05-07 09:49:46 +00:00
htmlrenderer_test.go
htmlrenderer.go Use globally shared HTMLRender (#24436) 2023-04-30 08:22:23 -04:00
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
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
util_string.go Improve template helper (#24417) 2023-04-29 08:02:29 -04:00
util_test.go