Coverage for gui/templates/gui/membership_approval.html: 100%

64 statements  

« prev     ^ index     » next       coverage.py v7.2.1, created at 2023-03-14 06:24 +0000

1{% extends 'gui/base.html' %} 

2  

3{% load bootstrap3 %} 

4  

5{% block content %} 

6 <div class="row"> 

7 <div class="col-md-12"> 

8 <div class="panel panel-default" > 

9 <div class="panel-heading">Current membership applications ({{admin_tasks_count}})</div> 

10 <div class="panel-body"> 

11 <form id="form" method="post"> 

12 {% csrf_token %} 

13 <table class="table table-condensed table-striped table-hover table-bordered table-sm"> 

14 <thead> 

15 <tr> 

16 <th class='td-min'>Select: <a href="" data-select-all='application_lst'>all</a> <a href="#" data-unselect-all='application_lst'>none</a></th> 

17 <th>Period</th> 

18 <th>User name</th> 

19 <th>Public Statement</th> 

20 <th>Rejection reason</th> 

21 </tr> 

22 </thead> 

23 <tbody id='application_lst'> 

24 {% for application in object_list %} 

25 <tr> 

26 <td><input type="checkbox" name="ids" value="{{application.id}}" /></td> 

27 <td>{{application.period.short_name}}</td> 

28 <td>{{application.user_profile}}</td> 

29 <td>{{application.user_profile.public_statement|linebreaks}}</td> 

30 <td><textarea name="reject_reason_{{application.id}}" rows="5"></textarea></td> 

31 </tr> 

32 {% empty %} 

33 <tr><td colspan="5" class="text-center">No membership applications pending</td> 

34 {% endfor %} 

35 </tbody> 

36 </table> 

37  

38 {% buttons %} 

39 <button type="submit" name="action" value="reject" class="btn btn-danger pull-left">Reject</button> 

40 <button type="submit" name="action" value="approve" class="btn btn-primary pull-right">Approve</button> 

41 {% endbuttons %} 

42  

43 <div style="text-align:center;"> 

44 <ul class="pagination"> 

45 {% if page_obj.has_previous %} 

46 <li><a href="?page={{ page_obj.previous_page_number }}">&laquo;</a></li> 

47 {% else %} 

48 <li class="disabled"><span>&laquo;</span></li> 

49 {% endif %} 

50 {% for i in page_obj.paginator.page_range %} 

51 {% if page_obj.number == i %} 

52 <li class="active"><span>{{ i }} <span class="sr-only">(current)</span></span></li> 

53 {% else %} 

54 <li><a href="?page={{ i }}">{{ i }}</a></li> 

55 {% endif %} 

56 {% endfor %} 

57 {% if page_obj.has_next %} 

58 <li><a href="?page={{ page_obj.next_page_number }}">&raquo;</a></li> 

59 {% else %} 

60 <li class="disabled"><span>&raquo;</span></li> 

61 {% endif %} 

62 </ul> 

63 </div> 

64 </form> 

65 </div> 

66 </div> 

67 </div> 

68 </div> 

69{% endblock %}