Changeset 8296 for mauRepo/MolesManager
- Timestamp:
- 02/05/12 14:06:03 (9 years ago)
- Location:
- mauRepo/MolesManager/trunk/src/MolesManager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/MolesManager/static/templates/cedaSearchResults.html
r8290 r8296 9 9 <div class="grid_12"> 10 10 <h5>Search Results</h5> 11 <script type="text/javascript"> 12 require(['dojox/grid/DataGrid']); 13 </script> 14 <script> 15 /* 16 jquery tablesorter functionality 17 $(function() { 18 $("#restab").tablesorter(); 19 }); 20 */ 21 </script> 11 22 </div> <!-- End of div stuff --> 12 23 <div class="grid_12 claro fillWhite"> … … 14 25 {% csrf_token %} 15 26 <div id="searchResults"> 16 <ol> 17 {% for location, id in searchResults %} 18 <li><a href="{{ location }}">{{ id }}</a></li> 27 <table id="restab" border="1"> 28 <thead> 29 <tr> 30 <th>Location</th> 31 <th>Id</th> 32 <th>Author</th> 33 </tr> 34 </thead> 35 <tbody> 36 {% for location, id, auth in searchResults %} 37 <tr bgcolor="white"> 38 <td>{{ location }}</td> 39 <td><a href="{{ location }}">{{ id }}</a></td> 40 <td>{{ auth }}</td> 41 </tr> 19 42 {% endfor %} 20 </ol> 43 </tbody> 44 </table> 21 45 </div> <!-- End of div myForm --> 22 46 </div> <!-- End of div claro --> -
mauRepo/MolesManager/trunk/src/MolesManager/views/cedaSearch.py
r8291 r8296 27 27 if not keywords.endswith("'"): 28 28 keywords = keywords + "'" 29 obsevations = Moles3EPB.extractObservationByTitleKeywords(keywords, request.moles_session) 29 obsevations = Moles3EPB.extractObservationByTitleKeywords(keywords, request.moles_session) 30 30 titles = [] 31 31 ids = [] 32 32 list_list = [] 33 33 baseCov = "http://" + request.get_host() + "/cov/" 34 O = None35 34 for o in obsevations: 36 titles.append("".join(37 [baseCov,38 str(o.id)39 ]))40 ids.append(o.id)41 35 a = "".join( 42 36 [baseCov, 43 37 str(o.id)]) 44 list_list.append((a, o.description)) 45 O = o 38 auth_query = Moles3EPB.observationAuthor(o.id, request.moles_session) 39 ath = auth_query.all() 40 ath0 = ath[0] 41 list_list.append((a, o.description, ath0.role)) 46 42 return list_list 47 43
Note: See TracChangeset
for help on using the changeset viewer.