Changeset 398

Show
Ignore:
Timestamp:
09/12/08 17:56:41 (4 months ago)
Author:
johnbywater
Message:

Fixed register list template.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/dm/django/templates/registry/list.html

    r396 r398  
    4040  {% endblock %} 
    4141 
    42   {% if registerCount %} 
    43     {% if isRegisterCountLow %} 
     42  {% if showRegisterIndex %} 
    4443 
    45 <div id="register-table"> 
    46   <table> 
    47   <tr> 
    48     <th>{{domainClassName}}</th> 
    49       {% block list_table_head_extn %}{% endblock %}  
    50       {% if view.canUpdateDomainObject %} 
    51     <th>Actions</th> 
    52       {% endif %} 
    53   </tr> 
    54       {% for domainObject in objectRegister.getSortedList %} 
    55   <tr> 
    56     <td> 
    57       <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/" title="{{domainObject.getRegisterKeyValue}}">{{domainObject.getLabelValue}}</a> 
    58     </td> 
    59         {% block list_table_row_extn %}{% endblock %}  
    60         {% if view.canUpdateDomainObject %} 
    61     <td> 
    62       <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/update/" title="{{domainObject.getRegisterKeyValue}}" title="Update"> 
    63         <img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-edit.png" alt="Update" /> 
    64       </a> 
    65           {% if view.canDeleteDomainObject %} 
    66       <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/delete/" title="{{domainObject.getRegisterKeyValue}}" title="Delete"> 
    67         <img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-delete.png" alt="Delete" /> 
    68       </a> 
    69           {% endif %} 
    70     </td> 
    71         {% endif %} 
    72   </tr> 
    73       {% endfor %} 
    74   </table> 
    75 </div> 
    76  
    77     {% else %} 
    7844<div id="alphasearch"> 
    7945  <a href="{{uriPrefix}}/{{registryPath}}/find/a/">A</a> 
     
    11480  <a href="{{uriPrefix}}/{{registryPath}}/find/9/">9</a> 
    11581</div><!-- /alphasearch --> 
    116     {% endif %} 
     82  {% endif %} 
    11783 
    118     {% if showRegisterTable %} 
     84  {% if showRegisterTable %} 
    11985<table> 
    12086  <tr> 
    121       {% block table_key_name %}<th>{{domainClassName}}</th>{% endblock %} 
    122       {% block table_head_extn %}{% endblock %}  
    123       {% if view.canUpdateDomainObject %} 
     87    {% block table_key_name %}<th>{{domainClassName}}</th>{% endblock %} 
     88    {% block table_head_extn %}{% endblock %}  
     89    {% if view.canUpdateDomainObject %} 
    12490    <th>Actions</th> 
    125       {% endif %} 
     91    {% endif %} 
    12692  </tr> 
    127       {% for domainObject in domainObjectList %} 
     93    {% for domainObject in domainObjectList %} 
    12894  <tr{% block is_domain_object_inactive%}{% endblock %}> 
    129         {% block table_key_value %} 
     95      {% block table_key_value %} 
    13096    <td> 
    13197      <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/" title="{{domainObject.getRegisterKeyValue}}">{{domainObject.getLabelValue}}</a> 
    13298    </td> 
     99      {% endblock %} 
     100      {% block table_row_extn %}{% endblock %} 
     101      {% if view.canUpdateDomainObject %} 
     102    <td><nobr> 
     103        {% block table_item_update_btn %} 
     104      <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/update/" title="Update"><img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-edit.png" alt="Update"/></a> 
    133105        {% endblock %} 
    134         {% block table_row_extn %}{% endblock %} 
    135         {% if view.canUpdateDomainObject %} 
    136     <td><nobr> 
    137           {% block table_item_update_btn %} 
    138       <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/update/" title="Update"><img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-edit.png" alt="Update"/></a> 
    139           {% endblock %} 
    140           {% block table_item_delete_btn %} 
    141             {% if view.canDeleteDomainObject %} 
     106        {% block table_item_delete_btn %} 
     107          {% if view.canDeleteDomainObject %} 
    142108      <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/delete/" title="{{domainObject.getRegisterKeyValue}}" title="Delete"> 
    143109        <img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-delete.png" alt="Delete" /> 
    144110      </a> 
    145             {% endif %} 
    146           {% endblock %} 
    147           {% block table_item_actions_extn %}{% endblock %} 
     111          {% endif %} 
     112        {% endblock %} 
     113        {% block table_item_actions_extn %}{% endblock %} 
    148114    </nobr></td> 
    149         {% endif %} 
     115      {% endif %} 
    150116  </tr> 
    151       {% endfor %} 
     117    {% endfor %} 
    152118</table> 
    153     {% endif %} 
     119  {% endif %} 
    154120 
    155     {% block creation %} 
    156       {% if view.canCreateDomainObject %} 
     121  {% block creation %} 
     122    {% if view.canCreateDomainObject %} 
    157123  <h3>Register new {{registerName}}</h3> 
    158124  <form action="{{uriPrefix}}/{{registryPath}}/create/" method="post 
     
    165131  <p class="desc">Fill in the following form to register new {{registerName}}</p> 
    166132  <br> 
    167       {% endif %} 
    168     {% endblock %} 
    169  
    170     {% if 0 %} 
    171   <h3>Search {{registerName}}</h3> 
    172   <form action="{{uriPrefix}}/{{registryPath}}/search/" method="post"> 
    173     <input type="text" id="domainObject-search-terms" name="userQuery" value="{{ userQuery }}" /> 
    174     <input type="submit" name="search" value="Search &raquo;" /> 
    175   </form> 
    176   <p class="desc">Please enter a search term and press 'Search'</p> 
    177   <br> 
    178133    {% endif %} 
    179    
    180   {% endif %} 
     134  {% endblock %} 
    181135 
    182136{% endblock %}