0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-03 07:59:48 +01:00
gitea/templates/repo
wxiaoguang 4e33481357
Make label templates have consistent behavior and priority (#23749)
Fix https://github.com/go-gitea/gitea/issues/23715

Other related PRs:

* #23717
* #23716
* #23719

This PR is different from others, it tries to resolve the problem fundamentally (and brings more benefits)

Although it looks like some more lines are added, actually many new lines are for tests.

----

Before, the code was just "guessing" the file type and try to parse them.

<details>

![image](https://user-images.githubusercontent.com/2114189/228002245-57d58e27-1078-4da9-bf42-5bc0b264c6ce.png)

</details>

This PR:

* Always remember the original option file names, and always use correct parser for them.

* Another benefit is that we can sort the Label Templates now (before there was a map, its key order is undefined)

![image](https://user-images.githubusercontent.com/2114189/228002432-931b9f18-3908-484b-a36b-04760c9ad132.png)
2023-04-10 16:44:02 +08:00
..
actions
branch Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
cite
diff Expand/Collapse all changed files (#23639) 2023-04-09 21:11:02 +08:00
editor Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
find
graph Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
issue Make label templates have consistent behavior and priority (#23749) 2023-04-10 16:44:02 +08:00
migrate Group template helper functions, remove Printf, improve template error messages (#23982) 2023-04-08 21:15:22 +08:00
projects Introduce GiteaLocaleNumber custom element to handle number localization on pages. (#23861) 2023-04-03 12:58:09 -04:00
pulls Discolor pull request tab labels (#23950) 2023-04-07 15:12:45 -04:00
release Title can be empty when creating tag only (#23917) 2023-04-06 21:44:52 -04:00
settings Fix code view (diff) broken layout (#23096) 2023-04-04 19:05:07 +08:00
wiki Re-add initial wiki page text when editing the page (#23984) 2023-04-09 15:51:32 +08:00
activity.tmpl
blame.tmpl
branch_dropdown.tmpl
clone_buttons.tmpl Clean template/helper.go (#23922) 2023-04-07 03:31:41 -04:00
clone_script.tmpl Clean template/helper.go (#23922) 2023-04-07 03:31:41 -04:00
commit_page.tmpl
commit_status.tmpl Use different SVG for pending and running actions (#23836) 2023-03-31 17:24:39 +08:00
commit_statuses.tmpl
commits_list_small.tmpl Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
commits_list.tmpl
commits_table.tmpl
commits.tmpl
create_helper.tmpl
create.tmpl Make label templates have consistent behavior and priority (#23749) 2023-04-10 16:44:02 +08:00
empty.tmpl
file_info.tmpl
forks.tmpl Remove fomantic ".link" selector and styles (#23888) 2023-04-03 20:47:23 -04:00
graph.tmpl
header.tmpl
home.tmpl Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
icon.tmpl
packages.tmpl
search_name.tmpl Clean template/helper.go (#23922) 2023-04-07 03:31:41 -04:00
search.tmpl
shabox_badge.tmpl
sub_menu.tmpl Remove fomantic ".link" selector and styles (#23888) 2023-04-03 20:47:23 -04:00
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl
view_file.tmpl Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
view_list.tmpl
watchers.tmpl