Hide regions with no attorneys in them
This commit is contained in:
		@@ -1,9 +1,11 @@
 | 
				
			|||||||
{% extends 'base.html' %}
 | 
					{% extends 'base.html' %}
 | 
				
			||||||
 | 
					{% load charter_members_extra %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block body %}
 | 
					{% block body %}
 | 
				
			||||||
    <div class="container-fluid bg-dark-primary py-3">
 | 
					    <div class="container-fluid bg-dark-primary py-3">
 | 
				
			||||||
        <div class="container">
 | 
					        <div class="container">
 | 
				
			||||||
            {% for region in region %}
 | 
					            {% for region in region %}
 | 
				
			||||||
 | 
					                {%  if attorneys|filter_region:region|length > 0 %}
 | 
				
			||||||
                    <div class="row bg-white mb-5">
 | 
					                    <div class="row bg-white mb-5">
 | 
				
			||||||
                        <div class="col-12 pt-3">
 | 
					                        <div class="col-12 pt-3">
 | 
				
			||||||
                            <h2 class="text-dark-primary">{{ region }}</h2>
 | 
					                            <h2 class="text-dark-primary">{{ region }}</h2>
 | 
				
			||||||
@@ -25,6 +27,7 @@
 | 
				
			|||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
            {% endfor %}
 | 
					            {% endfor %}
 | 
				
			||||||
            {% if other %}
 | 
					            {% if other %}
 | 
				
			||||||
                <div class="row bg-white mb-5">
 | 
					                <div class="row bg-white mb-5">
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										0
									
								
								charter_members/templatetags/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								charter_members/templatetags/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										9
									
								
								charter_members/templatetags/charter_members_extra.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								charter_members/templatetags/charter_members_extra.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					from django import template
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					register = template.Library()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@register.filter
 | 
				
			||||||
 | 
					def filter_region(things, args):
 | 
				
			||||||
 | 
					    return things.filter(region=args)
 | 
				
			||||||
		Reference in New Issue
	
	Block a user