Changeset 462

Show
Ignore:
Timestamp:
06/30/10 09:52:10 (3 years ago)
Author:
rafael.soares
Message:

implemented changes to the navigation bar, refs #131

Location:
trunk/clinicaltrials/repository
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/clinicaltrials/repository/templates/repository/submission_step.html

    r409 r462  
    11{% extends "base.html" %} 
    22{% load i18n %} 
    3 {% block body_title %}{{ forms.form_main.title }}{% endblock %} 
    4  
    5 {# Last <p > in http://docs.djangoproject.com/en/dev/topics/templates/#id1 #} 
     3{% block body_title %}{% trans forms.form_main.title %}{% endblock %} 
    64 
    75{% block extrahead %} 
     
    1513        <a href="{% url repository.edittrial trial_pk %}">{% trans "Summary" %}</a> 
    1614    </small> 
    17     {% for step,iscurrent in steps %} 
     15    {% for step in steps %} 
    1816    <span> / </span> 
    19     <small{% if iscurrent %} class="current"{% endif %}> 
    20         <a href="{{step}}">{% trans "Part" %} {{forloop.counter}}</a> 
     17    <small{% if step.is_current %} class="current"{% endif %}> 
     18        <a href="{{ step.link }}">{% trans step.name %}</a> 
    2119    </small> 
    2220    {% endfor %} 
     
    2826    <ul> 
    2927        <li><a href="{% url repository.edittrial trial_pk %}">{% trans "Summary" %}</a></li> 
    30         {% for step,iscurrent in steps %} 
    31         <li{% if iscurrent %} class="current"{% endif %}> 
    32             <a href="{{step}}">{% trans "Part" %} {{forloop.counter}}</a> 
     28        {% for step in steps %} 
     29        <li{% if step.is_current %} class="current"{% endif %}> 
     30            <a href="{{ step.link }}">{% trans step.name %}</a> 
    3331        </li> 
    3432        {% endfor %} 
     
    3634</div> 
    3735{% endblock %} 
    38  
  • trunk/clinicaltrials/repository/views.py

    r459 r462  
    123123    steps = [] 
    124124    for i in range(1,10): 
    125         steps.append((reverse('step_%d'%i,args=[trial_pk]), i == current_step)) 
     125        steps.append({'link': reverse('step_%d'%i,args=[trial_pk]),  
     126                      'is_current': (i == current_step),  
     127                      'name': TRIAL_FORMS[i-1]}) 
    126128    return steps 
    127129