diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 1dc0c3cb81..8da7412ade 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1032,6 +1032,8 @@ fork_to_different_account = Fork to a different account fork_visibility_helper = The visibility of a forked repository cannot be changed. fork_branch = Branch to be cloned to the fork all_branches = All branches +view_all_branches = View all branches +view_all_tags = View all tags fork_no_valid_owners = This repository can not be forked because there are no valid owners. fork.blocked_user = Cannot fork the repository because you are blocked by the repository owner. use_template = Use this template diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index 43568732fb..b68c34a02a 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -10,6 +10,7 @@ * ShowTabBranches * ShowTabTagsTab * AllowCreateNewRef +* ShowViewAllRefsEntry Search "repo/branch_dropdown" in the template directory to find all occurrences. */}} @@ -24,6 +25,8 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences. data-text-create-branch="{{ctx.Locale.Tr "repo.branch.create_branch"}}" data-text-create-ref-from="{{ctx.Locale.Tr "repo.branch.create_from"}}" data-text-no-results="{{ctx.Locale.Tr "no_results_found"}}" + data-text-view-all-branches="{{ctx.Locale.Tr "repo.view_all_branches"}}" + data-text-view-all-tags="{{ctx.Locale.Tr "repo.view_all_tags"}}" data-current-repo-default-branch="{{.Repository.DefaultBranch}}" data-current-repo-link="{{.Repository.Link}}" @@ -37,6 +40,7 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences. data-show-tab-branches="{{.ShowTabBranches}}" data-show-tab-tags="{{.ShowTabTags}}" data-allow-create-new-ref="{{.AllowCreateNewRef}}" + data-show-view-all-refs-entry="{{.ShowViewAllRefsEntry}}" data-enable-feed="{{ctx.RootData.EnableFeed}}" > diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 1e77cd4919..4b25915c27 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -62,6 +62,7 @@ "CurrentTreePath" .TreePath "RefLinkTemplate" "{RepoLink}/src/{RefType}/{RefShortName}/{TreePath}" "AllowCreateNewRef" .CanCreateBranch + "ShowViewAllRefsEntry" true }} {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} {{$cmpBranch := ""}} diff --git a/web_src/js/components/RepoBranchTagSelector.vue b/web_src/js/components/RepoBranchTagSelector.vue index 05f7b59a66..2f66336a66 100644 --- a/web_src/js/components/RepoBranchTagSelector.vue +++ b/web_src/js/components/RepoBranchTagSelector.vue @@ -86,6 +86,8 @@ const sfc = { textCreateBranch: elRoot.getAttribute('data-text-create-branch'), textCreateRefFrom: elRoot.getAttribute('data-text-create-ref-from'), textNoResults: elRoot.getAttribute('data-text-no-results'), + textViewAllBranches: elRoot.getAttribute('data-text-view-all-branches'), + textViewAllTags: elRoot.getAttribute('data-text-view-all-tags'), currentRepoDefaultBranch: elRoot.getAttribute('data-current-repo-default-branch'), currentRepoLink: elRoot.getAttribute('data-current-repo-link'), @@ -99,6 +101,7 @@ const sfc = { showTabBranches: shouldShowTabBranches, showTabTags: elRoot.getAttribute('data-show-tab-tags') === 'true', allowCreateNewRef: elRoot.getAttribute('data-allow-create-new-ref') === 'true', + showViewAllRefsEntry: elRoot.getAttribute('data-show-view-all-refs-entry') === 'true', enableFeed: elRoot.getAttribute('data-enable-feed') === 'true', }; @@ -281,6 +284,11 @@ export default sfc; // activate IDE's Vue plugin
+ + + {{ textViewAllBranches }} + {{ textViewAllTags }} +