fd0baf637d
Backport #23901 by @silverwind Few fixes/enhancements around org pages: Use flexbox for member and repo lists and tweak rendering of tabs and list: <img width="765" alt="Screenshot 2023-04-03 at 22 54 24" src="https://user-images.githubusercontent.com/115237/229625716-92a834c3-9121-4729-8b9b-3a3973cf9a91.png"> <img width="771" alt="Screenshot 2023-04-03 at 22 55 15" src="https://user-images.githubusercontent.com/115237/229625719-acc08ce8-4489-44a6-a9b9-e36755c55b1d.png"> Vertically center remove/leave buttons, add link to avatar: <img width="1223" alt="Screenshot 2023-04-03 at 21 51 20" src="https://user-images.githubusercontent.com/115237/229612616-b662b795-e754-41a1-a77a-381c267e6104.png"> Co-authored-by: silverwind <me@silverwind.io>
89 lines
3.4 KiB
Handlebars
89 lines
3.4 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
|
|
{{template "org/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
<div class="ui grid">
|
|
{{template "org/team/sidebar" .}}
|
|
<div class="ui ten wide column">
|
|
{{template "org/team/navbar" .}}
|
|
{{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}}
|
|
{{if $canAddRemove}}
|
|
<div class="ui attached segment" id="repo-top-segment">
|
|
<div class="inline ui field left">
|
|
<form class="ui form ignore-dirty" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/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="{{.locale.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button class="ui green button">{{.locale.Tr "add"}}</button>
|
|
</form>
|
|
</div>
|
|
<div class="inline ui field right">
|
|
<form class="ui form" id="repo-multiple-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/repositories" method="post">
|
|
<button class="ui red button delete-button right" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{.locale.Tr "remove_all"}}</button>
|
|
<button class="ui green button add-all-button right" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{.locale.Tr "add_all"}}</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
<div class="ui bottom attached table segment repositories">
|
|
{{range .Team.Repos}}
|
|
<div class="item gt-df gt-ac gt-fw">
|
|
{{if .IsPrivate}}
|
|
{{svg "octicon-lock" 16 "gt-mr-3"}}
|
|
{{else if .IsFork}}
|
|
{{svg "octicon-repo-forked" 16 "gt-mr-3"}}
|
|
{{else if .IsMirror}}
|
|
{{svg "octicon-mirror" 16 "gt-mr-3"}}
|
|
{{else}}
|
|
{{svg "octicon-repo" 16 "gt-mr-3"}}
|
|
{{end}}
|
|
<a class="member gt-f1" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
|
|
<strong>{{$.Org.Name}}/{{.Name}}</strong>
|
|
</a>
|
|
{{if $canAddRemove}}
|
|
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
|
|
{{$.CsrfTokenHtml}}
|
|
<button type="submit" class="ui red small button right" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
|
|
</form>
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
<div class="item">
|
|
<span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="ui small basic delete modal">
|
|
<div class="ui icon header">
|
|
{{svg "octicon-trash"}}
|
|
{{.locale.Tr "org.teams.remove_all_repos_title"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{.locale.Tr "org.teams.remove_all_repos_desc"}}</p>
|
|
</div>
|
|
{{template "base/delete_modal_actions" .}}
|
|
</div>
|
|
|
|
<div class="ui small basic addall modal">
|
|
<div class="ui icon header">
|
|
<i class="globe icon"></i>
|
|
{{.locale.Tr "org.teams.add_all_repos_title"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{.locale.Tr "org.teams.add_all_repos_desc"}}</p>
|
|
</div>
|
|
{{template "base/delete_modal_actions" .}}
|
|
</div>
|
|
|
|
{{template "base/footer" .}}
|