A webapp/form for people to join pEp coop. Fork of Cultural Commons Collecting Society (C3S) SCE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

memberships_list_backend.pt 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml"
  3. xml:lang="en"
  4. xmlns:tal="http://xml.zope.org/namespaces/tal"
  5. xmlns:metal="http://xml.zope.org/namespaces/metal"
  6. metal:use-macro="backend">
  7. <!--! styles -->
  8. <tal:block metal:fill-slot="head">
  9. <link rel="stylesheet" href="${request.static_url('deform:static/css/form.css')}"
  10. type="text/css" media="screen" charset="utf-8" />
  11. <link rel="stylesheet" href="${request.static_url('deform:static/css/typeahead.css')}"
  12. type="text/css" media="screen" charset="utf-8" />
  13. <!--! jquery and deform.js need to be on top for autocomplete -->
  14. <script src="${request.static_url('c3smembership:static/jquery/jquery.min.js')}"
  15. type="text/javascript"></script>
  16. <script type="text/javascript">
  17. $().ready(function() {
  18. console.debug("ready");
  19. $(".delete-link").click(function(event) {
  20. event.preventDefault();
  21. member_id = $(this).attr('id').split('-')[2];
  22. ajaxUrl = '${request.route_url('get_member', member_id=0)}'
  23. ajaxUrl = ajaxUrl.substring(0, ajaxUrl.length - 1) + member_id;
  24. member_data = $.get(
  25. ajaxUrl,
  26. function(member) {
  27. answer = confirm("Do you want to delete member " + member.id + " \"" + member.lastname + ", " + member.firstname + "\"?");
  28. if (answer) {
  29. deleteUrl = '${request.route_url('delete_entry', memberid='{memberid}', _query={'redirect': 'membership_listing_backend'})}';
  30. deleteUrl = deleteUrl.replace(encodeURIComponent('{memberid}'), member_id) + '&amp;deletion_confirmed=1';
  31. window.location.href = deleteUrl;
  32. }
  33. }
  34. );
  35. });
  36. $(".send-reminder").click(function(event) {
  37. member_id = $(this).attr('id').split('-')[2];
  38. member_name = $(this).attr('membername');
  39. answer = confirm("Are you sure you want to send the reminder email to " + member_name + " (afm id " + member_id + ") ?");
  40. if(answer == false) {
  41. event.preventDefault();
  42. }
  43. });
  44. });
  45. </script>
  46. <script src="${request.static_url('deform:static/scripts/deform.js')}"
  47. type="text/javascript"></script>
  48. </tal:block> <!--! javascripts -->
  49. <tal:block metal:fill-slot="javascript">
  50. <script src="${request.static_url('deform:static/scripts/typeahead.min.js')}"
  51. type="text/javascript"></script>
  52. <script src="${request.static_url('deform:static/scripts/jquery.form.js')}"
  53. type="text/javascript"></script>
  54. </tal:block>
  55. <tal:block metal:fill-slot="top">
  56. <div style="text-align:left;">
  57. <strong style="color:red;" tal:repeat="message request.session.pop_flash('message_to_staff')">
  58. ${message}
  59. </strong>
  60. </div>
  61. <h1>Memberships <small>see &amp; edit accepted memberships</small></h1>
  62. <h2 tal:condition="message" class="message" id="message">${message}</h2>
  63. <h3 tal:repeat="message request.session.pop_flash('messages')"
  64. class="message" id="message" style="color: red;">${message}</h3>
  65. <div>
  66. <!--! links to other pages -->
  67. <a href="${request.route_url('dashboard', page_number=1, sort_property='id', sort_direction='asc')}"
  68. class="btn btn-primary">Dashboard</a>
  69. <a href="${request.route_url('membership_listing_alphabetical')}"
  70. class="btn btn-success">Alphabetical Membership List (printout view)</a>
  71. <a href="${request.route_url('toolbox')}"
  72. class="btn btn-primary">Toolbox</a>
  73. <a href="${request.route_url('stats')}"
  74. class="btn btn-warning">Statistics</a>
  75. </div>
  76. <p>Number of data sets: ${pagination.paging.content_size}
  77. </p>
  78. </tal:block>
  79. <tal:block metal:fill-slot="middle">
  80. <?python
  81. from datetime import date
  82. ?>
  83. <p metal:use-macro="load: paging_bar_top.pt"></p>
  84. <table class="table table-striped"><!--! the actual table -->
  85. <tr class="table-striped">
  86. <th><!--! sorting -->
  87. <a href="${pagination.url.sort_property_alternating_direction('id')}"
  88. title="Sort by id">
  89. id
  90. </a>
  91. <br />
  92. <a href="${pagination.url.sort_property('id').sort_direction('asc')}"
  93. title="Sort by id: ascending"
  94. class="glyphicon glyphicon-chevron-up"></a>
  95. <a href="${pagination.url.sort_property('id').sort_direction('desc')}"
  96. title="Sort by id: descending"
  97. class="glyphicon glyphicon-chevron-down"></a>
  98. </th>
  99. <th>
  100. bc &amp; ga<br />
  101. invitation
  102. </th>
  103. <!--!
  104. <th>
  105. dues17<br />
  106. invoice
  107. </th>
  108. -->
  109. <th>
  110. certificate
  111. </th>
  112. <th>
  113. mtype<br />
  114. status
  115. </th>
  116. <th>
  117. <a href="${pagination.url.sort_property_alternating_direction('firstname')}"
  118. title="Sort by firstname">
  119. firstname
  120. </a>
  121. <br />
  122. <a href="${pagination.url.sort_property('firstname').sort_direction('asc')}"
  123. title="Sort by firstname: ascending"
  124. class="glyphicon glyphicon-chevron-up"></a>
  125. <a href="${pagination.url.sort_property('firstname').sort_direction('desc')}"
  126. title="Sort by firstname: descending"
  127. class="glyphicon glyphicon-chevron-down"></a>
  128. </th>
  129. <th>
  130. <a href="${pagination.url.sort_property_alternating_direction('lastname')}"
  131. title="Sort by lastname">
  132. lastname
  133. </a>
  134. <br />
  135. <a href="${pagination.url.sort_property('lastname').sort_direction('asc')}"
  136. title="Sort by lastname: ascending"
  137. class="glyphicon glyphicon-chevron-up"></a>
  138. <a href="${pagination.url.sort_property('lastname').sort_direction('desc')}"
  139. title="Sort by lastname: descending"
  140. class="glyphicon glyphicon-chevron-down"></a>
  141. </th>
  142. <th>email</th>
  143. <th>email<br />conf'd?</th>
  144. <th># shares</th>
  145. <th>edit</th>
  146. <th>delete</th>
  147. </tr>
  148. <!--! loop over the list of applications for membership -->
  149. <tr tal:repeat="member members" tal:attributes="id python: 'member_{0}'.format(member.id)">
  150. <td id="${id}">
  151. <a href="/detail/${member.id}">${member.id}</a>
  152. <div tal:condition="member.membership_accepted">
  153. m${member.membership_number}
  154. </div>
  155. <div tal:condition="member.is_duplicate">
  156. <a href="$request.route_url('detail', memberid=member.is_duplicate_of)">
  157. dup:${member.is_duplicate_of}
  158. </a>
  159. </div>
  160. </td>
  161. <td>
  162. <div tal:condition="member.is_member()" tal:omit-tag="">
  163. <a tal:condition="member.email_invite_flag_bcgv18 is not True"
  164. href="${request.route_url('invite_member', m_id=member.id)}"
  165. title="invitation not sent yet. Click to send!"
  166. class="btn btn-danger"></a>
  167. <a tal:condition="member.email_invite_flag_bcgv18 is True"
  168. href="${request.route_url('invite_member', m_id=member.id)}"
  169. title="gesendet ${member.email_invite_date_bcgv18.strftime('am %d.%m.%Y um %H:%M')}"
  170. class="btn btn-success"></a>
  171. </div>
  172. </td>
  173. <!--!
  174. <td>
  175. <div tal:omit-tag="" tal:condition="not member.membership_date > date(2017,12,31) and (member.membership_loss_date is None or member.membership_loss_date >= date(2017,1,1))">
  176. <a tal:condition="member.dues17_invoice is False"
  177. href="${request.route_url('send_dues17_invoice_email', member_id=member.id)}"
  178. title="Dues invoice not sent yet. Click to send!"
  179. class="btn btn-danger"></a>
  180. <a tal:condition="member.dues17_invoice is True"
  181. href="${request.route_url('send_dues17_invoice_email', member_id=member.id)}"
  182. title="Invoice sent at ${member.dues17_invoice_date.strftime('%d.%m.%Y %H:%M')}"
  183. class="btn btn-success"></a>
  184. </div>
  185. </td>
  186. -->
  187. <td>
  188. <div tal:condition="member.is_member()" tal:omit-tag="">
  189. <a tal:condition="not member.certificate_email"
  190. href="${request.route_url('certificate_mail', id=member.id)}"
  191. title="certificate not sent yet"
  192. class="btn btn-warning"></a>
  193. <a tal:condition="member.certificate_email"
  194. href="${request.route_url('certificate_mail', id=member.id)}"
  195. title="gesendet ${member.certificate_email_date.strftime('am %d.%m.%Y um %H:%M')}"
  196. class="btn btn-success"></a>
  197. <a href="${request.route_url('certificate_pdf_staff', id=member.id, name=member.get_url_safe_name())}"
  198. title="Mitgliedschaftsurkunde ansehen"
  199. class="btn btn-success">PDF</a>
  200. </div>
  201. </td>
  202. <td>
  203. <a tal:condition="(member.membership_type == 'startnext') or
  204. (member.membership_type == 'unknown') or
  205. (member.membership_type == '')"
  206. href="${request.route_url('mail_mtype_form', afmid=member.id)}"
  207. title="sende email mit mitgliedschafts-status-abfrage/link zum formular"
  208. class="btn btn-danger">
  209. go
  210. </a>
  211. <a tal:condition="member.membership_type == 'pending'"
  212. title="mail ging raus ${member.mtype_email_date.strftime('am %d.%m.%Y um %H:%M')}"
  213. class="btn btn-warning">
  214. waiting
  215. </a>
  216. <a tal:condition="(member.membership_type == 'investing') or
  217. (member.membership_type == 'normal')"
  218. title="status bekannt: ${member.membership_type}"
  219. class="btn btn-default">
  220. ok
  221. </a>
  222. </td>
  223. <!-- <td><a href="/detail/${member.id}">${member.email_confirm_code}</a></td> -->
  224. <td>${member.firstname}</td>
  225. <td>${member.lastname}</td>
  226. <td>
  227. <a href="mailto:${member.email}" title="${member.email}">mailto</a>
  228. </td>
  229. <td>
  230. <div>
  231. <a tal:condition="not member.email_is_confirmed and (isinstance(member.email_confirm_token, type(None)))"
  232. href="${request.route_url('mail_mail_confirmation',
  233. memberid=member.id)}"
  234. title="(click to send email confirmation email)"
  235. class="btn btn-danger">No...</a>
  236. <a tal:condition="(not member.email_is_confirmed) and (not isinstance(member.email_confirm_token, type(None)))"
  237. href="${request.route_url('mail_mail_confirmation',
  238. memberid=member.id)}"
  239. title="sent ${member.email_confirm_mail_date.strftime('%d.%m.%Y %H:%M')} (click to send email confirmation email again)"
  240. class="btn btn-warning">Waiting...</a>
  241. <a tal:condition="member.email_is_confirmed"
  242. href="${request.route_url('mail_mail_confirmation',
  243. memberid=member.id)}"
  244. title="${member.email_confirm_mail_date}"
  245. class="btn btn-default">Yes.</a>
  246. </div>
  247. </td>
  248. <td>
  249. <div>
  250. ${member.num_shares}
  251. <a href="${request.route_url('detail', memberid=member.id)}">[detail]</a>
  252. </div>
  253. </td><!--! how many shares? -->
  254. <td><!--! edit application -->
  255. <a href="${request.route_url('edit', _id=member.id)}"
  256. class="btn btn-warning">edit</a>
  257. </td>
  258. <td><!--! delete application -->
  259. <a href="${request.route_url('delete_entry', memberid=member.id, _query={'redirect': 'membership_listing_backend'})}"
  260. class="btn btn-danger delete-link"
  261. id="delete-link-${member.id}" >delete</a>
  262. </td>
  263. </tr>
  264. </table>
  265. <!--! end of table -->
  266. <p metal:use-macro="load: paging_bar_bottom.pt"></p>
  267. <p>
  268. Please <a href="${request.route_url('logout')}">log out</a>
  269. when you are done.
  270. </p>
  271. </tal:block>
  272. </html>