gitea/templates/repo
wxiaoguang 6bbccdd177
Improve AJAX link and modal confirm dialog ()
Clarify the "link-action" behavior:

>  // A "link-action" can post AJAX request to its "data-url"
> // Then the browser is redirect to: the "redirect" in response, or
"data-redirect" attribute, or current URL by reloading.

And enhance the "link-action" to support showing a modal dialog for
confirm. A similar general approach could also help PRs like
https://github.com/go-gitea/gitea/pull/22344#discussion_r1062883436

> // If the "link-action" has "data-modal-confirm(-html)" attribute, a
confirm modal dialog will be shown before taking action.


And a lot of duplicate code can be removed now. A good framework design
can help to avoid code copying&pasting.

---------

Co-authored-by: silverwind <me@silverwind.io>
..
actions Adjust style for action run list (align icons, adjust padding) ()
branch Improve AJAX link and modal confirm dialog ()
cite Button and color enhancements ()
diff Button and color enhancements ()
editor Create pull request for base after editing file, if not enabled on fork ()
find
graph Improve commit date in commit graph ()
issue Fix ()
migrate Improve some Forms ()
projects Disable `Create column` button while the column name is empty ()
pulls Make diff view full width again ()
release Button and color enhancements ()
settings Improve AJAX link and modal confirm dialog ()
tag RSS icon fixes ()
wiki Improve dropdown menus, remove inline styles ()
activity.tmpl Fix template function DateTime ()
blame.tmpl Button and color enhancements ()
branch_dropdown.tmpl Make Issue/PR/projects more compact, misc CSS tweaks ()
clone_buttons.tmpl Rework button coloring, add focus and active colors ()
clone_script.tmpl Rework button coloring, add focus and active colors ()
commit_page.tmpl Improve some modal action buttons ()
commit_status.tmpl
commit_statuses.tmpl Button and color enhancements ()
commits.tmpl Make Issue/PR/projects more compact, misc CSS tweaks ()
commits_list.tmpl
commits_list_small.tmpl Clean up various avatar dimensions ()
commits_table.tmpl
create.tmpl Improve some Forms ()
create_helper.tmpl
empty.tmpl Display when a repo was archived ()
file_info.tmpl
forks.tmpl Remove fomantic ".link" selector and styles ()
graph.tmpl Replace remaining fontawesome dropdown icons with SVG ()
header.tmpl Refactor Pull Mirror and fix out-of-sync bugs ()
home.tmpl Button and color enhancements ()
icon.tmpl
packages.tmpl
release_tag_header.tmpl Remove svg.svg class, restore .rss-icon ()
search.tmpl
search_name.tmpl Clean template/helper.go ()
shabox_badge.tmpl
sub_menu.tmpl Change `--font-weight-bold` to `--font-weight-semibold` and 600 value, introduce new font weight variables ()
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl Change `join_on` translation to `joined_on` and include placeholder for the date ()
view_file.tmpl Button and color enhancements ()
view_list.tmpl Rework notifications list ()
watchers.tmpl Fix user-cards format ()