1 | <%inherit file="/base.mako"/> |
---|
2 | <%namespace file="/message.mako" import="render_msg" /> |
---|
3 | <%namespace file="/library/common/common.mako" import="render_template_fields" /> |
---|
4 | <% from galaxy import util %> |
---|
5 | |
---|
6 | <%def name="javascripts()"> |
---|
7 | ${parent.javascripts()} |
---|
8 | ${h.js("jquery.autocomplete", "autocomplete_tagging" )} |
---|
9 | </%def> |
---|
10 | |
---|
11 | <%def name="stylesheets()"> |
---|
12 | ${parent.stylesheets()} |
---|
13 | ${h.css( "autocomplete_tagging" )} |
---|
14 | </%def> |
---|
15 | |
---|
16 | %if ldda == ldda.library_dataset.library_dataset_dataset_association: |
---|
17 | <b><i>This is the latest version of this library dataset</i></b> |
---|
18 | %else: |
---|
19 | <font color="red"><b><i>This is an expired version of this library dataset</i></b></font> |
---|
20 | %endif |
---|
21 | <p/> |
---|
22 | |
---|
23 | <ul class="manage-table-actions"> |
---|
24 | <li> |
---|
25 | <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> |
---|
26 | </li> |
---|
27 | </ul> |
---|
28 | |
---|
29 | %if message: |
---|
30 | ${render_msg( message, status )} |
---|
31 | %endif |
---|
32 | |
---|
33 | <%def name="datatype( ldda, file_formats )"> |
---|
34 | <select name="datatype"> |
---|
35 | %for ext in file_formats: |
---|
36 | %if ldda.ext == ext: |
---|
37 | <option value="${ext}" selected="yes">${ext}</option> |
---|
38 | %else: |
---|
39 | <option value="${ext}">${ext}</option> |
---|
40 | %endif |
---|
41 | %endfor |
---|
42 | </select> |
---|
43 | </%def> |
---|
44 | |
---|
45 | %if ( trans.user_is_admin() and cntrller=='library_admin' ) or trans.app.security_agent.can_modify_library_item( current_user_roles, ldda.library_dataset ): |
---|
46 | <div class="toolForm"> |
---|
47 | <div class="toolFormTitle">Edit attributes of ${ldda.name}</div> |
---|
48 | <div class="toolFormBody"> |
---|
49 | <form name="edit_attributes" action="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=library_id, folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), use_panels=use_panels, show_deleted=show_deleted, )}" method="post"> |
---|
50 | <input type="hidden" name="id" value="${trans.security.encode_id( ldda.id )}"/> |
---|
51 | <div class="form-row"> |
---|
52 | <label>Name:</label> |
---|
53 | <input type="text" name="name" value="${ldda.name}" size="40"/> |
---|
54 | <div style="clear: both"></div> |
---|
55 | </div> |
---|
56 | <div class="form-row"> |
---|
57 | <label>Info:</label> |
---|
58 | <input type="text" name="info" value="${ldda.info}" size="40"/> |
---|
59 | <div style="clear: both"></div> |
---|
60 | </div> |
---|
61 | <div class="form-row"> |
---|
62 | <label>Message:</label> |
---|
63 | %if ldda.message: |
---|
64 | <textarea name="message" rows="3" cols="35">${ldda.message}</textarea> |
---|
65 | %else: |
---|
66 | <textarea name="message" rows="3" cols="35"></textarea> |
---|
67 | %endif |
---|
68 | <div class="toolParamHelp" style="clear: both;"> |
---|
69 | This information will be displayed in the library browser |
---|
70 | </div> |
---|
71 | <div style="clear: both"></div> |
---|
72 | </div> |
---|
73 | %for name, spec in ldda.metadata.spec.items(): |
---|
74 | %if spec.visible: |
---|
75 | <div class="form-row"> |
---|
76 | <label>${spec.desc}:</label> |
---|
77 | ${ldda.metadata.get_html_by_name( name, trans=trans )} |
---|
78 | <div style="clear: both"></div> |
---|
79 | </div> |
---|
80 | %endif |
---|
81 | %endfor |
---|
82 | <div class="form-row"> |
---|
83 | <input type="submit" name="save" value="Save"/> |
---|
84 | </div> |
---|
85 | </form> |
---|
86 | <form name="auto_detect" action="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=library_id, folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), use_panels=use_panels, show_deleted=show_deleted, )}" method="post"> |
---|
87 | <div class="form-row"> |
---|
88 | <input type="hidden" name="id" value="${trans.security.encode_id( ldda.id )}"/> |
---|
89 | <input type="submit" name="detect" value="Auto-detect"/> |
---|
90 | <div class="toolParamHelp" style="clear: both;"> |
---|
91 | This will inspect the dataset and attempt to correct the above column values if they are not accurate. |
---|
92 | </div> |
---|
93 | </div> |
---|
94 | </form> |
---|
95 | </div> |
---|
96 | </div> |
---|
97 | <p/> |
---|
98 | <div class="toolForm"> |
---|
99 | <div class="toolFormTitle">Change data type</div> |
---|
100 | <div class="toolFormBody"> |
---|
101 | %if ldda.datatype.allow_datatype_change: |
---|
102 | <form name="change_datatype" action="${h.url_for( controller='library_common', action='ldda_edit_info', cntrller=cntrller, library_id=library_id, folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), use_panels=use_panels, show_deleted=show_deleted, )}" method="post"> |
---|
103 | <div class="form-row"> |
---|
104 | <input type="hidden" name="id" value="${trans.security.encode_id( ldda.id )}"/> |
---|
105 | <label>New Type:</label> |
---|
106 | ${datatype( ldda, file_formats )} |
---|
107 | <div class="toolParamHelp" style="clear: both;"> |
---|
108 | This will change the datatype of the existing dataset |
---|
109 | but <i>not</i> modify its contents. Use this if Galaxy |
---|
110 | has incorrectly guessed the type of your dataset. |
---|
111 | </div> |
---|
112 | <div style="clear: both"></div> |
---|
113 | </div> |
---|
114 | <div class="form-row"> |
---|
115 | <input type="submit" name="change" value="Save"/> |
---|
116 | </div> |
---|
117 | </form> |
---|
118 | %else: |
---|
119 | <div class="form-row"> |
---|
120 | <div class="warningmessagesmall">${_('Changing the datatype of this dataset is not allowed.')}</div> |
---|
121 | </div> |
---|
122 | %endif |
---|
123 | </div> |
---|
124 | </div> |
---|
125 | <p/> |
---|
126 | %else: |
---|
127 | <div class="toolForm"> |
---|
128 | <div class="toolFormTitle">View information about ${ldda.name}</div> |
---|
129 | <div class="toolFormBody"> |
---|
130 | <div class="form-row"> |
---|
131 | <label>Name:</label> |
---|
132 | ${ldda.name} |
---|
133 | <div style="clear: both"></div> |
---|
134 | </div> |
---|
135 | <div class="form-row"> |
---|
136 | <label>Info:</label> |
---|
137 | ${ldda.info} |
---|
138 | <div style="clear: both"></div> |
---|
139 | </div> |
---|
140 | <div class="form-row"> |
---|
141 | <label>Data Format:</label> |
---|
142 | ${ldda.ext} |
---|
143 | <div style="clear: both"></div> |
---|
144 | </div> |
---|
145 | %for name, spec in ldda.metadata.spec.items(): |
---|
146 | %if spec.visible: |
---|
147 | <div class="form-row"> |
---|
148 | <label>${spec.desc}:</label> |
---|
149 | ${ldda.metadata.get( name )} |
---|
150 | <div style="clear: both"></div> |
---|
151 | </div> |
---|
152 | %endif |
---|
153 | %endfor |
---|
154 | </div> |
---|
155 | </div> |
---|
156 | %endif |
---|
157 | %if widgets: |
---|
158 | ${render_template_fields( cntrller=cntrller, item_type='ldda', library_id=library_id, widgets=widgets, widget_fields_have_contents=widget_fields_have_contents, info_association=info_association, inherited=inherited, folder_id=trans.security.encode_id( ldda.library_dataset.folder.id ), ldda_id=trans.security.encode_id( ldda.id ) )} |
---|
159 | %endif |
---|