repositories.tmpl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. {{template "org/base/header" .}}
  4. <div id="setting-wrapper" class="main-wrapper">
  5. <div id="team-members-list" class="container clear">
  6. {{template "ng/base/alert" .}}
  7. {{template "org/team/sidebar" .}}
  8. <div class="grid-2-3 left">
  9. <div class="setting-content">
  10. <div class="panel panel-radius">
  11. <div class="panel-header">
  12. {{.i18n.Tr "org.teams.repositories"}}
  13. </div>
  14. {{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}}
  15. <ul class="panel-body setting-list" id="team-repositories-list">
  16. {{if $canAddRemove}}
  17. <li class="search">
  18. <form class="form form-align" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" id="repo-collab-form">
  19. {{.CsrfTokenHtml}}
  20. <input class="ipt ipt-large ipt-radius" id="org-team-repositories-add" name="repo-name" autocomplete="off" data-uid="{{.Org.Id}}" required />
  21. <button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "org.teams.add_team_repository"}}</button>
  22. <div class="repo-user-list-block">
  23. <ul class="menu-down-show menu-vertical menu-radius switching-list user-list" id="org-team-repositories-list"></ul>
  24. </div>
  25. </form>
  26. </li>
  27. {{end}}
  28. {{range .Team.Repos}}
  29. <li class="collab">
  30. {{if $canAddRemove}}
  31. <a class="btn btn-small btn-red btn-radius right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/remove?repoid={{.Id}}">{{$.i18n.Tr "org.teams.remove_repo"}}</a>
  32. {{end}}
  33. <a class="member" href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}">
  34. <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  35. <strong>{{$.Org.Name}}/{{.Name}}</strong>
  36. </a>
  37. </li>
  38. {{end}}
  39. </ul>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. {{template "ng/base/footer" .}}