Styled experts page
This commit is contained in:
parent
ebe8050ada
commit
8337d3dfb2
@ -29,7 +29,7 @@ urlpatterns = [
|
|||||||
url(r'^caselaw/', case_law.views.browser, name='caselaw'),
|
url(r'^caselaw/', case_law.views.browser, name='caselaw'),
|
||||||
url(r'^contact/', main.views.contact, name='contact'),
|
url(r'^contact/', main.views.contact, name='contact'),
|
||||||
url(r'^experts/', expert_witnesses.views.browser, name='experts'),
|
url(r'^experts/', expert_witnesses.views.browser, name='experts'),
|
||||||
url(r'^experts/(<?P<id>\d+)', expert_witnesses.views.viewer, name='expert'),
|
url(r'^experts/(?P<id>\d+)', expert_witnesses.views.viewer, name='expert'),
|
||||||
url(r'^login/', main.views.login, name='login'),
|
url(r'^login/', main.views.login, name='login'),
|
||||||
url(r'^logout/', main.views.logout, name='logout'),
|
url(r'^logout/', main.views.logout, name='logout'),
|
||||||
url(r'^media/secure/(?P<path>.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'),
|
url(r'^media/secure/(?P<path>.*)$', protected_serve, {'document_root': os.path.join(settings.MEDIA_ROOT, 'secure')}, name='secure media'),
|
||||||
|
@ -15,7 +15,7 @@ class AreaOfExpertise(models.Model):
|
|||||||
|
|
||||||
|
|
||||||
class Expert(models.Model):
|
class Expert(models.Model):
|
||||||
cases = models.ManyToManyField(Case)
|
cases = models.ManyToManyField(Case, blank=True)
|
||||||
expertise = models.ManyToManyField(AreaOfExpertise)
|
expertise = models.ManyToManyField(AreaOfExpertise)
|
||||||
institute = models.CharField(max_length=255, null=True, blank=True)
|
institute = models.CharField(max_length=255, null=True, blank=True)
|
||||||
name = models.CharField(max_length=255)
|
name = models.CharField(max_length=255)
|
||||||
|
@ -1,21 +1,55 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid" style="background-color: #001f2f">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 bg-dark-primary">
|
<div class="col-md-9 bg-light-blue">
|
||||||
{% for filter in filters %}
|
<div class="bg-white my-3">
|
||||||
<div class="badge badge-primary">{{ filter.field }}</div>
|
{% for expert in experts %}
|
||||||
|
<div class=" p-3 border-bottom-0 border-left-0 border-right-0 {% if not forloop.counter0 %}border-top-0{% endif %}" style="border: 1px solid rgba(0, 0, 0, 0.2);">
|
||||||
|
<a href="{% url 'expert' expert.id %}">{{ expert.name }}</a>
|
||||||
|
<br>
|
||||||
|
{% if expert.institute %}
|
||||||
|
<i class="fa fa-institution"></i> {{ expert.institute }}
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted"><i class="fa fa-institution"></i> No Institute</span>
|
||||||
|
{% endif %}
|
||||||
|
<br>
|
||||||
|
{% for e in expert.expertise.all %}
|
||||||
|
<span class="badge badge-primary">{{ e.field }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9 bg-light-blue">
|
|
||||||
{% for expert in experts %}
|
|
||||||
{{ expert.name }} - <i class="fa fa-institution"></i> {{ expert.institute }}
|
|
||||||
{% for e in expert.expertise.all|dictsort:'field' %}
|
|
||||||
<i class="fa fa-graduation-cap"></i> {{ e.field }}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 bg-dark-primary">
|
||||||
|
<h4 class="mt-3 pl-1 text-white">Filters:</h4>
|
||||||
|
<form>
|
||||||
|
<div class="mt-2">
|
||||||
|
<h5 for="filter" class="text-white mb-0 pl-1">Name</h5>
|
||||||
|
<input class="form-control" name="name">
|
||||||
|
</div>
|
||||||
|
<div class="mt-2">
|
||||||
|
<h5 for="filter" class="text-white mb-0 pl-1">Institute</h5>
|
||||||
|
<select id="filter" class="form-control" name="institute">
|
||||||
|
<option selected></option>
|
||||||
|
{% for institute in institutes %}
|
||||||
|
<option>{{ institute }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="mt-2">
|
||||||
|
<h5 for="filter" class="text-white mb-0 pl-1">Areas of Expertise</h5>
|
||||||
|
<select id="filter" class="form-control" name="experties">
|
||||||
|
<option selected></option>
|
||||||
|
{% for filter in filters %}
|
||||||
|
<option>{{ filter.field }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary float-right mt-2">Search</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user