[2] | 1 | <%inherit file="/base.mako"/> |
---|
| 2 | <%namespace file="/message.mako" import="render_msg" /> |
---|
| 3 | |
---|
| 4 | <% from galaxy.web.controllers.requests_admin import build_rename_datasets_for_sample_select_field %> |
---|
| 5 | |
---|
| 6 | <h3>Rename datasets for Sample "${sample.name}"</h3> |
---|
| 7 | |
---|
| 8 | <ul class="manage-table-actions"> |
---|
| 9 | <li> |
---|
| 10 | <a class="action-button" href="${h.url_for( controller='requests_admin', action='manage_datasets', sample_id=trans.security.encode_id( sample.id ) )}">Browse datasets</a> |
---|
| 11 | </li> |
---|
| 12 | <li> |
---|
| 13 | <a class="action-button" href="${h.url_for( controller='requests_common', action='manage_request', cntrller='requests_admin', id=trans.security.encode_id( sample.request.id ) )}">Browse this request</a> |
---|
| 14 | </li> |
---|
| 15 | </ul> |
---|
| 16 | |
---|
| 17 | %if message: |
---|
| 18 | ${render_msg( message, status )} |
---|
| 19 | %endif |
---|
| 20 | |
---|
| 21 | ${render_msg( 'A dataset can be renamed only if it is in <b>Not Started</b> state.', 'warning' )} |
---|
| 22 | <div class="toolForm"> |
---|
| 23 | <form name="rename_datasets" id="rename_datasets" action="${h.url_for( controller='requests_admin', action='rename_datasets', id_list=id_list, sample_id=trans.security.encode_id( sample.id ) )}" method="post" > |
---|
| 24 | <table class="grid"> |
---|
| 25 | <thead> |
---|
| 26 | <tr> |
---|
| 27 | <th>Prepend directory name</th> |
---|
| 28 | <th>Name</th> |
---|
| 29 | <th>Path on sequencer</th> |
---|
| 30 | </tr> |
---|
| 31 | <thead> |
---|
| 32 | <tbody> |
---|
| 33 | %for id in id_list: |
---|
| 34 | <% sample_dataset = trans.sa_session.query( trans.model.SampleDataset ).get( trans.security.decode_id( id ) ) %> |
---|
| 35 | %if sample_dataset.status == trans.app.model.Sample.transfer_status.NOT_STARTED: |
---|
| 36 | <tr> |
---|
| 37 | <td> |
---|
| 38 | <% rename_datasets_for_sample_select_field = build_rename_datasets_for_sample_select_field( trans, sample_dataset ) %> |
---|
| 39 | ${rename_datasets_for_sample_select_field.get_html()} |
---|
| 40 | </td> |
---|
| 41 | <td> |
---|
| 42 | <input type="text" name="new_name_${trans.security.encode_id( sample_dataset.id ) }" value="${sample_dataset.name}" size="100"/> |
---|
| 43 | </td> |
---|
| 44 | <td>${sample_dataset.file_path}</td> |
---|
| 45 | </tr> |
---|
| 46 | %endif |
---|
| 47 | %endfor |
---|
| 48 | </tbody> |
---|
| 49 | </table> |
---|
| 50 | <br/> |
---|
| 51 | <div class="form-row"> |
---|
| 52 | <input type="submit" name="rename_datasets_button" value="Save"/> |
---|
| 53 | <input type="submit" name="cancel_rename_datasets_button" value="Close"/> |
---|
| 54 | </div> |
---|
| 55 | </form> |
---|
| 56 | </div> |
---|