repositories.tmpl 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {{template "base/head" .}}
  2. <div class="organization teams">
  3. {{template "org/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <div class="ui grid">
  7. {{template "org/team/sidebar" .}}
  8. <div class="ui ten wide column">
  9. <div class="ui top attached header">
  10. {{.i18n.Tr "org.teams.repositories"}}
  11. </div>
  12. <div class="ui attached table segment repositories">
  13. {{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}}
  14. {{range .Team.Repos}}
  15. <div class="item">
  16. {{if $canAddRemove}}
  17. <a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/remove?repoid={{.ID}}">{{$.i18n.Tr "org.teams.remove_repo"}}</a>
  18. {{end}}
  19. <a class="member" href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}">
  20. <i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  21. <strong>{{$.Org.Name}}/{{.Name}}</strong>
  22. </a>
  23. </div>
  24. {{end}}
  25. </div>
  26. {{if $canAddRemove}}
  27. <div class="ui bottom attached segment">
  28. <form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post">
  29. {{.CsrfTokenHtml}}
  30. <div class="inline field ui left">
  31. <div id="search-repo-box" data-uid="{{.Org.Id}}">
  32. <div class="ui input">
  33. <input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
  34. </div>
  35. <div class="ui segment results hide"></div>
  36. </div>
  37. </div>
  38. <button class="ui green button">{{.i18n.Tr "org.teams.add_team_repository"}}</button>
  39. </form>
  40. </div>
  41. {{end}}
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. {{template "base/footer" .}}