]> source.dussan.org Git - gitea.git/commitdiff
teams: new View button (#27685)
authortomholford <16504501+tomholford@users.noreply.github.com>
Sun, 22 Oct 2023 12:34:16 +0000 (05:34 -0700)
committerGitHub <noreply@github.com>
Sun, 22 Oct 2023 12:34:16 +0000 (12:34 +0000)
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 <tomholford@users.noreply.github.com>
options/locale/locale_en-US.ini
templates/org/team/teams.tmpl

index d34d10566e04a2e5911235932f985ac544ed9a5d..b0c21816ae936d9fa0387f3e42b039d0ff08f2cc 100644 (file)
@@ -91,6 +91,7 @@ remove = Remove
 remove_all = Remove All
 remove_label_str = Remove item "%s"
 edit = Edit
+view = View
 
 enabled = Enabled
 disabled = Disabled
index 6b16da9d113f64e0bb72e2d1bc3650d8f79d922b..9723294fd6bcf55e1ee3a846d7a86adb51b1ad84 100644 (file)
@@ -16,6 +16,7 @@
                                        <div class="ui top attached header">
                                                <a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.Name}}</strong></a>
                                                <div class="ui right">
+                                                       <a class="ui primary tiny button" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{ctx.Locale.Tr "view"}}</a>
                                                        {{if .IsMember ctx $.SignedUser.ID}}
                                                                <form>
                                                                        <button class="ui red tiny button delete-button" data-modal-id="leave-team"