Browse Source

DIV-273 - Overview page missing optional steps

pull/160/head
Mike Olund 8 years ago
parent
commit
d5f6ad58bf
3 changed files with 9 additions and 8 deletions
  1. +3
    -3
      edivorce/apps/core/templates/overview.html
  2. +1
    -1
      edivorce/apps/core/templatetags/step_order.py
  3. +5
    -4
      edivorce/apps/core/views/main.py

+ 3
- 3
edivorce/apps/core/templates/overview.html View File

@ -46,7 +46,7 @@
{% elif step_status.your_separation == 'Complete' %}<span class="progress-status"><i class="fa fa-check" aria-hidden="true"></i></span> {% endif %}
</a>
{% if 'Spousal support' in want_which_orders|load_json %}
{% if 'Spousal support' in which_orders.0.value|load_json %}
<a href="{% url 'question_steps' 'support' %}" class="progress-question {% if active_page == 'support' %} active {% endif %}">
<span class="progress-icon"><i class="fa fa-life-ring" aria-hidden="true"></i></span>
<span class="progress-content"><small>Step 6</small><br />Spousal support</span>
@ -55,7 +55,7 @@
</a>
{% endif %}
{% if 'Division of property and debts' in want_which_orders|load_json %}
{% if 'Division of property and debts' in which_orders.0.value|load_json %}
<a href="{% url 'question_steps' 'property' %}" class="progress-question {% if step_status.property_and_debt == 'Complete' %} complete {% endif %}">
<span class="progress-icon"><i class="fa fa-home" aria-hidden="true"></i></span>
<span class="progress-content"><small>Step {% step_order step="property" %}</small><br />Property and debt</span>
@ -64,7 +64,7 @@
</a>
{% endif %}
{% if 'Other orders' in want_which_orders|load_json %}
{% if 'Other orders' in which_orders.0.value|load_json %}
<a href="{% url 'question_steps' 'other_orders' %}" class="progress-question {% if step_status.other_orders == 'Complete' %} complete {% endif %}">
<span class="progress-icon"><i class="fa fa-gavel" aria-hidden="true"></i></span>
<span class="progress-content"><small>Step {% step_order step="other_orders" %}</small><br />Other orders</span>


+ 1
- 1
edivorce/apps/core/templatetags/step_order.py View File

@ -73,7 +73,7 @@ def __parse_json_which_orders_selected(context):
# for the review page, responses are nested in a special format
which_orders = context.get('which_orders', None)
if which_orders is not None:
if which_orders is not None and len(which_orders) >= 1:
want_which_orders = which_orders[0]["value"]
if want_which_orders is None:
want_which_orders = json.loads('[]')


+ 5
- 4
edivorce/apps/core/views/main.py View File

@ -141,10 +141,11 @@ def overview(request):
"""
user = __get_bceid_user(request)
responses_dict_by_step = get_responses_from_db_grouped_by_steps(user)
# step status dictionary
status_dict = {'step_status': get_step_status(responses_dict_by_step),
'active_page': 'overview'}
return render(request, 'overview.html', context=status_dict)
responses_dict_by_step['active_page'] = 'overview'
# Add step status dictionary
responses_dict_by_step['step_status'] = get_step_status(responses_dict_by_step)
return render(request, 'overview.html', context=responses_dict_by_step)
def __get_bceid_user(request):


Loading…
Cancel
Save