You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

course_members.tmpl 4.2 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <style>
  2. .organization-header{
  3. margin-bottom: 0px !important;
  4. border-bottom:none !important
  5. }
  6. .course_header{
  7. color: rgba(3, 102, 214, 100);
  8. font-size: 16px;
  9. text-align: left;
  10. font-family: SourceHanSansSC-medium;
  11. font-weight: bolder;
  12. vertical-align: bottom;
  13. }
  14. .meb_label{
  15. border-radius: 5px;
  16. background-color: rgba(255, 255, 255, 100) !important;
  17. color: rgba(255, 255, 255, 100);
  18. font-size: 12px;
  19. text-align: center;
  20. font-family: Roboto;
  21. border: 1px solid rgba(212, 212, 213, 100) !important;
  22. margin-left: 1em !important;
  23. }
  24. .ui.small.label.topic {
  25. margin-bottom: 0px !important;
  26. }
  27. .cor{
  28. color:#888888 !important
  29. }
  30. .card_course{
  31. padding:1em;
  32. border: 1px solid #F5F5F6;
  33. margin:1em;box-shadow: 0px 4px 4px 0px rgba(232, 232, 232, 60);
  34. border-radius: 5px;border: 1px solid rgba(232, 232, 232, 100);
  35. display: flex; width:calc(33.33333333333333% - 2em)
  36. }
  37. .button_leaveOrg{
  38. position:absolute;right: -1px;top:0px;
  39. }
  40. .bt_mr{
  41. margin-right: 0px !important;
  42. font-size: 12px !important;
  43. padding: 5px !important;
  44. }
  45. </style>
  46. {{template "base/head" .}}
  47. <!-- 提示框 -->
  48. <div class="alert"></div>
  49. <div class="organization members">
  50. {{template "org/header" .}}
  51. {{template "org/navber_course" .}}
  52. <div class="ui container">
  53. {{template "base/alert" .}}
  54. <div class="ui stackable grid">
  55. <div class="ui sixteen wide computer column list">
  56. <div class="ui three cards" >
  57. {{ range .Members}}
  58. <div class="card_course" style="position: relative;" id = "{{.ID}}" onmouseover ="show_bt( {{.ID}} )" onmouseout="hide_bt({{.ID}})">
  59. <div >
  60. <img class="ui avatar " style="width: 45px;height:45px;margin-top: 2px;" src="{{.SizedRelAvatarLink 48}}">
  61. <div class="meta" style="text-align: center; margin-top: 0.5em;">
  62. {{ $isPublic := index $.MembersIsPublicMember .ID}}
  63. {{if $isPublic}}
  64. {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} <a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.i18n.Tr "org.members.public_helper"}}</a> {{end}}
  65. {{else}}
  66. {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} <a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.i18n.Tr "org.members.private_helper"}}</a> {{end}}
  67. {{end}}
  68. </div>
  69. </div>
  70. <div style="padding-left: 0.8em;">
  71. <div>
  72. <a href="{{.HomeLink}}" class="course_header"> {{.Name}}</a>
  73. <div class="ui small label topic meb_label" >
  74. {{if index $.MembersIsUserOrgOwner .ID}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}
  75. </div>
  76. </div>
  77. <div class="meta" style="margin-top: 0.5em;">
  78. {{.FullName}}
  79. </div>
  80. <div class="meta" style="margin-top: 0.5em;">
  81. {{svg "octicon-mail" 16}}
  82. <a class="cor" href="mailto:{{.Email}}" rel="nofollow"> {{.Email}}</a>
  83. </div>
  84. </div>
  85. <div class="button_leaveOrg" style="display:none" >
  86. {{if eq $.SignedUser.ID .ID}}
  87. <form method="post" action="{{$.OrgLink}}/members/action/leave">
  88. {{$.CsrfTokenHtml}}
  89. <button type="submit" class="ui red basic button bt_mr" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.course_members.leave"}}</button>
  90. </form>
  91. {{else if $.IsOrganizationOwner}}
  92. <form method="post" action="{{$.OrgLink}}/members/action/remove">
  93. {{$.CsrfTokenHtml}}
  94. <button type="submit" class="ui red basic button bt_mr" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.course_members.remove"}}</button>
  95. </form>
  96. {{end}}
  97. </div>
  98. </div>
  99. {{end}}
  100. </div>
  101. </div>
  102. {{template "base/paginate" .}}
  103. </div>
  104. </div>
  105. </div>
  106. {{template "base/footer" .}}
  107. <script>
  108. function show_bt(bt_id){
  109. document.getElementById(""+bt_id).getElementsByClassName("button_leaveOrg")[0].style.display="inline-block";
  110. }
  111. function hide_bt(bt_id){
  112. document.getElementById(""+bt_id).getElementsByClassName("button_leaveOrg")[0].style.display="none";
  113. }
  114. </script>