collaboration.tmpl 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {{template "base/head" .}}
  2. <div class="repository settings collaboration">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. {{template "repo/settings/navbar" .}}
  7. <div class="twelve wide column content">
  8. {{template "base/alert" .}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "repo.settings.collaboration"}}
  11. </h4>
  12. <div class="ui attached segment collaborator list">
  13. {{range .Collaborators}}
  14. <div class="item ui grid">
  15. <div class="ui five wide column">
  16. <a href="{{AppSubURL}}/{{.Name}}">
  17. <img class="ui avatar image" src="{{.RelAvatarLink}}">
  18. {{.DisplayName}}
  19. </a>
  20. </div>
  21. <div class="ui eight wide column">
  22. <span class="octicon octicon-shield"></span>
  23. <div class="ui inline dropdown">
  24. <div class="text">{{$.i18n.Tr .Collaboration.ModeI18nKey}}</div>
  25. <i class="dropdown icon"></i>
  26. <div class="access-mode menu" data-url="{{$.Link}}/access_mode" data-uid="{{.ID}}">
  27. <div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.admin"}}" data-value="3">{{$.i18n.Tr "repo.settings.collaboration.admin"}}</div>
  28. <div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.write"}}" data-value="2">{{$.i18n.Tr "repo.settings.collaboration.write"}}</div>
  29. <div class="item" data-text="{{$.i18n.Tr "repo.settings.collaboration.read"}}" data-value="1">{{$.i18n.Tr "repo.settings.collaboration.read"}}</div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="ui two wide column">
  34. <button class="ui red tiny button inline delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
  35. {{$.i18n.Tr "repo.settings.delete_collaborator"}}
  36. </button>
  37. </div>
  38. </div>
  39. {{end}}
  40. </div>
  41. <div class="ui bottom attached segment">
  42. <form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
  43. {{.CSRFTokenHTML}}
  44. <div class="inline field ui left">
  45. <div id="search-user-box">
  46. <div class="ui input">
  47. <input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
  48. </div>
  49. <div class="ui segment results hide"></div>
  50. </div>
  51. </div>
  52. <button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="ui small basic delete modal">
  60. <div class="ui icon header">
  61. <i class="trash icon"></i>
  62. {{.i18n.Tr "repo.settings.collaborator_deletion"}}
  63. </div>
  64. <div class="content">
  65. <p>{{.i18n.Tr "repo.settings.collaborator_deletion_desc"}}</p>
  66. </div>
  67. {{template "base/delete_modal_actions" .}}
  68. </div>
  69. {{template "base/footer" .}}