From e3afe4a248ac3a961f332e2ba221bedafa3dfb7e Mon Sep 17 00:00:00 2001 From: tomholford <16504501+tomholford@users.noreply.github.com> Date: Sun, 22 Oct 2023 05:34:16 -0700 Subject: [PATCH] teams: new View button (#27685) Per the discussion on #22054, the flow for adding a new team member to an org is not intuitive for new Gitea users. The ideal solution would be to add a new button on the Org > Members index view (see the screenshot mockup in the issue description). However, this would require a refactor of the UX for the flow. The current flow has an implicit context of which team within the org the new member is being added to ('Owners' by default). From the Members index, there is no implicit context; the flow would have to add a picker for which team the new member should be added to. So, as a stopgap, this change simply adds a button to the Teams index page that performs the same action as clicking on the title of the team (a behavior that is currently too obscure as indicated in the comments on the issue). This should reduce support burden and serve as a decent temporary measure until the Add Member flow is refactored. --------- Co-authored-by: tomholford --- options/locale/locale_en-US.ini | 1 + templates/org/team/teams.tmpl | 1 + 2 files changed, 2 insertions(+) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index d34d10566e0..b0c21816ae9 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -91,6 +91,7 @@ remove = Remove remove_all = Remove All remove_label_str = Remove item "%s" edit = Edit +view = View enabled = Enabled disabled = Disabled diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 6b16da9d113..9723294fd6b 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -16,6 +16,7 @@
{{.Name}}
+ {{ctx.Locale.Tr "view"}} {{if .IsMember ctx $.SignedUser.ID}}