mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-10-31 15:50:03 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {% extends "member/noteowner_detail.html" %}
 | |
| {% load i18n %}
 | |
| {% load render_table from django_tables2 %}
 | |
| 
 | |
| {% block profile_info %}
 | |
| {% include "member/club_info.html" %}
 | |
| {% endblock %}
 | |
| 
 | |
| {% block profile_content %}
 | |
|     <input id="searchbar" type="text" class="form-control" placeholder="Nom/prénom/note ...">
 | |
|     <hr>
 | |
| 
 | |
|     <div id="memberships_table">
 | |
|         {% if table.data %}
 | |
|             {% render_table table %}
 | |
|         {% else %}
 | |
|             <div class="alert alert-warning">
 | |
|                 {% trans "There is no membership found with this pattern." %}
 | |
|             </div>
 | |
|         {% endif %}
 | |
|     </div>
 | |
| {% endblock %}
 | |
| 
 | |
| {% block extrajavascript %}
 | |
| <script type="text/javascript">
 | |
|     $(document).ready(function() {
 | |
|         let old_pattern = null;
 | |
|         let searchbar_obj = $("#searchbar");
 | |
| 
 | |
|         function reloadTable() {
 | |
|             let pattern = searchbar_obj.val();
 | |
| 
 | |
|             if (pattern === old_pattern)
 | |
|                 return;
 | |
| 
 | |
|             $("#memberships_table").load(location.pathname + "?search=" + pattern.replace(" ", "%20") + " #memberships_table");
 | |
|         }
 | |
| 
 | |
|         searchbar_obj.keyup(reloadTable);
 | |
|     });
 | |
| </script>
 | |
| {% endblock %}
 |