[2] | 1 | <%inherit file="/base.mako"/> |
---|
| 2 | <%namespace file="/message.mako" import="render_msg" /> |
---|
| 3 | |
---|
| 4 | <%def name="title()">${_('Edit Dataset Attributes')}</%def> |
---|
| 5 | |
---|
| 6 | <%def name="stylesheets()"> |
---|
| 7 | ${h.css( "base", "autocomplete_tagging" )} |
---|
| 8 | </%def> |
---|
| 9 | |
---|
| 10 | <%def name="javascripts()"> |
---|
| 11 | ${parent.javascripts()} |
---|
| 12 | ${h.js( "galaxy.base", "jquery.autocomplete", "autocomplete_tagging" )} |
---|
| 13 | </%def> |
---|
| 14 | |
---|
| 15 | <%def name="datatype( dataset, datatypes )"> |
---|
| 16 | <select name="datatype"> |
---|
| 17 | %for ext in datatypes: |
---|
| 18 | %if dataset.ext == ext: |
---|
| 19 | <option value="${ext}" selected="yes">${_(ext)}</option> |
---|
| 20 | %else: |
---|
| 21 | <option value="${ext}">${_(ext)}</option> |
---|
| 22 | %endif |
---|
| 23 | %endfor |
---|
| 24 | </select> |
---|
| 25 | </%def> |
---|
| 26 | |
---|
| 27 | %if message: |
---|
| 28 | ${render_msg( message, status )} |
---|
| 29 | %endif |
---|
| 30 | |
---|
| 31 | <div class="toolForm"> |
---|
| 32 | <div class="toolFormTitle">${_('Edit Attributes')}</div> |
---|
| 33 | <div class="toolFormBody"> |
---|
| 34 | <form name="edit_attributes" action="${h.url_for( controller='root', action='edit' )}" method="post"> |
---|
| 35 | <input type="hidden" name="id" value="${data.id}"/> |
---|
| 36 | <div class="form-row"> |
---|
| 37 | <label> |
---|
| 38 | Name: |
---|
| 39 | </label> |
---|
| 40 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 41 | <input type="text" name="name" value="${data.get_display_name()}" size="40"/> |
---|
| 42 | </div> |
---|
| 43 | <div style="clear: both"></div> |
---|
| 44 | </div> |
---|
| 45 | <div class="form-row"> |
---|
| 46 | <label> |
---|
| 47 | Info: |
---|
| 48 | </label> |
---|
| 49 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 50 | <input type="text" name="info" value="${data.info}" size="40"/> |
---|
| 51 | </div> |
---|
| 52 | <div style="clear: both"></div> |
---|
| 53 | </div> |
---|
| 54 | %if trans.get_user() is not None: |
---|
| 55 | <div class="form-row"> |
---|
| 56 | <label> |
---|
| 57 | Annotation / Notes: |
---|
| 58 | </label> |
---|
| 59 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 60 | <textarea name="annotation" cols="40" rows="2">${data_annotation}</textarea> |
---|
| 61 | </div> |
---|
| 62 | <div style="clear: both"></div> |
---|
| 63 | <div class="toolParamHelp">Add an annotation or notes to a dataset; annotations are available when a history is viewed.</div> |
---|
| 64 | </div> |
---|
| 65 | %endif |
---|
| 66 | %for name, spec in data.metadata.spec.items(): |
---|
| 67 | %if spec.visible: |
---|
| 68 | <div class="form-row"> |
---|
| 69 | <label> |
---|
| 70 | ${spec.desc}: |
---|
| 71 | </label> |
---|
| 72 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 73 | ${data.metadata.get_html_by_name( name, trans=trans )} |
---|
| 74 | </div> |
---|
| 75 | <div style="clear: both"></div> |
---|
| 76 | </div> |
---|
| 77 | %endif |
---|
| 78 | %endfor |
---|
| 79 | <div class="form-row"> |
---|
| 80 | <input type="submit" name="save" value="${_('Save')}"/> |
---|
| 81 | </div> |
---|
| 82 | </form> |
---|
| 83 | <form name="auto_detect" action="${h.url_for( controller='root', action='edit' )}" method="post"> |
---|
| 84 | <input type="hidden" name="id" value="${data.id}"/> |
---|
| 85 | <div class="form-row"> |
---|
| 86 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 87 | <input type="submit" name="detect" value="${_('Auto-detect')}"/> |
---|
| 88 | </div> |
---|
| 89 | <div class="toolParamHelp" style="clear: both;"> |
---|
| 90 | This will inspect the dataset and attempt to correct the above column values if they are not accurate. |
---|
| 91 | </div> |
---|
| 92 | </div> |
---|
| 93 | </form> |
---|
| 94 | %if data.missing_meta(): |
---|
| 95 | <div class="form-row"> |
---|
| 96 | <div class="errormessagesmall">${_('Required metadata values are missing. Some of these values may not be editable by the user. Selecting "Auto-detect" will attempt to fix these values.')}</div> |
---|
| 97 | </div> |
---|
| 98 | %endif |
---|
| 99 | </div> |
---|
| 100 | </div> |
---|
| 101 | <p /> |
---|
| 102 | <% converters = data.get_converter_types() %> |
---|
| 103 | %if len( converters ) > 0: |
---|
| 104 | <div class="toolForm"> |
---|
| 105 | <div class="toolFormTitle">${_('Convert to new format')}</div> |
---|
| 106 | <div class="toolFormBody"> |
---|
| 107 | <form name="convert_data" action="${h.url_for( controller='root', action='edit' )}" method="post"> |
---|
| 108 | <input type="hidden" name="id" value="${data.id}"/> |
---|
| 109 | <div class="form-row"> |
---|
| 110 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 111 | <select name="target_type"> |
---|
| 112 | %for key, value in converters.items(): |
---|
| 113 | <option value="${key}">${value.name}</option> |
---|
| 114 | %endfor |
---|
| 115 | </select> |
---|
| 116 | </div> |
---|
| 117 | <div class="toolParamHelp" style="clear: both;"> |
---|
| 118 | This will create a new dataset with the contents of this dataset converted to a new format. |
---|
| 119 | </div> |
---|
| 120 | <div style="clear: both"></div> |
---|
| 121 | </div> |
---|
| 122 | <div class="form-row"> |
---|
| 123 | <input type="submit" name="convert_data" value="${_('Convert')}"/> |
---|
| 124 | </div> |
---|
| 125 | </form> |
---|
| 126 | </div> |
---|
| 127 | </div> |
---|
| 128 | <p /> |
---|
| 129 | %endif |
---|
| 130 | |
---|
| 131 | <div class="toolForm"> |
---|
| 132 | <div class="toolFormTitle">${_('Change data type')}</div> |
---|
| 133 | <div class="toolFormBody"> |
---|
| 134 | %if data.datatype.allow_datatype_change: |
---|
| 135 | <form name="change_datatype" action="${h.url_for( controller='root', action='edit' )}" method="post"> |
---|
| 136 | <input type="hidden" name="id" value="${data.id}"/> |
---|
| 137 | <div class="form-row"> |
---|
| 138 | <label> |
---|
| 139 | ${_('New Type')}: |
---|
| 140 | </label> |
---|
| 141 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 142 | ${datatype( data, datatypes )} |
---|
| 143 | </div> |
---|
| 144 | <div class="toolParamHelp" style="clear: both;"> |
---|
| 145 | ${_('This will change the datatype of the existing dataset but <i>not</i> modify its contents. Use this if Galaxy has incorrectly guessed the type of your dataset.')} |
---|
| 146 | </div> |
---|
| 147 | <div style="clear: both"></div> |
---|
| 148 | </div> |
---|
| 149 | <div class="form-row"> |
---|
| 150 | <input type="submit" name="change" value="${_('Save')}"/> |
---|
| 151 | </div> |
---|
| 152 | </form> |
---|
| 153 | %else: |
---|
| 154 | <div class="form-row"> |
---|
| 155 | <div class="warningmessagesmall">${_('Changing the datatype of this dataset is not allowed.')}</div> |
---|
| 156 | </div> |
---|
| 157 | %endif |
---|
| 158 | </div> |
---|
| 159 | </div> |
---|
| 160 | <p /> |
---|
| 161 | |
---|
| 162 | %if trans.app.security_agent.can_manage_dataset( current_user_roles, data.dataset ): |
---|
| 163 | <%namespace file="/dataset/security_common.mako" import="render_permission_form" /> |
---|
| 164 | ${render_permission_form( data.dataset, data.get_display_name(), h.url_for( controller='root', action='edit', id=data.id ), all_roles )} |
---|
| 165 | %elif trans.user: |
---|
| 166 | <div class="toolForm"> |
---|
| 167 | <div class="toolFormTitle">View Permissions</div> |
---|
| 168 | <div class="toolFormBody"> |
---|
| 169 | <div class="form-row"> |
---|
| 170 | %if data.dataset.actions: |
---|
| 171 | <ul> |
---|
| 172 | %for action, roles in trans.app.security_agent.get_permissions( data.dataset ).items(): |
---|
| 173 | %if roles: |
---|
| 174 | <li>${action.description}</li> |
---|
| 175 | <ul> |
---|
| 176 | %for role in roles: |
---|
| 177 | <li>${role.name}</li> |
---|
| 178 | %endfor |
---|
| 179 | </ul> |
---|
| 180 | %endif |
---|
| 181 | %endfor |
---|
| 182 | </ul> |
---|
| 183 | %else: |
---|
| 184 | <p>This dataset is accessible by everyone (it is public).</p> |
---|
| 185 | %endif |
---|
| 186 | </div> |
---|
| 187 | </div> |
---|
| 188 | </div> |
---|
| 189 | %endif |
---|
| 190 | <p/> |
---|
| 191 | <div class="toolForm"> |
---|
| 192 | <div class="toolFormTitle">Copy History Item</div> |
---|
| 193 | <div class="toolFormBody"> |
---|
| 194 | <form name="copy_hda" action="${h.url_for( controller='dataset', action='copy_datasets', source_dataset_ids=data.id, target_history_ids=data.history_id )}" method="post"> |
---|
| 195 | <div class="form-row"> |
---|
| 196 | <input type="submit" name="change" value="Copy history item"/> |
---|
| 197 | <div class="toolParamHelp" style="clear: both;"> |
---|
| 198 | Make a copy of this history item in your current history or any of your active histories. |
---|
| 199 | </div> |
---|
| 200 | </div> |
---|
| 201 | </form> |
---|
| 202 | </div> |
---|
| 203 | </div> |
---|
| 204 | </div> |
---|