From d7d348ea86bd8066aeb079ad121120095d5cba4d Mon Sep 17 00:00:00 2001 From: 6543 <24977596+6543@users.noreply.github.com> Date: Tue, 15 Oct 2019 12:44:36 +0200 Subject: [PATCH] [UI] Pull Request Download diff Button (#8470) * Add Diff Download to Compare List * Add&Change Text for Diff Options * move button to seperate template * add drop down menue with options * Update: Compare update Gogs, BitBucket, RhodeCode and remove gitea issue link Co-Authored-By: Lauris BH * remove last things from TESTing --- docs/content/doc/features/comparison.en-us.md | 1 + options/locale/locale_en-US.ini | 5 ++++- templates/repo/diff/box.tmpl | 4 ++-- templates/repo/diff/options_dropdown.tmpl | 9 +++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 templates/repo/diff/options_dropdown.tmpl diff --git a/docs/content/doc/features/comparison.en-us.md b/docs/content/doc/features/comparison.en-us.md index 6bbbfba3b4..1d36d855c2 100644 --- a/docs/content/doc/features/comparison.en-us.md +++ b/docs/content/doc/features/comparison.en-us.md @@ -105,6 +105,7 @@ _Symbols used in table:_ | Revert specific commits or a merge request | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | | Pull/Merge requests templates | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | | Cherry-picking changes | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| Download Patch | ✓ | ✘ | ✓ | ✓ | ✓ | [/](https://jira.atlassian.com/plugins/servlet/mobile#issue/BCLOUD-8323) | ✘ | #### 3rd-party integrations diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index b5a3d8c592..45b86dea9a 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1370,7 +1370,10 @@ diff.parent = parent diff.commit = commit diff.git-notes = Notes diff.data_not_available = Diff Content Not Available -diff.show_diff_stats = Show Diff Stats +diff.options_button = Diff Options +diff.show_diff_stats = Show Stats +diff.download_patch = Download Patch File +diff.download_diff = Download Diff File diff.show_split_view = Split View diff.show_unified_view = Unified View diff.whitespace_button = Whitespace diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index b5fde36a6f..0179af2a51 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -7,7 +7,7 @@ {{else}} {{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}} {{end}} - {{.i18n.Tr "repo.diff.show_diff_stats"}} + {{template "repo/diff/options_dropdown" .}} {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} {{template "repo/diff/new_review" .}} {{end}} @@ -26,7 +26,7 @@ {{else}} {{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}} {{end}} - {{.i18n.Tr "repo.diff.show_diff_stats"}} + {{template "repo/diff/options_dropdown" .}} {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} {{template "repo/diff/new_review" .}} {{end}} diff --git a/templates/repo/diff/options_dropdown.tmpl b/templates/repo/diff/options_dropdown.tmpl new file mode 100644 index 0000000000..9fca069f0a --- /dev/null +++ b/templates/repo/diff/options_dropdown.tmpl @@ -0,0 +1,9 @@ +