Changeset 2895


Ignore:
Timestamp:
05/16/13 12:52:40 (11 years ago)
Author:
BSanchezRZG
Message:

Update with sorting choice

Location:
CenterRegistry/trunk
Files:
9 added
14 edited

Legend:

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

    r2807 r2895  
    8484    def __unicode__(self):
    8585        return self.name
     86    class Meta:
     87        verbose_name_plural = "Centers"
     88# Create the form class.
    8689# Create the form class.
    8790
  • CenterRegistry/trunk/centerregistry/views.py

    r2807 r2895  
    33from django.http import HttpResponse
    44from django.shortcuts import  get_object_or_404,  render_to_response
     5from django.views.generic import ListView
    56from django.utils import simplejson as json 
    6 from django.contrib.auth.models import User
    7 import datetime
    87import os
    98import xml.etree.cElementTree as ET
    109from django.utils import simplejson
    11 
    1210###new
    1311from django.views.defaults import page_not_found as default_page_not_found
    1412from django.views.defaults import server_error as default_server_error
    15 
    1613# Use custom 404 and 500 handlers, just to override template names
    1714def page_not_found(request, template_name='404.html'):
     
    7471
    7572###########
    76 def home(request):
    77     center_list = Center.objects.all()
    78     return render_to_response('center/lista.html', {'center_list': center_list })
    79  #   return render_to_response('center/home.html', {'center_list': center_list, 'title': "Home Page"})
     73
     74def consortia_list(request):
     75    con_list = ClarinFederations.objects.all()
     76    return render_to_response('consortia/con_list.html', {'consortia_list': con_list, 'title': "CLARIN Members"})
     77
     78def NacCon_list(request, clarinfederations_id):
     79    myconsortia = get_object_or_404(ClarinFederations, pk=clarinfederations_id)   
     80    center_list_fed = CenterClarinFederations.objects.filter(MemberFed=clarinfederations_id)
     81    center_list = Center.objects.order_by('name')
     82    params = {'consortia': myconsortia,
     83              'center_list_fed': center_list_fed,
     84              'center_list': center_list  } 
     85    return render_to_response('consortia/centers_byfed.html', params)
     86
     87def contact_list(request):
     88        if request.GET.has_key('group_by'):
     89                group_by = request.GET['group_by']
     90        else:
     91                group_by = 'Admin'
     92
     93        if group_by=="Admin":
     94                centers = Center.objects.exclude(typeCenter="R")
     95        else:
     96                centers = Center.objects.all()
     97        centers_list = centers.order_by('country','name')
     98        params = {
     99                        'group_by': group_by,
     100                        'centers': centers_list,
     101                        }
     102        if group_by=="Admin":
     103            return render_to_response('center/contacts.html', params)
     104        if group_by=="Security":
     105            return render_to_response('center/sc.html', params)
     106        if group_by=="Technical":
     107            return render_to_response('center/tt.html', params)
     108 
     109def centers_list(request):
     110        if request.GET.has_key('group_by'):
     111                group_by = request.GET['group_by']
     112        else:
     113                group_by = 'none'
     114        dict_centers = {}
     115        group_list = []
     116        centers = Center.objects.select_related('clarinfed').all()
     117        if group_by=="none":
     118                group_list = ClarinFederations.objects.order_by('name')
     119                centers_list = centers.order_by('country','name').exclude(typeCenter="R")
     120        if group_by=="NacCon":
     121                group_list = ClarinFederations.objects.order_by('name')
     122                for con in group_list:
     123                    help_list= CenterClarinFederations.objects.filter(MemberFed=con)
     124                    dict_centers[con]=help_list
     125                centers_list = centers.order_by('country','name')
     126        if group_by=="country":
     127                    group_list = {}
     128                    country_number = len(Country_CHOICES)
     129                    for i in range(0,country_number):
     130                        con = Country_CHOICES[i][0]
     131                        help_list= Center.objects.filter(country=con).exclude(typeCenter="R")
     132                        con1 = Country_CHOICES[i][1]
     133                        dict_centers[con1]=help_list
     134                    centers_list = centers.order_by('country','name')
     135        if group_by=="typeCenter": 
     136                    group_list={}
     137                    type_number =len(Centertype_CHOICES)
     138                    for i in range(0, type_number):
     139                        con = Centertype_CHOICES[i][0]
     140                        help_list= Center.objects.filter(typeCenter=con)
     141                        dict_centers[con]=help_list
     142                    centers_list = centers.order_by(group_by,'name') 
     143        params = {
     144                        'group_by': group_by,
     145                        'group_list': group_list,
     146                        'centers': dict_centers,
     147                        'centers_list': centers_list
     148                        }
     149        if group_by=="none":
     150            return render_to_response('center/lista.html', params)
     151        else:
     152            if group_by=="NacCon":
     153                return render_to_response('center/centers_sort_byfed.html', params)
     154            else:
     155                if group_by=="country":
     156                    return render_to_response('center/centers_sort_bycountry.html', params)
     157                else:
     158                    return render_to_response('center/type_centers.html', params)
    80159
    81160def centers_all_list(request):
    82     center_list = Center.objects.all()
    83     return render_to_response('center/lista.html', {'center_list': center_list, 'title': "List of centers"})
    84 #return render_to_response('center/lista.html', {'center_list': center_list, 'title': "List of centers"})
     161    centers_list = Center.objects.all()
     162    return render_to_response('center/lista.html', {'center_list': centers_list, 'title': "List of Centers"})
     163
    85164def center_detail(request, center_id):
    86165    mycenter = get_object_or_404(Center, pk=center_id)
    87     params = {'center': mycenter, 'title': "Center Detail view",  }   
    88     return render_to_response('center/center_detail2.html',  params )
    89 # return render_to_response('center/center_detail.html',  params )
     166    params = {
     167              'center': mycenter,
     168              'title': "Center Detail view"
     169              }   
     170    return render_to_response('center/center_detail.html', params)
     171   
    90172def endpoints_all_list(request):
    91     center_list = Center.objects.all()
     173    center_list = Center.objects.exclude(metadata__name__isnull=True).exclude(metadata__name ='')
    92174    return render_to_response('center/EP_list.html', {'center_list': center_list, 'title': "OAI-PMH End Points"})
    93 
    94 def federations_list(request):
    95     fede_list = ClarinFederations.objects.all()
    96     return render_to_response('fede/fede_list.html', {'federations_list': fede_list, 'title': "CLARIN Members"})
    97 
    98 def contacts_list(request):
    99     center_list = Center.objects.all()
    100     return render_to_response('center/Contact_list.html', {'center_list': center_list, 'title': "Center Contacts"})
    101 
    102 def contacts_list_tec(request):
    103     center_list = Center.objects.all()
    104     return render_to_response('center/tt.html', {'center_list': center_list, 'title': "Center Technical Contacts"})
    105 
    106 def contacts_list_sec(request):
    107     center_list = Center.objects.all()
    108     return render_to_response('center/sc.html', {'center_list': center_list, 'title': "Center Security Contacts"})
    109175
    110176def restlist(request):
     
    129195def jsondetail(request, center_id):
    130196    mycenter = get_object_or_404(Center, pk=center_id)
    131  #   mycenterstring = render_to_response('center/centerxmldetail.xml', {'center': mycenter, 'title': "Center Detail view"}, mimetype="application/xhtml+xml")
    132197    mycenterstring = render_to_response('center/centerxmldetail2.xml', {'center': mycenter, 'title': "Center Detail view"}, mimetype="application/xhtml+xml")
    133 ##   """Convert an XML string into a JSON string."""
    134 
    135198    elem = ET.fromstring(mycenterstring.content)
    136199    elem2 = elem_to_internal(elem,strip=1)
    137200    jsontest = simplejson.dumps(elem_to_internal(elem,strip=1))
    138   # return render_to_response( jsontest, mimetype="application/json")
    139201    return  HttpResponse("%s" %     elem2 )
    140   #  return HttpResponse("You're looking at the results of poll %s." % jsontest )
    141 
    142 
    143 
    144 
     202
     203
     204
     205
  • CenterRegistry/trunk/settings.py

    r2807 r2895  
    11# Django settings for CenterRegistry project.
     2
     3import os
    24
    35#for repository we had to have:
     
    57#DEBUG = False
    68
    7 #DEBUG = True
    8 DEBUG = False
     9DEBUG = True
     10#DEBUG = False
    911TEMPLATE_DEBUG = DEBUG
    1012
     
    4547USE_I18N = True
    4648
    47 # If you set this to False, Django will not format dates, numbers and
    48 # calendars according to the current locale
     49# If you set this to False, Django will notq
    4950USE_L10N = True
    5051
     
    6263# in apps' "static/" subdirectories and in STATICFILES_DIRS.
    6364# Example: "/home/media/media.lawrence.com/static/"
    64 STATIC_ROOT = ''
     65#STATIC_ROOT = ''
    6566
     67PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
     68STATICFILES_DIRS = ( 
     69                    os.path.join(PROJECT_DIR, 'media/'),
     70)
     71
     72STATIC_ROOT= os.path.join(PROJECT_DIR,'static/')
     73#STATIC_ROOT= '/static/'
    6674# URL prefix for static files.
    6775# Example: "http://media.lawrence.com/static/"
     
    99107)
    100108
     109
    101110MIDDLEWARE_CLASSES = (
    102111    'django.middleware.common.CommonMiddleware',
     
    133142)
    134143
     144
    135145INSTALLED_APPS = (
    136146    'django.contrib.auth',
     
    145155    'django.contrib.admindocs',
    146156    'django.contrib.staticfiles',
    147     'centerregistry',
     157    'centerregistry',   
    148158    'south'
    149159)
  • CenterRegistry/trunk/templates/center/EP_list.html

    r2807 r2895  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    2 <html>
    3 <head>
    4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    5 <title>OAI-PMH endpoints</title>
    6 </head>
    7 <body>
    8 <h1> List of {{ title }}</h1>
    9 
     1{% extends "center/base.html" %}
     2{% block "extrahead" %}
     3        <style type="text/css">
     4                .col0 { width: 4em; }
     5                .col1 { width: 8em; }
     6                .col2 { width: 20em; }
     7                .col3 { width: 8em; }
     8                .col4 { width: 14em; }
     9        </style>
     10{% endblock %}
     11{% block "maincontent" %}
    1012<table border=1 class="bgcolor1" cellspacing=0 cellpadding=6  width="100%" >
    1113   <tr>
     
    1618            <td width="120" align="center" > <b> OaiAccessPoint </b></td>
    1719            </tr></table></td>
    18             <td width="120" align="links" > <b> Administrative Contact </b></td>
    1920   </tr>
    2021{% for center in center_list %}
    2122 <tr>
    22  <td> <a href="/centers/{{center.id }}" >{{center.code}}</a></td>
     23 <td> <a href="/centers/{{ center.id }}">{{center.code}}</a></td>
    2324 <td> <table border=0 class="bgcolor1" cellspacing=0 cellpadding=6  width="100%" >
    2425 {% for choice in center.metadata.all %}
     
    2829 , {{choice2.name}}
    2930 {% endfor %}   </td>
    30  <td align="links"><a href="{{choice.OAI_accespoint}}" > {{choice.OAI_accespoint}} </td>
     31 <td align="right"><a href="{{choice.OAI_accespoint}}" > {{choice.OAI_accespoint}} </td>
    3132 {% endfor %}
    3233  </tr>
    3334 </table> </td>
    34 <td> <a href="{{ center.admin_contact.website }}" > {{center.admin_contact.website}}</a></td>
    3535 </tr>
    36  {% endfor %}
     36 {% endfor %} 
    3737</table>
    38 </body>
    39 </html>
     38<
     39{% endblock %}
  • CenterRegistry/trunk/templates/center/Topframe.html

    r2807 r2895  
    1212<td> <a href="http://www.clarin.eu/internal" target="_blank"> <img src="/static/images/clarin.jpg" type =image/jpg alt="ClarinLogo" /> </td>
    1313
    14 <td aling="rechts"> <h1 style="font-size:200%; color:blue">Center Registry</h1></td>
     14<td aling="rechts"> <h1 style="font-size:200%; color:#0e4071">Center Registry</h1></td>
    1515</table>
    1616
  • CenterRegistry/trunk/templates/center/base.html

    r2807 r2895  
    44<head>
    55        <title>{% if title %}{{title}}{% else %}CLARIN Center Registry{% endif %}</title>
    6        <!--  <link rel="stylesheet" href="/static/css/cr.css"> -->
     6 
     7        <link rel="stylesheet" href="/static/css/cr.css">
     8        {% load static %}
    79        {% block "extrahead" %}
    810        {% endblock %}
    911</head>
    10 
    1112<body>
    1213        <h1>{{title}}</h1>
  • CenterRegistry/trunk/templates/center/center_detail.html

    r2244 r2895  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    2 <html>
    3 <head>
    4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    5 <title> {{title}} </title>
    6 </head>
    7 <body>
     1{% extends "center/base.html" %}
     2 
     3{% block "extrahead" %}
     4        <style type="text/css">
     5                .col0 { width: 8em; }
     6                .col1 { width: 8em; }
     7                .col2 { width: 20em; }
     8                .col3 { width: 8em; }
     9                .col4 { width: 14em; }
     10        </style>
     11{% endblock %}
     12
     13{% block "maincontent" %}
    814{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
    915<h2> Details for center:   {{center.name}} </h2>
     
    1824 <table>
    1925 <tr><td width="120" align="link"><b>Description : </b></td>  <td> {{center.description}}</td> </tr>
    20  <tr><td width="120" align="link"><b>Country : </b></td>  <td> {{center.country}}</td> </tr>
     26 <tr><td width="120" align="link"><b>Member of : </b></td>    <td>
     27  {% for choice in center.clarinfed.all %} 
     28    <a href="{{choice.MemberFed.webseite}}"> {{choice.MemberFed}}</a> ,
     29    {% endfor  %}   </td>  </tr>
    2130 <tr><td width="122" align="link"><b>Assessment : </b></td>  <td> {{center.assesmentstatus}}</td> </tr>
    2231 </table>
     
    4251 <tr><td width="43" align="link"></td><td width="313" align="link"><b>AAI status: </b></td>  <td> {{center.aaiStatus}}</td> </tr>     
    4352 <tr><td width="43" align="link"></td> <td width="200" align="link"><b>CLarin Infrastructure services: </b></td>  <td> {{center.memberofSpf}}</td> </tr>
    44  <tr><td width="43" align="link"></td><td width="343" align="link"><b>Member of CLARIN service Provider Federation: </b></td>  <td> {{center.memberofNationalFederation}}</td> </tr> 
     53 <tr><td width="43" align="link"></td><td width="343" align="link"><b>Member of CLARIN service Provider Federation: </b></td>
     54  <td> {{center.memberofSpf}}</td> </tr> 
    4555        {% for choice in center.nacfed.all %}
    4656 <tr><td width="43" align="link"></td><td width="243" align="link"><b>Member Of NationalFederation : </b></td>  <td>  {{choice.name}}</td> </tr> 
     
    7888  <tr><td width="43" align="link"></td><td width="43" align="link"></td> <td width="165" height="18" align="left"><b>Working Unit</b></td><td>  {{center.WorkingUnit}} </td> </tr>
    7989  <tr><td width="43" align="link"></td> <td width="43" align="link"></td><td width="165" height="18" align="left"><b>Code</b></td><td>  {{center.code}} </td> </tr>
    80  <tr><td width="43" align="link"><td width="43" align="link"></td><td width="113" align="link"><b>Post Address</b></td>  <td> {{center.direction}}, {{center.city}}
    81                                                                 {{center.country}}  <br>
     90 <tr><td width="43" align="link"><td width="43" align="link"></td><td width="113" align="link"><b>Post Address</b></td>
     91    <td> {{center.direction}}, {{center.city}} {{center.country}}  <br>
    8292                                                                {{center.lon}} {{center.lat}} </td> </tr>
    8393                                                               
     
    103113 </table>
    104114
    105 </body>
    106 </html>
     115{% endblock %}
  • CenterRegistry/trunk/templates/center/center_detail2.html

    r2807 r2895  
    4646 <tr><td width="43" align="link"></td><td width="313" align="link"><b>AAI status: </b></td>  <td> {{center.aaiStatus}}</td> </tr>     
    4747 <tr><td width="43" align="link"></td> <td width="200" align="link"><b>CLarin Infrastructure services: </b></td>  <td> {{center.memberofSpf}}</td> </tr>
    48  <tr><td width="43" align="link"></td><td width="343" align="link"><b>Member of CLARIN service Provider Federation: </b></td>  <td> {{center.memberofNationalFederation}}</td> </tr> 
     48 <tr><td width="43" align="link"></td><td width="343" align="link"><b>Member of CLARIN service Provider Federation: </b></td>  <td> {{center.memberofSpf}}</td> </tr> 
    4949        {% for choice in center.nacfed.all %}
    5050 <tr><td width="43" align="link"></td><td width="243" align="link"><b>Member Of NationalFederation : </b></td>  <td>  {{choice.name}}</td> </tr> 
  • CenterRegistry/trunk/templates/center/frameset.html

    r2807 r2895  
    1313<frameset cols="200,*" frameborder="0" border="0" framespacing="0">
    1414        <frame name="menu" src="/menu"  marginheight="0" marginwidth="0" scrolling="auto" noresize>
    15         <frame name="content" src="/home" marginheight="0" marginwidth="0" scrolling="auto" noresize>
     15        <frame name="content" src="/centers" marginheight="0" marginwidth="0" scrolling="auto" noresize>
    1616
    1717<noframes>
  • CenterRegistry/trunk/templates/center/lista.html

    r2807 r2895  
    1212
    1313{% block "maincontent" %}
     14
     15Group by: <a href="?group_by=NacCon"> National Consortium</a> - <a href="?group_by=country">Country</a> -
     16          <a href="?group_by=typeCenter"> Center Type</a>
     17
     18<br>
    1419<table border=1 class="bgcolor1" cellspacing=0 cellpadding=6  width="90%" >
    15 
    1620        <tr>
    17             <td width="120" height="18" align="left"><b>Center</b></td>
     21            <td width="220" height="18" align="left"><b>Center</b></td>
    1822            <td width="120" align="links"><b>Repository</b></td>
    19             <td width="120" align="links" title="Center Status"><b>CenterStatus</b></td>
    20             <td width="100" align="links" title="Country/Fed"><b>Member of Federation</b></td>
    21             <td width="450" align="links"><b>Metadata   </b></td>
    22   <!--  <td width="286" align="links"><b>Metadata</b></td>   -->
    23             <td width="100" align="links"><b><a href="http://www.clarin.eu/glossary/term/53"><acronym title="Authentication and Authorization Infrastructure">AAI</acronym></a></b></td>
    24             <td width="100" align="left" title="Persistent Identifier"><b><a href="http://www.clarin.eu/glossary/term/61"> PID</a></b></td>
    25             <td width="100" align="left" title="Self-assessment round 2"><b>assessment</b></td>
     23            <td width="120" align="links" title="Status"><b>Status</b></td>
     24            <td width="100" align="links" title="Country/Fed"><b>National Consortium</b></td>
     25            <td width="100" align="links"><b>Metadata</b></td>
     26            <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>
    2629            <br> </tr>
    27         {% for center in center_list %}
     30        {% for center in centers_list %}
    2831        <tr>
    2932        <td> <a href="/centers/{{ center.id }}" >{{center.name}}</a></td>
  • CenterRegistry/trunk/templates/center/menu.html

    r2807 r2895  
    1818       -->
    1919        <ul>
    20                 <li><a href="/centers/" target="content">List of centers</a>
    21                 <li><a href="/contacts_tec/" target="content">Centers Technical Contacts</a>
    22                 <li><a href="/contacts_sec/" target="content">Centers Security Contacts</a>
    23                 <li><a href="/contacts/" target="content">Centers Admin Contacts</a>
     20                <li><a href="/centers/" target="content">Centers</a>
     21                <li><a href="/contacts/" target="content">Centers Contacts</a>
    2422                <li><a href="/endpoints/" target="content">OAI-PMH endpoints</a>
    25                 <li><a href="/federations/" target="content">CLARIN Members</a>
    26                 <li><a href="/secure/admin/" target="content">Admin</a>
    27                
     23                <li><a href="/consortia/" target="content">CLARIN Members</a>
     24                <li><a href="/secure/admin/" target="content">Admin</a> 
    2825        </ul>
    2926       <br>
     
    4138<!-- Footer =============================================================== -->
    4239<tr align="center">
    43   <td> ©The Center Registry has been developed by 
     40 <td> ©The Center Registry has been developed by 
    4441  <a href="http://www.clarin-d.de" target="content">CLARIN-D</a> </td>
    4542</tr>
  • CenterRegistry/trunk/templates/center/sc.html

    r2807 r2895  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    2 <html>
    3 <head>
    4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    5 <title>Insert title here</title>
    6 </head>
    7 <body>
    8 <h1> List of {{ title }}</h1>
     1{% extends "center/base.html" %}
     2 
     3{% block "extrahead" %}
     4        <style type="text/css">
     5                 .col0 { width: 18em; }
     6                table { empty-cells: show; font-size: 12px; }
     7                .col1 { width: 18em; }
     8                .col2 { width: 14em; }
     9                .col3 { width: 11em; }
     10                .col4 { width: 24em; }
     11        </style>
     12{% endblock %}
     13
     14{% block "maincontent" %}
     15<h2>List of all Centers Contacts</h2>       
     16        Group by: <a href="?group_by=Admin">Admin</a> - <a href="?group_by=Technical">Technical</a> 
     17        - <a href="?group_by=Security">Security</a>
     18        <br />
     19  <h2>{{group_by}}</h2>
     20 
    921 <table border=1 class="bgcolor1" cellspacing=0 cellpadding=6  width="100%" >
    1022  <tr>
    11             <td width="120" height="18" align="left"><b>Center</b></td>
    12             <td width="120" align="links"><b>Name </b></td>
    13             <td width="120" align="links" > <b>Telephone </b></td>
    14             <td width="120" align="links" title="Country"><b>Mail </b></td>
    15             <td width="120" align="links"><b>Webpage</b></td>
     23                                <th class="col1">Center</th>
     24                        <th class="col2">Name</th>
     25                        <th class="col3">Telephone</th>
     26                        <th class="col2">Mail</th>
     27                        <th class="col4">Webpage</th>   
    1628   </tr>
    17   {% for center in center_list %}
     29  {% for center in centers %}
    1830        <tr>
    19         <td> <a href="/centers/{{ center.id }}" >{{center.code}}</a></td>
     31        <td> <a href="/centers/{{ center.id }}" >{{center.name}}</a></td>
    2032 <td> <a href="{{ center.security_contact.website }}" > {{center.security_contact}} </a> </td>
    2133 <td> {{center.security_contact.telephone}}</td>
     
    2436 
    2537 </tr>
    26  
    2738        {% endfor %}
    2839 </table>
    29 
    30 </body>
    31 </html>
     40{% endblock %}
  • CenterRegistry/trunk/templates/center/tt.html

    r2807 r2895  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    2 <html>
    3 <head>
    4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    5 <title>Insert title here</title>
    6 </head>
    7 <body>
    8 <h1> List of {{ title }}</h1>
     1{% extends "center/base.html" %}
     2 
     3{% block "extrahead" %}
     4        <style type="text/css">
     5                .col0 { width: 8em; }
     6                .col1 { width: 8em; }
     7                .col2 { width: 20em; }
     8                .col3 { width: 8em; }
     9                .col4 { width: 14em; }
     10                   .col0 { width: 18em; }
     11                table { empty-cells: show; font-size: 12px; }
     12                .col1 { width: 18em; }
     13                .col2 { width: 14em; }
     14                .col3 { width: 11em; }
     15                .col4 { width: 24em; }
     16        </style>
     17{% endblock %}
     18
     19{% block "maincontent" %}
     20<h2>List of all Centers Contacts</h2>       
     21        Group by: <a href="?group_by=Admin">Admin</a> - <a href="?group_by=Technical">Technical</a> 
     22        - <a href="?group_by=Security">Security</a>
     23        <br />
     24  <h2>{{group_by}}</h2>
     25
    926 <table border=1 class="bgcolor1" cellspacing=0 cellpadding=6  width="100%" >
    1027  <tr>
    11             <td width="120" height="18" align="left"><b>Center</b></td>
    12             <td width="120" align="links"><b>Name </b></td>
    13             <td width="120" align="links" > <b>Telephone </b></td>
    14             <td width="120" align="links" title="Country"><b>Mail </b></td>
    15             <td width="120" align="links"><b>Webpage</b></td>
     28                                <th class="col1">Center</th>
     29                        <th class="col2">Name</th>
     30                        <th class="col3">Telephone</th>
     31                        <th class="col2">Mail</th>
     32                        <th class="col4">Webpage</th>     
    1633   </tr>
    17   {% for center in center_list %}
     34  {% for center in centers %}
    1835        <tr>
    19         <td> <a href="/centers/{{ center.id }}" >{{center.code}}</a></td>
     36        <td> <a href="/centers/{{ center.id }}" >{{center.name}}</a></td>
    2037 <td> <a href="{{ center.tech_contact.website }}" > {{center.tech_contact}} </a> </td>
    2138 <td> {{center.tech_contact.telephone}}</td>
     
    2744        {% endfor %}
    2845 </table>
    29 
    30 </body>
    31 </html>
     46{% endblock %}
  • CenterRegistry/trunk/urls.py

    r2807 r2895  
    55admin.autodiscover()
    66#new for rest
    7 from centerregistry.views import index, menu, topframe,  home, federations_list, centers_all_list, contacts_list_sec, contacts_list_tec, endpoints_all_list, center_detail, resttest, restlist, contacts_list, jsonlist, jsondetail, error404
     7from centerregistry.views import index, menu, consortia_list,contact_list, NacCon_list, topframe, centers_list, endpoints_all_list, center_detail, resttest, restlist, jsonlist, error404
    88from django.contrib.staticfiles.urls import staticfiles_urlpatterns
     9
     10
    911## new
    1012#handler404 = 'centerregistry.views.page_not_found'
     
    1921    url(r'^secure/admin/doc/', include('django.contrib.admindocs.urls')),
    2022    url(r'^secure/admin/', include(admin.site.urls)),
    21     url(r'^contacts_tec/$', contacts_list_tec, name="contacts-list-tec"),
    22     url(r'^contacts_sec/$', contacts_list_sec, name="contacts-list-sec"),
    23     url(r'^contacts/$', contacts_list, name="contacts-list"),
    24     url(r'^centers/$', centers_all_list, name="centers-list"),
     23    url(r'^contacts/$', contact_list, name="contacts-list"),
     24    url(r'^centers/$', centers_list, name="centers-list"),
    2525    url(r'^centers/(?P<center_id>\d+)/?$', center_detail),     
    2626    url(r'^endpoints/$', endpoints_all_list, name="endpoints-list"),
    27     url(r'^federations/$', federations_list, name="federations-list"),
     27    url(r'^consortia/$', consortia_list, name="consortia-list"),
     28    url(r'^consortia/(?P<clarinfederations_id>\d+)/?$', NacCon_list, name="consortia-centers-list"),
    2829    url(r'^restxml/$', restlist ),
    2930    url(r'^restxml/(?P<center_id>\d+)/?$', resttest ),
    3031    url(r'^restjson/$', jsonlist ),
    31  #   url(r'^restjson/(?P<center_id>\d+)/$', jsondetail ),
     32
    3233    # incluir lo  que sea necesario
    3334    (r'^index/', index),
     
    3536    (r'/(?P<center_id>\d+)', index),
    3637    (r'^top/', topframe), 
    37     (r'^menu/', menu),
    38     (r'^home/', home),
     38    (r'^menu/', menu)
    3939)
    4040
Note: See TracChangeset for help on using the changeset viewer.