Changeset 4266


Ignore:
Timestamp:
01/15/14 14:38:19 (10 years ago)
Author:
BSanchezRZG
Message:

upgrade sort countries and aai

Location:
CenterRegistry/trunk
Files:
7 added
9 edited

Legend:

Unmodified
Added
Removed
  • CenterRegistry/trunk/centerregistry/views.py

    r2895 r4266  
    114114        dict_centers = {}
    115115        group_list = []
     116        sorted_list = []
    116117        centers = Center.objects.select_related('clarinfed').all()
    117118        if group_by=="none":
     
    123124                    help_list= CenterClarinFederations.objects.filter(MemberFed=con)
    124125                    dict_centers[con]=help_list
     126                sorted_list = sorted(group_list)
    125127                centers_list = centers.order_by('country','name')
    126128        if group_by=="country":
    127                     group_list = {}
     129                    group_list = []
    128130                    country_number = len(Country_CHOICES)
    129131                    for i in range(0,country_number):
    130132                        con = Country_CHOICES[i][0]
    131133                        help_list= Center.objects.filter(country=con).exclude(typeCenter="R")
    132                         con1 = Country_CHOICES[i][1]
    133                         dict_centers[con1]=help_list
     134                        if help_list:
     135                            con1 = Country_CHOICES[i][1]
     136                            dict_centers[con1]=help_list
     137                            group_list.insert(i, con1)
     138                    sorted_list = sorted(group_list)                       
    134139                    centers_list = centers.order_by('country','name')
    135140        if group_by=="typeCenter": 
    136                     group_list={}
     141                    group_list=[]
    137142                    type_number =len(Centertype_CHOICES)
    138143                    for i in range(0, type_number):
    139144                        con = Centertype_CHOICES[i][0]
    140145                        help_list= Center.objects.filter(typeCenter=con)
    141                         dict_centers[con]=help_list
    142                     centers_list = centers.order_by(group_by,'name') 
     146                        if help_list:
     147                            dict_centers[con]=help_list
     148                            group_list.insert(i, con)
     149                    sorted_list = sorted(group_list) 
     150                    centers_list = centers.order_by('typeCenter','name') 
    143151        params = {
    144152                        'group_by': group_by,
    145                         'group_list': group_list,
     153                        'group_list': sorted_list,
    146154                        'centers': dict_centers,
    147155                        'centers_list': centers_list
  • CenterRegistry/trunk/templates/center/Centerdetail_ordenar.html

    r2244 r4266  
    4646 <tr><td width="43" align="link"></td><td width="243" align="link"><b>Member Of NationalFederation : </b></td>  <td>  {{choice.name}}</td> </tr> 
    4747        {% endfor %}
     48 <tr><td width="43" align="link"></td><td width="343" align="link"><b>Service Provider Test Site: </b></td>
     49  <td> {{center.SpTestSite}}</td> </tr>
    4850</table>
    4951 <table >
     
    8183 </table>
    8284 <table >
    83  <tr><td width="43" align="link"></td><td width="300" height="18" align="left"> <b>  Clarin Organisation Information  </b></td> </tr>
     85 <tr><td width="43" align="link"></td><td width="300" height="18" align="left"> <b>  CLARIN Organisation Information  </b></td> </tr>
    8486 </table>
    8587 <table >
     
    101103  <tr><td width="43" align="link"><td width="165" align="right"><b>Telephone: </b></td>  <td> {{center.admin_contact.telephone}}</td> </tr>
    102104  <tr><td width="43" align="link"><td width="165" align="right"><b>Mail: </b></td>  <td> {{center.admin_contact.email}}</td> </tr>
    103   <tr><td width="43" align="link"><td width="165" align="right"><b>Webseite: </b></td>  <td> <a href="{{ center.admin_contact.website }}" > {{center.admin_contact.website}} </a></td> </tr>
     105  <tr><td width="43" align="link"><td width="165" align="right"><b>Website: </b></td>  <td> <a href="{{ center.admin_contact.website }}" > {{center.admin_contact.website}} </a></td> </tr>
    104106   </table>
    105107    <table >
     
    110112 <tr><td width="43" align="link"><td width="165" align="right"><b>Telephone: </b></td>  <td> {{center.tech_contact.telephone}}</td> </tr>
    111113 <tr><td width="43" align="link"><td width="160" align="right"><b>Mail: </b></td>  <td> {{center.tech_contact.email}}</td> </tr>
    112  <tr><td width="43" align="link"><td width="160" align="right"><b>Webseite: </b></td>  <td> <a href="{{ center.tech_contact.website }}" > {{center.tech_contact.website}}</a></td> </tr>                 
     114 <tr><td width="43" align="link"><td width="160" align="right"><b>Website: </b></td>  <td> <a href="{{ center.tech_contact.website }}" > {{center.tech_contact.website}}</a></td> </tr>                 
    113115 </table>
    114116
  • CenterRegistry/trunk/templates/center/Topframe.html

    r2895 r4266  
    1010<table border=0 class="bgcolor1" cellspacing=0 cellpadding=2  width="100%" >
    1111<tr>
    12 <td> <a href="http://www.clarin.eu/internal" target="_blank"> <img src="/static/images/clarin.jpg" type =image/jpg alt="ClarinLogo" /> </td>
     12<td> <a href="http://www.clarin.eu/" target="_blank"> <img src="/static/images/clarin.jpg" type =image/jpg alt="ClarinLogo" /> </td>
    1313
    1414<td aling="rechts"> <h1 style="font-size:200%; color:#0e4071">Center Registry</h1></td>
  • CenterRegistry/trunk/templates/center/center_detail.html

    r2895 r4266  
    5050 <table>
    5151 <tr><td width="43" align="link"></td><td width="313" align="link"><b>AAI status: </b></td>  <td> {{center.aaiStatus}}</td> </tr>     
    52  <tr><td width="43" align="link"></td> <td width="200" align="link"><b>CLarin Infrastructure services: </b></td>  <td> {{center.memberofSpf}}</td> </tr>
     52 <tr><td width="43" align="link"></td> <td width="200" align="link"><b>CLARIN Infrastructure services: </b></td>  <td> {{center.memberofSpf}}</td> </tr>
    5353 <tr><td width="43" align="link"></td><td width="343" align="link"><b>Member of CLARIN service Provider Federation: </b></td>
    5454  <td> {{center.memberofSpf}}</td> </tr> 
     
    5656 <tr><td width="43" align="link"></td><td width="243" align="link"><b>Member Of NationalFederation : </b></td>  <td>  {{choice.name}}</td> </tr> 
    5757        {% endfor %}
     58 <tr><td width="43" align="link"></td><td width="343" align="link"><b>Service Provider Test Site: </b></td>
     59  <td> {{center.SpTestSite}}</td> </tr>         
    5860</table>
    5961 <table >
     
    8183 </table>
    8284 <table >
    83  <tr><td width="43" align="link"></td><td width="300" height="18" align="left"> <b>  Clarin Organisation Information  </b></td> </tr>
     85 <tr><td width="43" align="link"></td><td width="300" height="18" align="left"> <b>  CLARIN Organisation Information  </b></td> </tr>
    8486 </table>
    8587 <table >
     
    101103  <tr><td width="43" align="link"><td width="165" align="right"><b>Telephone: </b></td>  <td> {{center.admin_contact.telephone}}</td> </tr>
    102104  <tr><td width="43" align="link"><td width="165" align="right"><b>Mail: </b></td>  <td> {{center.admin_contact.email}}</td> </tr>
    103   <tr><td width="43" align="link"><td width="165" align="right"><b>Webseite: </b></td>  <td> <a href="{{ center.admin_contact.website }}" > {{center.admin_contact.website}} </a></td> </tr>
     105  <tr><td width="43" align="link"><td width="165" align="right"><b>Website: </b></td>  <td> <a href="{{ center.admin_contact.website }}" > {{center.admin_contact.website}} </a></td> </tr>
    104106   </table>
    105107    <table >
     
    110112 <tr><td width="43" align="link"><td width="165" align="right"><b>Telephone: </b></td>  <td> {{center.tech_contact.telephone}}</td> </tr>
    111113 <tr><td width="43" align="link"><td width="160" align="right"><b>Mail: </b></td>  <td> {{center.tech_contact.email}}</td> </tr>
    112  <tr><td width="43" align="link"><td width="160" align="right"><b>Webseite: </b></td>  <td> <a href="{{ center.tech_contact.website }}" > {{center.tech_contact.website}}</a></td> </tr>                 
     114 <tr><td width="43" align="link"><td width="160" align="right"><b>Website: </b></td>  <td> <a href="{{ center.tech_contact.website }}" > {{center.tech_contact.website}}</a></td> </tr>                 
    113115 </table>
    114116
  • CenterRegistry/trunk/templates/center/center_detail2.html

    r2895 r4266  
    5050 <tr><td width="43" align="link"></td><td width="243" align="link"><b>Member Of NationalFederation : </b></td>  <td>  {{choice.name}}</td> </tr> 
    5151        {% endfor %}
     52 <tr><td width="43" align="link"></td><td width="343" align="link"><b>Service Provider Test Site: </b></td>
     53  <td> {{center.SpTestSite}}</td> </tr>         
    5254</table>
    5355 <table >
     
    7577 </table>
    7678 <table >
    77  <tr><td width="43" align="link"></td><td width="300" height="18" align="left"> <b>  Clarin Organisation Information  </b></td> </tr>
     79 <tr><td width="43" align="link"></td><td width="300" height="18" align="left"> <b>  CLARIN Organisation Information  </b></td> </tr>
    7880 </table>
    7981 <table >
     
    9597  <tr><td width="43" align="link"><td width="165" align="right"><b>Telephone: </b></td>  <td> {{center.admin_contact.telephone}}</td> </tr>
    9698  <tr><td width="43" align="link"><td width="165" align="right"><b>Mail: </b></td>  <td> {{center.admin_contact.email}}</td> </tr>
    97   <tr><td width="43" align="link"><td width="165" align="right"><b>Webseite: </b></td>  <td> <a href="{{ center.admin_contact.website }}" > {{center.admin_contact.website}} </a></td> </tr>
     99  <tr><td width="43" align="link"><td width="165" align="right"><b>Website: </b></td>  <td> <a href="{{ center.admin_contact.website }}" > {{center.admin_contact.website}} </a></td> </tr>
    98100   </table>
    99101    <table >
     
    104106 <tr><td width="43" align="link"><td width="165" align="right"><b>Telephone: </b></td>  <td> {{center.tech_contact.telephone}}</td> </tr>
    105107 <tr><td width="43" align="link"><td width="160" align="right"><b>Mail: </b></td>  <td> {{center.tech_contact.email}}</td> </tr>
    106  <tr><td width="43" align="link"><td width="160" align="right"><b>Webseite: </b></td>  <td> <a href="{{ center.tech_contact.website }}" > {{center.tech_contact.website}}</a></td> </tr>                 
     108 <tr><td width="43" align="link"><td width="160" align="right"><b>Website: </b></td>  <td> <a href="{{ center.tech_contact.website }}" > {{center.tech_contact.website}}</a></td> </tr>                 
    107109 </table>
    108110
  • CenterRegistry/trunk/templates/center/centers_sort_bycountry.html

    r2895 r4266  
    11{% extends "center/base.html" %}
     2{% load center_extra %}
     3
     4
    25{% block "extrahead" %}
    36        <style type="text/css">
     
    912        </style>
    1013{% endblock %}
     14
    1115{% block "maincontent" %}
    12 
    13 <h2>List of  Centers sorted by {{group_by}}</h2>
     16<h2>List of Centers sorted by {{group_by}}</h2>
    1417Group by: <a href="?group_by=NacCon"> National Consortium</a> - <a href="?group_by=country">Country</a> -
    1518          <a href="?group_by=typeCenter"> Center Type</a>
    1619<br>
    17 {% for key, value in centers.items%}
    18  {%  if  value  %}
    19         <a href="#{{ key }}"> {{ key }} </a> ,
    20  {% endif %}{% endfor %}
    21  
    22 {% for key, value in centers.items%}
    23  {%  if  value  %}
    24   <br> <a name="{{key}}"></a> <br>
    25   <h2> {{key}}</h2>
     20  {% for pais in group_list %}
     21        <a href="#{{ pais }}"> {{ pais }} </a> ,
     22  {% endfor %} 
     23
     24{% for pais in group_list %}   
     25<br> <a name="{{pais}}"></a> <br>
     26  <h2> {{pais}}</h2>
    2627       <table border=1 class="bgcolor1" cellspacing=0 cellpadding=6  width="90%" >
    2728        <tr>
     
    3536            <td class="col0"><b>Assessment</b></td>
    3637            <br> </tr>
    37            {% for center in value %}
    38            <tr>
     38    {% for center in centers|get_item:pais %}
     39     <tr>
    3940        <td class="col2"> <a href="/centers/{{ center.id }}" >{{center.name}}</a></td>
    4041        <td class="col1"> {{center.repositorySystem}} </td>
    4142        <td class="col1"> {{center.typeStatus}} </td>
    42         <td class="col1"> <table  border=0  cellspacing=0 cellpadding=6  width="100%" >   
    43                                                 {% for choice in center.clarinfed.all %}
    44                                                  <tr> <td class="col0"> <a href="{{choice.MemberFed.webseite}}"> {{choice.MemberFed}}  </tr>
    45                                                 {% endfor %} </td>
    46                                         </table></td>   
    47         <td class="col1"> <table  border=0  cellspacing=0 cellpadding=6  width="100%" >
    48                                         {% for choice in center.metadata.all %}
    49                                                 <tr><td class="col0"> <a href="{{choice.OAI_accespoint}}">   {{choice.CMschema}}
     43        <td class="col1">       {% for choice in center.clarinfed.all %}
     44                                         <a href="{{choice.MemberFed.webseite}}"> {{choice.MemberFed}} </a>
     45                                {% endfor %} </td>
     46        <td class="col1">       {% for choice in center.metadata.all %}
     47                                         <a href="{{choice.OAI_accespoint}}">   {{choice.CMschema}}
    5048                                                 {% for choice2 in choice.schema.all %}
    5149                                                , {{choice2.name}}
    5250                                         {% endfor %}  </a>
    53                                         {% endfor %} </table></td>     
     51                                        {% endfor %} </td>
    5452        <td class="col1">{{center.aaiStatus}}</td>
    5553        <td class="col1">{{center.pidStatus}}</td>
     
    5856    {% endfor %}
    5957 </table>       
    60  {% endif %}   
    6158{% endfor %}
    62  
     59
     60 
    6361{% endblock %}
  • CenterRegistry/trunk/templates/center/lista.html

    r2895 r4266  
    2525            <td width="100" align="links"><b>Metadata</b></td>
    2626            <td width="100" align="links"><b><a href="http://www.clarin.eu/category/glossary/aai"><acronym title="Authentication and Authorization Infrastructure">AAI</acronym></a></b></td>
    27             <td width="100" align="left" title="Persistent Identifier"><b><a href="http://www.clarin.eu/category/glossary/pid"> PID</a></b></td>
    28             <td width="100" align="left" title="Self-assessment round 2"><b>Assessment</b></td>
     27            <td width="100" align="links"><b><a href="http://www.clarin.eu/category/glossary/pid"><acronym title="Persistent Identifier"> PID</acronym></a></b></td>
     28            <td width="100" align="links" title="Self-assessment round 2"><b>Assessment</b></td>
    2929            <br> </tr>
    3030        {% for center in centers_list %}
    3131        <tr>
    32         <td> <a href="/centers/{{ center.id }}" >{{center.name}}</a></td>
     32        <td> <a href="http://centerregistry-clarin.esc.rzg.mpg.de/centers/{{ center.id }}"> {{center.name}}</a></td>
    3333        <td> {{center.repositorySystem}} </td>
    3434        <td> {{center.typeStatus}} </td>
    35         <td> <table  border=0  cellspacing=0 cellpadding=6  width="100%" >   
    36              {% for choice in center.clarinfed.all %}
    37         <tr> <td width="90"> <a href="{{choice.MemberFed.webseite}}">   {{choice.MemberFed}}  </tr>
    38         {% endfor %} </td>
    39         </table></td>   
    40         <td>
    41         <table  border=0  cellspacing=0 cellpadding=6  width="100%" >     
    42         <!--  oldversion
    43         {% for choice in center.metadata.all %}
    44         <tr>    <td width="90">  {{choice.WebServicesSet}}</td>  </tr>
    45         <tr>    <td  width="300">  {{choice.OAI_accespoint}} </td> </tr>
    46         {% endfor %} -->
    47        
    48         {% for choice in center.metadata.all %}
    49         <tr><td width="90"> <a href="{{choice.OAI_accespoint}}">   {{choice.CMschema}}
    50            {% for choice2 in choice.schema.all %}
    51        , {{choice2.name}}
    52        {% endfor %}  </a>
    53         {% endfor %}
    54     </table></td>       
    55 <!--    <td> {{centermetadata.WebServicesType}} </td>  -->
     35        <td> {% for choice in center.clarinfed.all %}
     36                        <a href="{{choice.MemberFed.webseite}}">   {{choice.MemberFed}}  </a><br>
     37                 {% endfor %} </td>
     38        <td>  {% for choice in center.metadata.all %}
     39                        <a href="{{choice.OAI_accespoint}}"> {{choice.CMschema}}
     40                                 {% for choice2 in choice.schema.all %}
     41                                        , {{choice2.name}} <br>
     42                         {% endfor %}  </a>
     43                  {% endfor %} </td>
    5644        <td>{{center.aaiStatus}}</td>
    5745        <td>{{center.pidStatus}}</td>
    58         <td>{{center.assesmentstatus}}</td>
    59        
     46        <td>{{center.assesmentstatus}}</td>     
    6047    </tr>
    6148        {% endfor %}
  • CenterRegistry/trunk/templates/center/type_centers.html

    r2895 r4266  
    11{% extends "center/base.html" %}
     2{% load center_extra %}
     3
    24{% block "extrahead" %}
    35        <style type="text/css">
     
    1618<br>
    1719
    18 {% for key, value in centers.items%}
    19  {%  if  value  %}
    20         <a href="#{{ key }}"> {{ key }} </a> ,
    21  {% endif %}{% endfor %}
    22  
    23 {% for key, value in centers.items%}
    24  {%  if  value  %}
    25   <br> <a name="{{key}}"></a> <br>
    26   <h2> {{key}}</h2>
     20{% for type in group_list %}
     21        <a href="#{{ type }}"> {{ type }} </a> ,
     22  {% endfor %} 
     23
     24
     25{% for type in group_list %}   
     26<br> <a name="{{type}}"></a> <br>
     27  <h2> {{type}}</h2>
    2728       <table border=1 class="bgcolor1" cellspacing=0 cellpadding=6  width="90%" >
    2829        <tr>
     
    3637            <td class="col0"><b>Assessment</b></td>
    3738            <br> </tr>
    38            {% for center in value %}
    39            <tr>
     39    {% for center in centers|get_item:type %}
     40     <tr>
    4041        <td class="col2"> <a href="/centers/{{ center.id }}" >{{center.name}}</a></td>
    4142        <td class="col1"> {{center.repositorySystem}} </td>
     
    4445                                                {% for choice in center.clarinfed.all %}
    4546                                                 <tr> <td class="col0"> <a href="{{choice.MemberFed.webseite}}"> {{choice.MemberFed}}  </tr>
    46                                                 {% endfor %} </td>      </table></td>   
     47                                                {% endfor %} </td>
     48                                        </table></td>   
    4749        <td class="col1"> <table  border=0  cellspacing=0 cellpadding=6  width="100%" >
    4850                                        {% for choice in center.metadata.all %}
     
    5860    {% endfor %}
    5961 </table>       
    60  {% endif %}   
    6162{% endfor %}
     63
    6264 
    6365{% endblock %}
Note: See TracChangeset for help on using the changeset viewer.