Changeset 8312 for mauRepo/MolesManager
- Timestamp:
- 11/05/12 14:12:37 (9 years ago)
- Location:
- mauRepo/MolesManager/trunk/src/MolesManager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/MolesManager/static/templates/cedaBrowse.html
r8311 r8312 82 82 // setup accordian 83 83 $( "#accordion1" ).accordion(); 84 84 // setup help dialog 85 var $helpdialog = $('<div></div>') 86 .html('For Assistance please contact <a href="mailto: {{ email_contact_addr }}">{{ email_contact_name }}</a>') 87 .dialog({ 88 autoOpen: false, 89 show: "blind", 90 hide: "explode", 91 title: 'Help' 92 }); 93 $("#b_help").click(function() { 94 $helpdialog.dialog('open'); 95 return false; 96 }); 97 // setup citation dialog 98 var $citationdialog = $('<div></div>') 99 .html('{{ citation }}') 100 .dialog({ 101 autoOpen: false, 102 show: "blind", 103 hide: "explode", 104 title: 'Help' 105 }); 106 $("#b_cit").click(function() { 107 $citationdialog.dialog('open'); 108 return false; 109 }); 85 110 // setup openlayers map 86 111 var map;// = new OpenLayers.Map("map"); … … 136 161 {{ title }}.{{ author }}.{{ DOI }} 137 162 </textarea> 163 <button id="b_citby" style="float:right">Cited by</button> 164 <button id="b_cit" style="float:right">Citation</button> 138 165 </p> 139 166 </div> … … 151 178 <button id="b3">apply for access</button> 152 179 <br/> 153 <button id="b 4">help</button>180 <button id="b_help">help</button> 154 181 </p> 155 182 </div> … … 314 341 <p> 315 342 <button id="b9">file list and checksums</button> 343 <br/> 344 <button id="b10">XML</button> 316 345 </p> 317 346 </div> -
mauRepo/MolesManager/trunk/src/MolesManager/views/cedaBrowse.py
r8311 r8312 14 14 record = None 15 15 guid = None 16 c = {} 16 17 if obs_id: 17 18 record = _getCedaObservation(request, obs_id) 18 19 guid = Moles3EPB.retrieveGUIDFromInstance(record, request.moles_session) 19 c = {}20 c['guid'] = guid.id 20 21 c['abstract'] = record.inSupportOf.abstract 21 22 for v in record.identifier: … … 25 26 if v.role.name == 'cl_author': 26 27 c['author'] = v.party[0].name 28 if v.role.name == 'cl_pointofcontact': 29 c['email_contact_addr'] = v.party[0].contactInfo[0].address.electronicMailAddress[0]; 30 c['email_contact_name'] = v.party[0].name; 31 if v.role.name == 'cl_publisher': 32 c['publisher'] = v.party[0].name 33 if v.role.name == 'cl_coinvestigator': 34 c['co_investigator'] = v.party[0].name; 35 pubyear = record.resultTime.position.dateTime8601.year; 36 c['citation'] = mark_safe(c['author'] + ";" + c['co_investigator'] + "(" + pubyear + ")" + c['title'] + " " + c['publisher'] + " Available from : <a href=\"http://www.ceda.ac.uk/datacat/" + c['guid'] + "\" target=\"_blank\">http://www.ceda.ac.uk/datacat/" + c['guid'] +"</a>"); 27 37 c['status'] = record.publicationState.value 28 38 c['last_update_year'] = record.resultTime.position.dateTime8601.year
Note: See TracChangeset
for help on using the changeset viewer.