/templates/page/history_annotation_table.mako

https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 61 lines · 50 code · 2 blank · 9 comment · 2 complexity · 90cf3b6ab9ae63f88418a496b1cda144 MD5 · raw file

  1. <%namespace file="../tagging_common.mako" import="render_tagging_element_html" />
  2. <%namespace file="../root/history_common.mako" import="render_dataset" />
  3. <div class="annotated_item">
  4. <table>
  5. ## Table header.
  6. <tr>
  7. <th colspan='2'>History '${history.get_display_name()}'</th>
  8. </tr>
  9. <tr>
  10. ## Status messages and tags.
  11. <td colspan='2'>
  12. %if history.deleted:
  13. <div class="warningmessagesmall">
  14. ${_('This is a deleted history.')}
  15. </div>
  16. %endif
  17. ## Tags come for free with community tagging, so not sure if this is necessary.
  18. ##%if trans.get_user() is not None:
  19. ## Tags: ${render_tagging_element_html( tags=history.tags, editable=False, use_toggle_link=False )}
  20. ##%endif
  21. </td>
  22. </tr>
  23. <tr>
  24. <td colspan="2" class="annotation" item_class="History" item_id="${trans.security.encode_id( history.id )}">Description of History:
  25. <ol>
  26. <li>What was the motivation for this history?
  27. <li>What is the outcome of this history?
  28. <li>What are unresolved questions from this history?
  29. <li>What new questions arise from this history?
  30. </ol>
  31. </td>
  32. </tr>
  33. ## Table body. For each dataset, there is an area to annotate the dataset.
  34. %if not datasets:
  35. <tr>
  36. <td>
  37. <div class="infomessagesmall" id="emptyHistoryMessage">
  38. ${_("Your history is empty. Click 'Get Data' on the left pane to start")}
  39. </div>
  40. </td>
  41. </tr>
  42. %else:
  43. ## Render requested datasets.
  44. %for data in datasets:
  45. %if data.visible:
  46. <tr>
  47. <td valign="top" class="annotation" item_class="HistoryDatasetAssociation" item_id="${trans.security.encode_id( data.id )}">Describe this step: why was it done? what data did it produce?</td>
  48. ##<td valign="top" class="annotation">Describe this step: why was it done? what data does it produce?</td>
  49. <td>
  50. <div class="historyItemContainer" id="historyItemContainer-${data.id}">
  51. ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing = False )}
  52. </div>
  53. </td>
  54. </tr>
  55. %endif
  56. %endfor
  57. %endif
  58. </table>
  59. </div>