Browse Source

DIV-724: style tweaks to match mock ups

pull/160/head
Benard Ebinu 7 years ago
parent
commit
cc3d60ff60
4 changed files with 30 additions and 7 deletions
  1. +1
    -1
      edivorce/apps/core/static/css/main.css
  2. +7
    -0
      edivorce/apps/core/static/css/main.scss
  3. +14
    -2
      edivorce/apps/core/templates/partials/review_user_responses.html
  4. +8
    -4
      edivorce/apps/core/templatetags/summary_format.py

+ 1
- 1
edivorce/apps/core/static/css/main.css
File diff suppressed because it is too large
View File


+ 7
- 0
edivorce/apps/core/static/css/main.scss View File

@ -1190,6 +1190,13 @@ textarea {
background-color: #D4DCE5;
}
.review-table-spacer {
&::before {
content: '';
display: block;
height: 25px;
}
}
.print-form-action {
display: inline-block;
float: right;


+ 14
- 2
edivorce/apps/core/templates/partials/review_user_responses.html View File

@ -1,5 +1,18 @@
{% load summary_format %}
{% if questions %}
{% if step == 'your_children' %}
<table class="table table-striped">
<thead>
<tr>
<th class="table-bordered">Question</th>
<th class="table-bordered">Response</th>
</tr>
</thead>
{% format_children source=questions %}
</table>
{% else %}
<table class="table table-bordered table-striped">
<thead>
<tr>
@ -18,8 +31,6 @@
{% marriage_tag source=questions %}
{% elif step == 'other_questions' %}
{% combine_address source=questions %}
{% elif step == 'your_children' %}
{% format_children source=questions %}
{% else %}
{% for question in questions %}
<tr>
@ -30,6 +41,7 @@
{% endif %}
</tbody>
</table>
{% endif %}
{% else %}
<table class="table table-bordered">
<tr>


+ 8
- 4
edivorce/apps/core/templatetags/summary_format.py View File

@ -48,13 +48,13 @@ def process_list(lst, question_key):
def format_row(question, response):
return '<tr><td width="75%" style="padding-right: 5%">{0}</td><td width="25%">{1}</td></tr>'.format(
return '<tr><td width="75%" class="table-bordered" style="padding-right: 5%">{0}</td><td class="table-bordered" width="25%">{1}</td></tr>'.format(
question, response
)
def format_review_row_heading(title, style=""):
return '<tr><td colspan="2" class="{1}"><b>{0}</b></td></tr>'.format(title, style)
return '<tr><td colspan="2" class="table-bordered {1}"><b>{0}</b></td></tr>'.format(title, style)
def format_head(headings):
@ -81,7 +81,7 @@ def process_fact_sheet_list(data, header):
def format_fact_sheet(title, url, style=''):
return '<tr><td colspan="2" class="{0}"><a href="{1}"><b>{2}</b></a></td></tr>'.format(style, url, title)
return '<tr><td colspan="2" class="table-bordered {0}"><a href="{1}"><b>{2}</b></a></td></tr>'.format(style, url, title)
@register.simple_tag(takes_context=True)
@ -144,6 +144,7 @@ def format_children(context, source):
tags = []
# process mapped questions first
working_source = source.copy()
tags.append('<tbody>')
for title, questions in question_to_heading.items():
tags.append(format_review_row_heading(title))
@ -178,10 +179,12 @@ def format_children(context, source):
tags.append(format_review_row_heading('Child {}'.format(child_counter), 'review-child-heading'))
tags.append(format_row('Child\'s name', child['child_name']))
tags.append(format_row('Birth date', child['child_birth_date']))
tags.append(format_row('Child living with', child['child_live_with']))
tags.append(format_row('Child now living with', child['child_live_with']))
tags.append(format_row('Relationship to yourself (claimant 1)', child['child_relationship_to_you']))
tags.append(format_row('Relationship to your spouse (claimant 2)', child['child_relationship_to_spouse']))
child_counter = child_counter + 1
tags.append('</tbody>')
tags.append('<tbody class="review-table-spacer">')
else:
value = item['value']
try:
@ -192,6 +195,7 @@ def format_children(context, source):
tags.append(format_row(item['question__name'], process_list(value, q_id)))
else:
tags.append(format_row(item['question__name'], value))
tags.append('</tbody>')
return ''.join(tags)


Loading…
Cancel
Save