diff options
author | sebastian-sauer <sauer.sebastian@gmail.com> | 2019-01-26 01:14:35 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-01-25 19:14:35 -0500 |
commit | 8656a3c62d58371b6a6f98a1226dda832b5d450a (patch) | |
tree | 8665100d749bf44a5c0bb10f1ab0c4f1c5bdaec2 /templates/org | |
parent | d66393002383cbaa2a4a73f7c5bb9dd24d05f4db (diff) | |
download | gitea-8656a3c62d58371b6a6f98a1226dda832b5d450a.tar.gz gitea-8656a3c62d58371b6a6f98a1226dda832b5d450a.zip |
Move input fields to add members to a team and repos to a team (#5853)
Move input fields to the top so no scrolling is needed to add
new members / repos to a team.
Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
Diffstat (limited to 'templates/org')
-rw-r--r-- | templates/org/team/members.tmpl | 34 | ||||
-rw-r--r-- | templates/org/team/repositories.tmpl | 34 |
2 files changed, 34 insertions, 34 deletions
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 7633bec823..74e5e1908a 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -7,7 +7,23 @@ {{template "org/team/sidebar" .}} <div class="ui ten wide column"> {{template "org/team/navbar" .}} - <div class="ui attached table segment members"> + {{if .IsOrganizationOwner}} + <div class="ui attached segment"> + <form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post"> + {{.CsrfTokenHtml}} + <input type="hidden" name="uid" value="{{.SignedUser.ID}}"> + <div class="inline field ui left"> + <div id="search-user-box" class="ui search"> + <div class="ui input"> + <input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required> + </div> + </div> + </div> + <button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button> + </form> + </div> + {{end}} + <div class="ui bottom attached table segment members"> {{range .Team.Members}} <div class="item"> {{if $.IsOrganizationOwner}} @@ -24,22 +40,6 @@ </div> {{end}} </div> - {{if .IsOrganizationOwner}} - <div class="ui bottom attached segment"> - <form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post"> - {{.CsrfTokenHtml}} - <input type="hidden" name="uid" value="{{.SignedUser.ID}}"> - <div class="inline field ui left"> - <div id="search-user-box" class="ui search"> - <div class="ui input"> - <input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required> - </div> - </div> - </div> - <button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button> - </form> - </div> - {{end}} </div> </div> </div> diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl index fafe15e128..eeb86564fd 100644 --- a/templates/org/team/repositories.tmpl +++ b/templates/org/team/repositories.tmpl @@ -7,8 +7,23 @@ {{template "org/team/sidebar" .}} <div class="ui ten wide column"> {{template "org/team/navbar" .}} - <div class="ui attached table segment repositories"> - {{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}} + {{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}} + {{if $canAddRemove}} + <div class="ui attached segment"> + <form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post"> + {{.CsrfTokenHtml}} + <div class="inline field ui left"> + <div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search"> + <div class="ui input"> + <input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required> + </div> + </div> + </div> + <button class="ui green button">{{.i18n.Tr "org.teams.add_team_repository"}}</button> + </form> + </div> + {{end}} + <div class="ui bottom attached table segment repositories"> {{range .Team.Repos}} <div class="item"> {{if $canAddRemove}} @@ -25,21 +40,6 @@ </div> {{end}} </div> - {{if $canAddRemove}} - <div class="ui bottom attached segment"> - <form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post"> - {{.CsrfTokenHtml}} - <div class="inline field ui left"> - <div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search"> - <div class="ui input"> - <input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required> - </div> - </div> - </div> - <button class="ui green button">{{.i18n.Tr "org.teams.add_team_repository"}}</button> - </form> - </div> - {{end}} </div> </div> </div> |