/templates/library/common/library_dataset_info.mako

https://bitbucket.org/cistrome/cistrome-harvard/ · Mako · 70 lines · 64 code · 6 blank · 0 comment · 4 complexity · 2e244917b916ed9c8514e141e3476b2d MD5 · raw file

  1. <%inherit file="/base.mako"/>
  2. <%namespace file="/message.mako" import="render_msg" />
  3. <%namespace file="/common/template_common.mako" import="render_template_fields" />
  4. <%def name="javascripts()">
  5. ${parent.javascripts()}
  6. </%def>
  7. %if library_dataset == library_dataset.library_dataset_dataset_association.library_dataset:
  8. <b><i>This is the latest version of this library dataset</i></b>
  9. %else:
  10. <font color="red"><b><i>This is an expired version of this library dataset</i></b></font>
  11. %endif
  12. <p/>
  13. <ul class="manage-table-actions">
  14. <li>
  15. <a class="action-button" href="${h.url_for( controller='library_common', action='browse_library', cntrller=cntrller, id=library_id, use_panels=use_panels, show_deleted=show_deleted )}"><span>Browse this data library</span></a>
  16. </li>
  17. </ul>
  18. %if message:
  19. ${render_msg( message, status )}
  20. %endif
  21. %if ( trans.user_is_admin() and cntrller=='library_admin' ) or trans.app.security_agent.can_modify_library_item( current_user_roles, library_dataset ):
  22. <div class="toolForm">
  23. <div class="toolFormTitle">Edit attributes of ${library_dataset.name}</div>
  24. <div class="toolFormBody">
  25. <form name="edit_attributes" action="${h.url_for( controller='library_common', action='library_dataset_info', id=trans.security.encode_id( library_dataset.id ), library_id=library_id, show_deleted=show_deleted )}" method="post">
  26. <div class="form-row">
  27. <label>Name:</label>
  28. <div style="float: left; width: 250px; margin-right: 10px;">
  29. <input type="text" name="name" value="${library_dataset.name}" size="40"/>
  30. </div>
  31. <div style="clear: both"></div>
  32. </div>
  33. <div class="form-row">
  34. <label>Info:</label>
  35. <div style="float: left; width: 250px; margin-right: 10px;">
  36. <input type="text" name="info" value="${library_dataset.info}" size="40"/>
  37. </div>
  38. <div style="clear: both"></div>
  39. </div>
  40. <div class="form-row">
  41. <input type="submit" name="edit_attributes_button" value="Save"/>
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. %else:
  47. <div class="toolForm">
  48. <div class="toolFormTitle">View information about ${library_dataset.name}</div>
  49. <div class="toolFormBody">
  50. <div class="form-row">
  51. <b>Name:</b> ${library_dataset.name}
  52. <div style="clear: both"></div>
  53. <b>Info:</b> ${library_dataset.info}
  54. <div style="clear: both"></div>
  55. <b>Dataset Versions:</b>
  56. <div style="clear: both"></div>
  57. </div>
  58. <div style="clear: both"></div>
  59. </div>
  60. </div>
  61. %endif
  62. %if widgets:
  63. ${render_template_fields( cntrller, item_type='library_dataset', widgets=widgets, widget_fields_have_contents=widget_fields_have_contents, library_id=library_id, info_association=None, inherited=False, editable=False )}
  64. %endif