Changeset 1185 in main


Ignore:
Timestamp:
06/06/12 16:14:37 (7 years ago)
Author:
pcosquer
Message:

templates: revisions: highlight the current revision instead of the last one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/templates/revisions.html

    r1183 r1185  
    44 
    55{% block css %} 
    6 <style type="text/css"> 
    7 div.identity_card:last-child{ 
    8     /*border: 2px solid red;*/ 
    9     box-shadow: 3px 3px 9px #C90657; 
    10 } 
    11 </style> 
     6    <style type="text/css"> 
     7        div.identity_card.ic-current { 
     8            /*border: 2px solid red;*/ 
     9            box-shadow: 3px 3px 9px #C90657; 
     10        } 
     11    </style> 
    1212{% endblock %} 
    1313{% block content %} 
     
    3939    {% endif %} 
    4040    <div id="rev_list" class="Content"> 
    41         {% for object in revisions %} 
    42             {% if object.is_part %} 
    43                 {% include "parts/identity_card.html" %} 
    44             {% else %} 
    45                 {% include "documents/identity_card.html" %} 
    46             {% endif %} 
    47         {% endfor %} 
     41        {% with obj.is_part|yesno:"parts,documents"|add:"/identity_card.html" as path %} 
     42            {% for object in revisions %} 
     43                {% if obj.revision == object.revision %} 
     44                    {% with "current" as type %} 
     45                        {% include path %} 
     46                    {% endwith %} 
     47                {% else %} 
     48                    {% include path %} 
     49                {% endif %} 
     50            {% endfor %} 
     51        {% endwith %} 
    4852    </div> 
    4953{% endblock %} 
Note: See TracChangeset for help on using the changeset viewer.