/templates/admin/library/ldda_permissions.mako

https://bitbucket.org/ialbert/galaxy-genetrack · Mako · 62 lines · 57 code · 5 blank · 0 comment · 3 complexity · 8bfed5c03ae56747e56ad06a82fbe68c MD5 · raw file

  1. <%inherit file="/base.mako"/>
  2. <%namespace file="/message.mako" import="render_msg" />
  3. <%namespace file="/dataset/security_common.mako" import="render_permission_form" />
  4. <% from galaxy import util %>
  5. <%
  6. roles = trans.app.model.Role.filter( trans.app.model.Role.table.c.deleted==False ).order_by( trans.app.model.Role.table.c.name ).all()
  7. lddas = util.listify( ldda )
  8. if len( lddas ) > 1:
  9. name_str = '%d selected datasets' % len( lddas )
  10. else:
  11. name_str = ldda.name
  12. %>
  13. <br/><br/>
  14. <ul class="manage-table-actions">
  15. <li>
  16. <a class="action-button" href="${h.url_for( controller='admin', action='browse_library', id=library_id )}"><span>Browse this data library</span></a>
  17. </li>
  18. </ul>
  19. %if msg:
  20. ${render_msg( msg, messagetype )}
  21. %endif
  22. %if len( lddas ) > 1:
  23. <div class="toolFormTitle">Manage the following selected datasets</div>
  24. <p/>
  25. <table cellspacing="0" cellpadding="5" border="0" width="100%" class="libraryTitle">
  26. %for ldd_assoc in lddas:
  27. <tr>
  28. <td>
  29. <div class="rowTitle">
  30. <span class="historyItemTitle"><b>${ldd_assoc.name}</b></span>
  31. <a id="ldda-${ldd_assoc.id}-popup" class="popup-arrow" style="display: none;">&#9660;</a>
  32. </div>
  33. <div popupmenu="ldd_assoc-${ldd_assoc.id}-popup">
  34. <a class="action-button" href="${h.url_for( controller='admin', action='library_dataset', id=ldd_assoc.library_dataset_id, library_id=library_id )}">Manage this dataset's versions</a>
  35. </div>
  36. </td>
  37. <td>
  38. %if ldd_assoc == ldd_assoc.library_dataset.library_dataset_dataset_association:
  39. <i>This is the latest version of this library dataset</i>
  40. %else:
  41. <font color="red"><i>This is an expired version of this library dataset</i></font>
  42. %endif
  43. </td>
  44. </tr>
  45. %endfor
  46. </table>
  47. <p/>
  48. %else:
  49. %if ldda == ldda.library_dataset.library_dataset_dataset_association:
  50. <b><i>This is the latest version of this library dataset</i></b>
  51. %else:
  52. <font color="red"><b><i>This is an expired version of this library dataset</i></b></font>
  53. %endif
  54. <p/>
  55. %endif
  56. <% ldda_ids = ",".join( [ str( d.id ) for d in lddas ] ) %>
  57. ${render_permission_form( lddas[0], name_str, h.url_for( controller='admin', action='library_dataset_dataset_association', library_id=library_id, folder_id=lddas[0].library_dataset.folder.id, id=ldda_ids, permissions=True ), roles )}