Changeset 8315 for mauRepo/MolesManager


Ignore:
Timestamp:
14/05/12 14:51:21 (8 years ago)
Author:
jhorton
Message:

added access button dialog

Location:
mauRepo/MolesManager/trunk/src/MolesManager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/static/templates/cedaBrowse.html

    r8314 r8315  
    120120          return false; 
    121121        }); 
     122        var $accessdialog = $('<div></div>') 
     123          .html('{{ permission }}') 
     124          .dialog({ 
     125            autoOpen: false, 
     126            show: "blind", 
     127            hide: "explode", 
     128            title: 'access' 
     129        }); 
     130        $("#b_access").click(function() { 
     131          $accessdialog.dialog('open'); 
     132          return false; 
     133        }); 
    122134        // setup openlayers map 
    123135        var map;// = new OpenLayers.Map("map"); 
     
    193205          <button id="b_download">download and services</button> 
    194206          <br/> 
    195           <button id="b3">apply for access</button> 
     207          <button id="b_access">apply for access</button> 
    196208          <br/> 
    197209          <button id="b_help">help</button> 
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaBrowse.py

    r8314 r8315  
    6464    c['download_link'] = record.result.source[0].linkage 
    6565    c['download_name'] = record.result.source[0].name 
     66    if len(record.permission.useLimitation[0]) != 0: 
     67        p = record.permission.useLimitation[0].split(' http://') 
     68        c['permission'] = mark_safe(p[0] + "  <a href=\"http://" + p[1] + "\" target=\"_blank\">" + p[1] + "<\a>"); 
     69    else: 
     70        c['permission'] = "These data may be open access. Please contact the data centre to enquire about access to these data." 
    6671    lk = [] 
    6772    for l in record.result.source: 
Note: See TracChangeset for help on using the changeset viewer.