commit/galaxy-central: james_taylor: template: Move templates used *only* by the galaxy webapp into templates/webapps/galaxy
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/4c6e63dc04c9/ changeset: 4c6e63dc04c9 user: james_taylor date: 2013-02-04 05:07:11 summary: template: Move templates used *only* by the galaxy webapp into templates/webapps/galaxy affected #: 258 files diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/cloud/index.mako --- a/templates/cloud/index.mako +++ /dev/null @@ -1,291 +0,0 @@ -<%inherit file="/webapps/galaxy/base_panels.mako"/> - -<%def name="init()"> -<% - self.has_left_panel=False - self.has_right_panel=False - self.active_view="shared" - self.message_box_visible=False -%> -</%def> - -<%def name="stylesheets()"> - ${parent.stylesheets()} - ${h.css( "autocomplete_tagging" )} - <style type="text/css"> - #new_history_p{ - line-height:2.5em; - margin:0em 0em .5em 0em; - } - #new_history_cbx{ - margin-right:.5em; - } - #new_history_input{ - display:none; - line-height:1em; - } - #ec_button_container{ - float:right; - } - #hidden_options{ - display:none; - } - div.toolForm{ - margin-top: 10px; - margin-bottom: 10px; - } - div.toolFormTitle{ - cursor:pointer; - } - .title_ul_text{ - text-decoration:underline; - } - .step-annotation { - margin-top: 0.25em; - font-weight: normal; - font-size: 97%; - } - .workflow-annotation { - margin-bottom: 1em; - } - #loading_indicator{ - position:fixed; - top:40px; - } - </style> -</%def> - -<%def name="javascripts()"> - ${parent.javascripts()} - <script type="text/javascript"> - var ACCOUNT_URL = "${h.url_for( controller='/cloudlaunch', action='get_account_info')}"; - var PKEY_DL_URL = "${h.url_for( controller='/cloudlaunch', action='get_pkey')}"; - var cloudlaunch_clusters = []; - - $(document).ready(function(){ - $('#id_existing_instance').change(function(){ - var ei_name = $(this).val(); - if (ei_name === "New Cluster"){ - //For new instances, need to see the cluster name field. - $('#id_cluster_name').val("New Cluster") - $('#cluster_name_wrapper').show('fast'); - }else{ - //Hide the Cluster Name field, but set the value - $('#id_cluster_name').val($(this).val()); - $('#cluster_name_wrapper').hide('fast'); - } - }); - //When id_secret and id_key are complete, submit to get_account_info - $("#id_secret, #id_key_id").bind("paste input propertychange", function(){ - secret_el = $("#id_secret"); - key_el = $("#id_key_id"); - if (secret_el.val().length === 40 && key_el.val().length === 20){ - //Submit these to get_account_info, unhide fields, and update as appropriate - $.ajax({type: "POST", - url: ACCOUNT_URL, - dataType: 'json', - data: {key_id: key_el.val(),secret:secret_el.val()}, - success: function(result){ - cloudlaunch_clusters = result.clusters; - var kplist = $("#id_keypair"); - var clusterlist = $("#id_existing_instance"); - kplist.find('option').remove(); - clusterlist.find('option').remove(); - //Update fields with appropriate elements - clusterlist.append($('<option/>').val('New Cluster').text('New Cluster')); - if (_.size(result.clusters) > 0){ - _.each(result.clusters, function(cluster, index){ - clusterlist.append($('<option/>').val(cluster.name).text(cluster.name)); - }); - $('#existing_instance_wrapper').show(); - } - if (!_.include(result.keypairs, '${default_keypair}')){ - kplist.append($('<option/>').val('${default_keypair}').text('Create New - ${default_keypair}')); - } - _.each(result.keypairs, function(keypair, index){ - kplist.append($('<option/>').val(keypair).text(keypair)); - }); - $('#hidden_options').show('fast'); - } - }); - } - }); - $('#loading_indicator').ajaxStart(function(){ - $(this).show('fast'); - }).ajaxStop(function(){ - $(this).hide('fast'); - }); - $('form').ajaxForm({ - type: 'POST', - dataType: 'json', - beforeSubmit: function(data, form){ - if ($('#id_password').val() != $('#id_password_confirm').val()){ - //Passwords don't match. - form.prepend('<div class="errormessage">Passwords do not match</div>'); - return false; - }else{ - //Clear errors - $('.errormessage').remove() - //Hide the form, show pending box with spinner. - $('#launchFormContainer').hide('fast'); - $('#responsePanel').show('fast'); - } - //Dig up zone info for selected cluster, set hidden input. - //This is not necessary to present to the user though the interface may prove useful. - var ei_val = _.find(data, function(f_obj){return f_obj.name === 'existing_instance'}); - if( ei_val && (ei_val.value !== "New Cluster")){ - var cluster = _.find(cloudlaunch_clusters, function(cluster){return cluster.name === ei_val.value}); - var zdata = _.find(data, function(f_obj){return f_obj.name === 'zone'}); - zdata.value = cluster.zone; - } - }, - success: function(data){ - //Success Message, link to key download if required, link to server itself. - $('#launchPending').hide('fast'); - //Set appropriate fields (dns, key, ami) and then display. - if(data.kp_material_tag){ - var kp_download_link = $('<a/>').attr('href', PKEY_DL_URL + '?kp_material_tag=' + data.kp_material_tag) - .attr('target','_blank') - .text("Download your key now"); - $('#keypairInfo').append(kp_download_link); - $('#keypairInfo').show(); - } - $('.kp_name').text(data.kp_name); - $('#instance_id').text(data.instance_id); - $('#image_id').text(data.image_id); - $('#instance_link').html($('<a/>') - .attr('href', 'http://' + data.public_dns_name + '/cloud') - .attr('target','_blank') - .text(data.public_dns_name + '/cloud')); - $('#instance_dns').text(data.public_dns_name); - $('#launchSuccess').show('fast'); - }, - error: function(jqXHR, textStatus, errorThrown){ - $('#launchFormContainer').prepend('<div class="errormessage">' + errorThrown + " : " + jqXHR.responseText + '</div>'); - $('#responsePanel').hide('fast'); - $('#launchFormContainer').show('fast'); - } - }); - }); - </script> -</%def> - -<%def name="center_panel()"> - <div style="overflow: auto; height: 100%;"> - <div class="page-container" style="padding: 10px;"> - <div id="loading_indicator"></div> - <h2>Launch a Galaxy Cloud Instance</h2> - <div id="launchFormContainer" class="toolForm"> - <form id="cloudlaunch_form" action="${h.url_for( controller='/cloudlaunch', action='launch_instance')}" method="post"> - - <p>To launch a Galaxy Cloud Cluster, enter your AWS Secret Key ID, and Secret Key. Galaxy will use - these to present appropriate options for launching your cluster. Note that using this form to - launch computational resources in the Amazon Cloud will result in costs to the account indicated - above. See <a href="http://aws.amazon.com/ec2/pricing/">Amazon's pricing</a> for more information. - options for launching your cluster.</p></p> - - <div class="form-row"> - <label for="id_key_id">Key ID</label> - <input type="text" size="30" maxlength="20" name="key_id" id="id_key_id" value=""/><br/> - <div class="toolParamHelp"> - This is the text string that uniquely identifies your account, found in the - <a href="https://portal.aws.amazon.com/gp/aws/securityCredentials">Security Credentials section of the AWS Console</a>. - </div> - </div> - - <div class="form-row"> - <label for="id_secret">Secret Key</label> - <input type="text" size="50" maxlength="40" name="secret" id="id_secret" value=""/><br/> - <div class="toolParamHelp"> - This is your AWS Secret Key, also found in the <a href="https://portal.aws.amazon.com/gp/aws/securityCredentials">Security -Credentials section of the AWS Console</a>. </div> - </div> - - <div id="hidden_options"> - <div id='existing_instance_wrapper' style="display:none;" class="form-row"> - <label for="id_existing_instance">Instances in your account</label> - <select name="existing_instance" id="id_existing_instance"> - </select> - <input id='id_zone' type='hidden' name='zone' value=''/> - </div> - <div id='cluster_name_wrapper' class="form-row"> - <label for="id_cluster_name">Cluster Name</label> - <input type="text" size="40" class="text-and-autocomplete-select" name="cluster_name" id="id_cluster_name"/><br/> - <div class="toolParamHelp"> - This is the name for your cluster. You'll use this when you want to restart. - </div> - </div> - - <div class="form-row"> - <label for="id_password">Cluster Password</label> - <input type="password" size="40" name="password" id="id_password"/><br/> - </div> - - <div class="form-row"> - <label for="id_password_confirm">Cluster Password - Confirmation</label> - <input type="password" size="40" name="password_confirm" id="id_password_confirm"/><br/> - </div> - - - <div class="form-row"> - <label for="id_keypair">Key Pair</label> - <select name="keypair" id="id_keypair"> - <option name="Create" value="cloudman_keypair">cloudman_keypair</option> - </select> - </div> - - %if share_string: - <input type='hidden' name='share_string' value='${share_string}'/> - %else: - <!-- DBEDIT temporary hide share string due to it being broken on the cloudman end --> - <div class="form-row" style="display:none;"> - <label for="id_share_string">Instance Share String (optional)</label> - <input type="text" size="120" name="share_string" id="id_share_string"/><br/> - </div> - %endif - - <div class="form-row"> - <label for="id_instance_type">Instance Type</label> - <select name="instance_type" id="id_instance_type"> - <option value="m1.large">Large</option> - <option value="m1.xlarge">Extra Large</option> - <option value="m2.4xlarge">High-Memory Quadruple Extra Large</option> - </select> - </div> - <div class="form-row"> - <p>Requesting the instance may take a moment, please be patient. Do not refresh your browser or navigate away from the page</p> - <input type="submit" value="Submit" id="id_submit"/> - </div> - </div> - <div class="form-row"> - <div id="loading_indicator" style="position:relative;left:10px;right:0px"></div> - </div> - </form> - </div> - <div id="responsePanel" class="toolForm" style="display:none;"> - <div id="launchPending">Launch Pending, please be patient.</div> - <div id="launchSuccess" style="display:none;"> - <div id="keypairInfo" style="display:none;margin-bottom:20px;"> - <h3>Very Important Key Pair Information</h3> - <p>A new key pair named <strong><span class="kp_name">kp_name</span></strong> has been created in your AWS - account and will be used to access this instance via ssh. It is - <strong>very important</strong> that you save the following private key - as it is not saved on this Galaxy instance and will be permanently lost if not saved. Additionally, this link will - only allow a single download, after which the key is removed from the Galaxy server permanently.<br/> - </div> - <div> - <h3>Access Information</h3> - <ul> - <li>Your instance '<span id="instance_id">undefined</span>' has been successfully launched using the - '<span id="image_id">undefined</span>' AMI.</li> - <li>While it may take a few moments to boot, you will be able to access the cloud control - panel at <span id="instance_link">undefined.</span>.</li> - <li>SSH access is also available using your private key. From the terminal, you would execute something like:</br> `ssh -i <span class="kp_name">undefined</span>.pem ubuntu@<span -id="instance_dns">undefined</span>`</li> - </ul> - </div> - </div> - </div> - </div> -</%def> - diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/cloud/run.mako --- a/templates/cloud/run.mako +++ /dev/null @@ -1,41 +0,0 @@ -<%inherit file="/webapps/galaxy/base_panels.mako"/> - -<%def name="init()"> -<% - self.has_left_panel=False - self.has_right_panel=False - self.active_view="shared" - self.message_box_visible=False -%> -</%def> - - -<%def name="center_panel()"> - <div style="overflow: auto; height: 100%;"> - <div class="page-container" style="padding: 10px;"> - <h2>Launching a Galaxy Cloud Instance</h2> -%if error: - <p>${error}</p> -%elif instance: - %if kp_material: - <h3>Very Important Key Pair Information</h3> - <p>A new key pair named '${kp_name}' has been created in your AWS - account and will be used to access this instance via ssh. It is - <strong>very important</strong> that you save the following private key - as it is not saved on this Galaxy instance and will be permanently lost - once you leave this page. To do this, save the following key block as - a plain text file named '${kp_name}'.</p> - <pre>${kp_material}</pre> - %endif - <p>The instance '${instance.id} has been successfully launched using the - '${instance.image_id}' AMI.<br/> Access it at <a - href="http://${instance.public_dns_name}">http://${instance.public_dns_name}</a></p> - <p>SSH access is available using your private key '${kp_name}'.</p> -%else: - <p> Unknown failure, no instance. Please refer to your AWS console at <a - href="https://console.aws.amazon.com">https://console.aws.amazon.com</a></p> -%endif - </div> - </div> -</%def> - diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/copy_view.mako --- a/templates/dataset/copy_view.mako +++ /dev/null @@ -1,141 +0,0 @@ -<%inherit file="/base.mako"/> -<%def name="title()">Copy History Items</%def> - -<%def name="javascripts()"> - - ${parent.javascripts()} - - <script type="text/javascript"> - $(function() { - $("#select-multiple").click(function() { - $("#single-dest-select").val(""); - $("#single-destination").hide(); - $("#multiple-destination").show(); - }); - }); - %if 'history' in refresh_frames: - if ( parent.frames && parent.frames.galaxy_history ) { - parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}"; - if ( parent.force_right_panel ) { - parent.force_right_panel( 'show' ); - } - } - %endif - </script> - -</%def> - -%if error_msg: - <p> - <div class="errormessage">${error_msg}</div> - <div style="clear: both"></div> - </p> -%endif -%if done_msg: - <p> - <div class="donemessage">${done_msg}</div> - <div style="clear: both"></div> - </p> -%endif -<p> - <div class="infomessage">Copy any number of history items from one history to another.</div> - <div style="clear: both"></div> -</p> -<p> - <form method="post"> - <div class="toolForm" style="float: left; width: 45%; padding: 0px;"> - <div class="toolFormTitle">Source History:<br /> - <select id="source_history" name="source_history" refresh_on_change="true" style="font-weight: normal;"> - %for i, hist in enumerate(target_histories): - <% - selected = "" - current_history_text = "" - if hist == source_history: - selected = "selected='selected'" - if hist == current_history: - current_history_text = " (current history)" - - %> - <option value="${trans.security.encode_id(hist.id)}" ${selected}> - ${i + 1}: ${h.truncate(util.unicodify( hist.name ), 30)}${current_history_text} - </option> - %endfor - </select> - </div> - <div class="toolFormBody"> - %if len(source_datasets) > 0: - %for data in source_datasets: - <% - checked = "" - encoded_id = trans.security.encode_id(data.id) - if data.id in source_dataset_ids: - checked = " checked='checked'" - %> - <div class="form-row"> - <input type="checkbox" name="source_dataset_ids" id="dataset_${encoded_id}" value="${encoded_id}"${checked}/> - <label for="dataset_${encoded_id}" style="display: inline;font-weight:normal;"> ${data.hid}: ${h.to_unicode(data.name)}</label> - </div> - %endfor - %else: - <div class="form-row">This history has no datasets.</div> - %endif - </div> - </div> - <div style="float: left; padding-left: 10px; font-size: 36px;">→</div> - <div class="toolForm" style="float: right; width: 45%; padding: 0px;"> - <div class="toolFormTitle">Destination History:</div> - <div class="toolFormBody"> - <div class="form-row" id="single-destination"> - <select id="single-dest-select" name="target_history_id"> - <option value=""></option> - %for i, hist in enumerate(target_histories): - <% - encoded_id = trans.security.encode_id(hist.id) - source_history_text = "" - selected = "" - if hist == source_history: - source_history_text = " (source history)" - if encoded_id == target_history_id: - selected = " selected='selected'" - %> - <option value="${encoded_id}"${selected}>${i + 1}: ${h.truncate( util.unicodify( hist.name ), 30)}${source_history_text}</option> - %endfor - </select><br /><br /> - <a style="margin-left: 10px;" href="javascript:void(0);" id="select-multiple">Choose multiple histories</a> - </div> - <div id="multiple-destination" style="display: none;"> - %for i, hist in enumerate( target_histories ): - <% - cur_history_text = "" - encoded_id = trans.security.encode_id(hist.id) - if hist == source_history: - cur_history_text = " <strong>(source history)</strong>" - %> - <div class="form-row"> - <input type="checkbox" name="target_history_ids" id="hist_${encoded_id}" value="${encoded_id}"/> - <label for="hist_${encoded_id}" style="display: inline; font-weight:normal;">${i + 1}: ${ util.unicodify( hist.name ) }${cur_history_text}</label> - </div> - %endfor - </div> - %if trans.get_user(): - <% - checked = "" - if "create_new_history" in target_history_ids: - checked = " checked='checked'" - %> - <hr /> - <div style="text-align: center; color: #888;">— OR —</div> - <div class="form-row"> - <label for="new_history_name" style="display: inline; font-weight:normal;">New history named:</label> - <input type="textbox" name="new_history_name" /> - </div> - %endif - </div> - </div> - <div style="clear: both"></div> - <div class="form-row" align="center"> - <input type="submit" class="primary-button" name="do_copy" value="Copy History Items"/> - </div> - </form> - </div> -</p> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/display.mako --- a/templates/dataset/display.mako +++ /dev/null @@ -1,111 +0,0 @@ -## Because HDAs do not have many of the properties that other sharable items have, we need to override most of the default code for display. -<%inherit file="/display_base.mako"/> -<%namespace file="/display_common.mako" import="*" /> -<%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" /> - -<%def name="javascripts()"> - ${parent.javascripts()} -</%def> - -<%def name="init()"> -<% - self.has_left_panel=False - self.has_right_panel=True - self.message_box_visible=False - self.active_view="user" - self.overlay_visible=False -%> -</%def> - -<%def name="title()"> - Galaxy | ${get_class_display_name( item.__class__ )} | ${get_item_name( item ) | h} -</%def> - -<%def name="render_item_links( data )"> - ## Provide links to save data and import dataset. - <a href="${h.url_for( controller='/dataset', action='display', dataset_id=trans.security.encode_id( data.id ), to_ext=data.ext )}" class="icon-button disk tooltip" title="Save dataset"></a> - <a - href="${h.url_for( controller='/dataset', action='imp', dataset_id=trans.security.encode_id( data.id ) )}" - class="icon-button import tooltip" - title="Import dataset"></a> -</%def> - -<%def name="render_item( data, data_to_render )"> - %if truncated: - <div class="warningmessagelarge"> - This dataset is large and only the first megabyte is shown below. | - <a href="${h.url_for( controller='dataset', action='display_by_username_and_slug', username=data.history.user.username, slug=trans.security.encode_id( data.id ), preview=False )}">Show all</a> - </div> - %endif - ## TODO: why is the default font size so small? - <pre style="font-size: 135%">${ data_to_render | h }</pre> -</%def> - - -<%def name="center_panel()"> - <div class="unified-panel-header" unselectable="on"> - <div class="unified-panel-header-inner"> - ${get_class_display_name( item.__class__ )} - | ${get_item_name( item ) | h} - </div> - </div> - - <div class="unified-panel-body"> - <div style="overflow: auto; height: 100%;"> - <div class="page-body"> - <div style="float: right"> - ${self.render_item_links( item )} - </div> - <div> - ${self.render_item_header( item )} - </div> - - ${self.render_item( item, item_data )} - </div> - </div> - </div> -</%def> - -<%def name="right_panel()"> - <div class="unified-panel-header" unselectable="on"> - <div class="unified-panel-header-inner"> - About this ${get_class_display_name( item.__class__ )} - </div> - </div> - - <div class="unified-panel-body"> - <div style="overflow: auto; height: 100%;"> - <div style="padding: 10px;"> - <h4>Author</h4> - - <p>${item.history.user.username | h}</p> - - <div><img src="https://secure.gravatar.com/avatar/${h.md5(item.history.user.email)}?d=identicon&s=150"></div> - - ## Page meta. - - ## No links for datasets right now. - - ## Tags. - <p> - <h4>Tags</h4> - <p> - ## Community tags. - <div> - Community: - ${render_community_tagging_element( tagged_item=item, tag_click_fn='community_tag_click', use_toggle_link=False )} - %if len ( item.tags ) == 0: - none - %endif - </div> - ## Individual tags. - <p> - <div> - Yours: - ${render_individual_tagging_element( user=trans.get_user(), tagged_item=item, elt_context='view.mako', use_toggle_link=False, tag_click_fn='community_tag_click' )} - </div> - </div> - </div> - </div> - -</%def> \ No newline at end of file diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/display_application/display.mako --- a/templates/dataset/display_application/display.mako +++ /dev/null @@ -1,12 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> -<%def name="title()">Display Application: ${display_link.link.display_application.name} ${display_link.link.name}</%def> -%for message, status in msg: - ${render_msg( message, status )} -%endfor -%if refresh: -<%def name="metas()"><meta http-equiv="refresh" content="10" /></%def> -<p> -This page will <a href="${trans.request.url}">refresh</a> after 10 seconds. -</p> -%endif diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/edit_attributes.mako --- a/templates/dataset/edit_attributes.mako +++ /dev/null @@ -1,202 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/message.mako" import="render_msg" /> -<%namespace file="/message.mako" name="message_ns" import="handle_refresh_frames" /> - -<%def name="title()">${_('Edit Dataset Attributes')}</%def> - -<%def name="stylesheets()"> - ${h.css( "base", "autocomplete_tagging" )} -</%def> - -<%def name="javascripts()"> - ${parent.javascripts()} - ${message_ns.handle_refresh_frames()} - ${h.js( "libs/jquery/jquery.autocomplete", "galaxy.autocom_tagging" )} -</%def> - -<%def name="datatype( dataset, datatypes )"> - <select name="datatype"> - %for ext in datatypes: - %if dataset.ext == ext: - <option value="${ext}" selected="yes">${_(ext)}</option> - %else: - <option value="${ext}">${_(ext)}</option> - %endif - %endfor - </select> -</%def> - -%if message: - ${render_msg( message, status )} -%endif - - -<ul class="nav nav-tabs"> - <li class="active"><a href="#attributes" data-toggle="tab">Attributes</a></li> - <li><a href="#convert" data-toggle="tab">Convert Format</a></li> - <li><a href="#datatype" data-toggle="tab">Datatype</a></li> - <li><a href="#permissions" data-toggle="tab">Permissions</a></li> -</ul> - -<div class="tab-content"> - -<div class="tab-pane active toolForm" id="attributes"> - <div class="toolFormTitle">${_('Edit Attributes')}</div> - <div class="toolFormBody"> - <form name="edit_attributes" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post"> - <div class="form-row"> - <label> - Name: - </label> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="text" name="name" value="${data.get_display_name() | h}" size="40"/> - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <label> - Info: - </label> - <div style="float: left; width: 250px; margin-right: 10px;"> - <textarea name="info" cols="40" rows="2">${ util.unicodify( data.info ) | h}</textarea> - </div> - <div style="clear: both"></div> - </div> - %if trans.get_user() is not None: - <div class="form-row"> - <label> - Annotation / Notes: - </label> - <div style="float: left; width: 250px; margin-right: 10px;"> - <textarea name="annotation" cols="40" rows="2">${data_annotation | h}</textarea> - </div> - <div style="clear: both"></div> - <div class="toolParamHelp">Add an annotation or notes to a dataset; annotations are available when a history is viewed.</div> - </div> - %endif - %for name, spec in data.metadata.spec.items(): - %if spec.visible: - <div class="form-row"> - <label> - ${spec.desc}: - </label> - <div style="float: left; width: 250px; margin-right: 10px;"> - ${data.metadata.get_html_by_name( name, trans=trans )} - </div> - <div style="clear: both"></div> - </div> - %endif - %endfor - <div class="form-row"> - <input type="submit" name="save" value="${_('Save')}"/> - </div> - </form> - <form name="auto_detect" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post"> - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="submit" name="detect" value="${_('Auto-detect')}"/> - </div> - <div class="toolParamHelp" style="clear: both;"> - This will inspect the dataset and attempt to correct the above column values if they are not accurate. - </div> - </div> - </form> - %if data.missing_meta(): - <div class="form-row"> - <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> - </div> - %endif - </div> -</div> - -<div class="tab-pane toolForm" id="convert"> - <div class="toolFormTitle">${_('Convert to new format')}</div> - <div class="toolFormBody"> - <% converters = data.get_converter_types() %> - %if len( converters ) > 0: - <form name="convert_data" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post"> - <div class="form-row"> - <div style="float: left; width: 250px; margin-right: 10px;"> - <select name="target_type"> - %for key, value in converters.items(): - <option value="${key}">${value.name}</option> - %endfor - </select> - </div> - <div class="toolParamHelp" style="clear: both;"> - This will create a new dataset with the contents of this dataset converted to a new format. - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <input type="submit" name="convert_data" value="${_('Convert')}"/> - </div> - </form> - %else: - No conversions available - %endif - </div> -</div> - -<div class="tab-pane toolForm" id="datatype"> - <div class="toolFormTitle">${_('Change data type')}</div> - <div class="toolFormBody"> - %if data.datatype.allow_datatype_change: - <form name="change_datatype" action="${h.url_for( controller='dataset', action='edit', dataset_id=dataset_id )}" method="post"> - <div class="form-row"> - <label> - ${_('New Type')}: - </label> - <div style="float: left; width: 250px; margin-right: 10px;"> - ${datatype( data, datatypes )} - </div> - <div class="toolParamHelp" style="clear: both;"> - ${_('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.')} - </div> - <div style="clear: both"></div> - </div> - <div class="form-row"> - <input type="submit" name="change" value="${_('Save')}"/> - </div> - </form> - %else: - <div class="form-row"> - <div class="warningmessagesmall">${_('Changing the datatype of this dataset is not allowed.')}</div> - </div> - %endif - </div> -</div> -<p /> - -<div class="tab-pane" id="permissions"> -%if trans.app.security_agent.can_manage_dataset( current_user_roles, data.dataset ): - <%namespace file="/dataset/security_common.mako" import="render_permission_form" /> - ${render_permission_form( data.dataset, data.get_display_name(), h.url_for( controller='dataset', action='edit', dataset_id=dataset_id ), all_roles )} -%elif trans.user: - <div class="toolForm"> - <div class="toolFormTitle">View Permissions</div> - <div class="toolFormBody"> - <div class="form-row"> - %if data.dataset.actions: - <ul> - %for action, roles in trans.app.security_agent.get_permissions( data.dataset ).items(): - %if roles: - <li>${action.description}</li> - <ul> - %for role in roles: - <li>${role.name}</li> - %endfor - </ul> - %endif - %endfor - </ul> - %else: - <p>This dataset is accessible by everyone (it is public).</p> - %endif - </div> - </div> - </div> -%else: - Permissions not available (not logged in) -%endif -</div> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/embed.mako --- a/templates/dataset/embed.mako +++ /dev/null @@ -1,19 +0,0 @@ -<%inherit file="/embed_base.mako"/> -<%! - from galaxy.web.framework.helpers import iff -%> - -<%def name="render_item_links( dataset )"> - <a href="${h.url_for( controller='/dataset', action='display', dataset_id=trans.security.encode_id( dataset.id ), to_ext=dataset.ext )}" title="Save dataset" class="icon-button disk tooltip"></a> - ## Links for importing and viewing an item. - <a href="${h.url_for( controller='/dataset', action='imp', dataset_id=trans.security.encode_id( item.id ) )}" title="Import dataset" class="icon-button import tooltip"></a> - <a class="icon-button go-to-full-screen tooltip" href="${h.url_for( controller='/dataset', action='display_by_username_and_slug', username=dataset.history.user.username, slug=trans.security.encode_id( dataset.id ) )}" title="Go to dataset"></a> - -</%def> - -<%def name="render_summary_content( dataset, data )"> -## <ul> -## <li>Format : ${dataset.extension} -## <pre>${dataset.peek}</pre> -## </ul> -</%def> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/errors.mako --- a/templates/dataset/errors.mako +++ /dev/null @@ -1,80 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> - <head> - <title>Dataset generation errors</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link href="/static/style/base.css" rel="stylesheet" type="text/css" /> - <style> - pre - { - background: white; - color: black; - border: dotted black 1px; - overflow: auto; - padding: 10px; - } - </style> - </head> - - <body> - <h2>Dataset generation errors</h2> - <p><b>Dataset ${hda.hid}: ${hda.display_name()}</b></p> - <% job = hda.creating_job %> - %if job: - - %if job.traceback: - The Galaxy framework encountered the following error while attempting to run the tool: - <pre>${ util.unicodify( job.traceback ) | h}</pre> - %endif - %if job.stderr or job.info: - Tool execution generated the following error message: - %if job.stderr: - <pre>${ util.unicodify( job.stderr ) | h}</pre> - %elif job.info: - <pre>${ util.unicodify( job.info ) | h}</pre> - %endif - %else: - Tool execution did not generate any error messages. - %endif - %if job.stdout: - The tool produced the following additional output: - <pre>${ util.unicodify( job.stdout ) | h}</pre> - %endif - %else: - The tool did not create any additional job / error info. - %endif - <% - if trans.user: - user_email = trans.user.email - else: - user_email = '' - %> - <h2>Report this error to the Galaxy Team</h2> - <p> - The Galaxy team regularly reviews errors that occur in the application. - However, if you would like to provide additional information (such as - what you were trying to do when the error occurred) and a contact e-mail - address, we will be better able to investigate your problem and get back - to you. - </p> - <div class="toolForm"> - <div class="toolFormTitle">Error Report</div> - <div class="toolFormBody"> - <form name="report_error" action="${h.url_for( action='report_error')}" method="post" > - <input type="hidden" name="id" value="${hda.id}" /> - <div class="form-row"> - <label>Your email</label> - <input type="text" name="email" size="40" value="${user_email}" /> - </div> - <div class="form-row"> - <label>Message</label> - <textarea name="message" rows="10" cols="40"></textarea> - </div> - <div class="form-row"> - <input type="submit" value="Report"/> - </div> - </form> - </div> - </div> - </body> -</html> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/grid.mako --- a/templates/dataset/grid.mako +++ /dev/null @@ -1,1 +0,0 @@ -<%inherit file="/grid_base.mako"/> \ No newline at end of file diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/item_content.mako --- a/templates/dataset/item_content.mako +++ /dev/null @@ -1,3 +0,0 @@ -<%namespace file="/dataset/display.mako" import="*" /> - -${render_item( item, item_data )} \ No newline at end of file diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/large_file.mako --- a/templates/dataset/large_file.mako +++ /dev/null @@ -1,11 +0,0 @@ -<%inherit file="/base.mako"/> - -<div class="warningmessagelarge"> - This dataset is large and only the first megabyte is shown below.<br /> - <a href="${h.url_for( controller='dataset', action='display', dataset_id=trans.security.encode_id( data.id ), filename='' )}">Show all</a> | - <a href="${h.url_for( controller='dataset', action='display', dataset_id=trans.security.encode_id( data.id ), to_ext=data.ext )}">Save</a> -</div> - -<pre> -${ unicode( truncated_data, 'utf-8' ) | h } -</pre> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/security_common.mako --- a/templates/dataset/security_common.mako +++ /dev/null @@ -1,130 +0,0 @@ -<%def name="render_select( current_actions, action_key, action, roles )"> - <% - import sets - in_roles = sets.Set() - for a in current_actions: - if a.action == action.action: - in_roles.add( a.role ) - out_roles = filter( lambda x: x not in in_roles, roles ) - %> - <p> - <b>${action.action}:</b> ${action.description} - %if action == trans.app.security_agent.permitted_actions.DATASET_ACCESS: - <br/> - NOTE: Users must have every role associated with this dataset in order to access it - %endif - </p> - <div style="width: 100%; white-space: nowrap;"> - <div style="float: left; width: 50%;"> - Roles associated:<br /> - <select name="${action_key}_in" id="${action_key}_in_select" class="in_select" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" multiple> - %for role in in_roles: - <option value="${role.id}">${role.name}</option> - %endfor - </select><br /> - <div style="width: 98%; text-align: right"><input type="submit" id="${action_key}_remove_button" class="role_remove_button" value=">>"/></div> - </div> - <div style="width: 50%;"> - Roles not associated:<br /> - <select name="${action_key}_out" id="${action_key}_out_select" style="max-width: 98%; width: 98%; height: 150px; font-size: 100%;" multiple> - %for role in out_roles: - <option value="${role.id}">${role.name}</option> - %endfor - </select><br /> - <input type="submit" id="${action_key}_add_button" class="role_add_button" value="<<"/> - </div> - </div> -</%def> - -## Any permission ( e.g., 'DATASET_ACCESS' ) included in the do_not_render param will not be rendered on the page. -<%def name="render_permission_form( obj, obj_name, form_url, roles, do_not_render=[], all_roles=[] )"> - <% - if isinstance( obj, trans.app.model.User ): - current_actions = obj.default_permissions - permitted_actions = trans.app.model.Dataset.permitted_actions.items() - obj_str = 'user %s' % obj_name - obj_type = 'dataset' - elif isinstance( obj, trans.app.model.History ): - current_actions = obj.default_permissions - permitted_actions = trans.app.model.Dataset.permitted_actions.items() - obj_str = 'history %s' % obj_name - obj_type = 'dataset' - elif isinstance( obj, trans.app.model.Dataset ): - current_actions = obj.actions - permitted_actions = trans.app.model.Dataset.permitted_actions.items() - obj_str = obj_name - obj_type = 'dataset' - elif isinstance( obj, trans.app.model.LibraryDatasetDatasetAssociation ): - current_actions = obj.actions + obj.dataset.actions - permitted_actions = trans.app.model.Dataset.permitted_actions.items() + trans.app.model.Library.permitted_actions.items() - obj_str = obj_name - obj_type = 'dataset' - elif isinstance( obj, trans.app.model.Library ): - current_actions = obj.actions - permitted_actions = trans.app.model.Library.permitted_actions.items() - obj_str = 'library %s' % obj_name - obj_type = 'library' - elif isinstance( obj, trans.app.model.LibraryDataset ): - current_actions = obj.actions - permitted_actions = trans.app.model.Library.permitted_actions.items() - obj_str = 'library dataset %s' % obj_name - obj_type = 'library' - elif isinstance( obj, trans.app.model.LibraryFolder ): - current_actions = obj.actions - permitted_actions = trans.app.model.Library.permitted_actions.items() - obj_str = 'library folder %s' % obj_name - obj_type = 'library' - else: - current_actions = [] - permitted_actions = {}.items() - obj_str = 'unknown object %s' %obj_name - obj_type = '' - %> - <script type="text/javascript"> - $( document ).ready( function () { - $( '.role_add_button' ).click( function() { - var action = this.id.substring( 0, this.id.lastIndexOf( '_add_button' ) ) - var in_select = '#' + action + '_in_select'; - var out_select = '#' + action + '_out_select'; - return !$( out_select + ' option:selected' ).remove().appendTo( in_select ); - }); - $( '.role_remove_button' ).click( function() { - var action = this.id.substring( 0, this.id.lastIndexOf( '_remove_button' ) ) - var in_select = '#' + action + '_in_select'; - var out_select = '#' + action + '_out_select'; - return !$( in_select + ' option:selected' ).remove().appendTo( out_select ); - }); - $( 'form#edit_role_associations' ).submit( function() { - $( '.in_select option' ).each(function( i ) { - $( this ).attr( "selected", "selected" ); - }); - }); - }); - </script> - <div class="toolForm"> - <div class="toolFormTitle">Manage ${obj_type} permissions on ${obj_str}</div> - <div class="toolFormBody"> - <form name="edit_role_associations" id="edit_role_associations" action="${form_url}" method="post"> - <div class="form-row"></div> - %for k, v in permitted_actions: - %if k not in do_not_render: - <div class="form-row"> - ## LIBRARY_ACCESS is a special case because we need to render all roles instead of - ## roles derived from the roles associated with LIBRARY_ACCESS. - <% render_all_roles = k == 'LIBRARY_ACCESS' %> - %if render_all_roles: - ${render_select( current_actions, k, v, all_roles )} - %else: - ${render_select( current_actions, k, v, roles )} - %endif - </div> - %endif - %endfor - <div class="form-row"> - <input type="submit" name="update_roles_button" value="Save"/> - </div> - </form> - </div> - </div> - <p/> -</%def> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/dataset/tabular_chunked.mako --- a/templates/dataset/tabular_chunked.mako +++ /dev/null @@ -1,103 +0,0 @@ -<%inherit file="/base.mako"/> - - -<%def name="title()">Dataset Display</%def> - -<%def name="javascripts()"> - ${parent.javascripts()} - <script type="text/javascript"> - var DATASET_URL = "${h.url_for( controller='/dataset', action='display', dataset_id=trans.security.encode_id( dataset.id ))}"; - var COLUMN_NUMBER = ${column_number}; - var COLUMN_TYPES = ${column_types}; - var COLUMN_NAMES = ${column_names}; - - var chunk = ${chunk}; - var current_chunk = 0; - - function renderCell(cell_contents, index, colspan){ - if (colspan !== undefined){ - return $('<td>').attr('colspan', colspan).addClass('stringalign').text(cell_contents); - } - else if (COLUMN_TYPES[index] == 'str' || COLUMN_TYPES[index] == 'list'){ - /* Left align all str columns, right align the rest */ - return $('<td>').addClass('stringalign').text(cell_contents);; - } - else{ - return $('<td>').text(cell_contents); - } - } - - function renderRow(line){ - /* Check length of cells to ensure this is a complete row. */ - var cells = line.split('\t'); - var row = $('<tr>'); - if (cells.length == COLUMN_NUMBER){ - $.each(cells, function(index, cell_contents){ - row.append(renderCell(cell_contents, index)); - }); - } - else if(cells.length > COLUMN_NUMBER){ - /* SAM file or like format with optional metadata included */ - $.each(cells.slice(0, COLUMN_NUMBER -1), function(index, cell_contents){ - row.append(renderCell(cell_contents, index)); - }); - row.append(renderCell(cells.slice(COLUMN_NUMBER -1).join('\t'), COLUMN_NUMBER-1)); - } - else if(COLUMN_NUMBER > 5 && cells.length == COLUMN_NUMBER - 1 ){ - /* SAM file or like format with optional metadata missing */ - $.each(cells, function(index, cell_contents){ - row.append(renderCell(cell_contents, index)); - }); - row.append($('<td>')); - } - else{ - /* Comment line, just return the one cell*/ - row.append(renderCell(line, 0, COLUMN_NUMBER)); - } - return row; - } - - function renderChunk(chunk){ - var table = $('#content_table'); - if (chunk.ck_data == ""){ - current_chunk = -1; - } - else if(chunk.ck_index === current_chunk + 1){ - if (current_chunk === 0 && COLUMN_NAMES){ - table.append('<tr><th>' + COLUMN_NAMES.join('</th><th>') + '</th></tr>'); - } - var lines = chunk.ck_data.split('\n'); - $.each(lines, function(index, line){ - table.append(renderRow(line)); - }); - current_chunk = chunk.ck_index; - } - } - - $(document).ready(function(){ - renderChunk(chunk); - $(window).scroll(function(){ - if ($(window).scrollTop() == $(document).height() - $(window).height()){ - if (current_chunk !== -1){ - $.getJSON(DATASET_URL, - {chunk: current_chunk}, - function(result){renderChunk(result)}); - } - } - }); - $('#loading_indicator').ajaxStart(function(){ - $(this).show(); - }).ajaxStop(function(){ - $(this).hide(); - }); - }); - </script> -</%def> - -<%def name="stylesheets()"> - ${parent.stylesheets()} -</%def> - -<div id="loading_indicator" ></div> -<table id="content_table" cellpadding="0"> -</table> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/copy.mako --- a/templates/history/copy.mako +++ /dev/null @@ -1,27 +0,0 @@ -<% _=n_ %> -<%inherit file="/base.mako"/> -<%def name="title()">Copy History</%def> - -<div class="toolForm"> - <div class="toolFormTitle">Copy History</div> - <div class="toolFormBody"> - <form action="${h.url_for( controller='history', action='copy' )}" method="post" > - <div class="form-row"> - %if id_argument is not None: - <input type="hidden" name="id" value="${id_argument}"> - %endif - You can make a copy of the history that includes all datasets in the original history or just the active - (not deleted) datasets. - </div> - <div class="form-row"> - <input type="radio" name="copy_choice" value="activatable"> Copy all datasets, including deleted ones - </div> - <div class="form-row"> - <input type="radio" name="copy_choice" value="active"> Copy only active (not deleted) datasets - </div> - <div class="form-row"> - <input type="submit" name="copy_choice_button" value="Copy"> - </div> - </form> - </div> -</div> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/display.mako --- a/templates/history/display.mako +++ /dev/null @@ -1,84 +0,0 @@ -<%inherit file="/display_base.mako"/> -<%namespace file="/root/history_common.mako" import="render_dataset" /> - -## Set vars so that there's no need to change the code below. -<% - history = published_item - datasets = published_item_data -%> - -<%def name="javascripts()"> - ${parent.javascripts()} -</%def> - -<%def name="stylesheets()"> - ${parent.stylesheets()} - ${h.css( "history" )} - <style type="text/css"> - .historyItemBody { - display: none; - } - .column { - float: left; - padding: 10px; - margin: 20px; - background: #666; - border: 5px solid #ccc; - width: 300px; - } - </style> - - <noscript> - <style> - .historyItemBody { - display: block; - } - </style> - </noscript> -</%def> - -<%def name="render_item_links( history )"> - <a - href="${h.url_for( controller='/history', action='imp', id=trans.security.encode_id(history.id) )}" - class="icon-button import" - ## Needed to overwide initial width so that link is floated left appropriately. - style="width: 100%" - title="Import history">Import history</a> -</%def> - -<%def name="render_item( history, datasets )"> - %if history.deleted: - <div class="warningmessagesmall"> - ${_('You are currently viewing a deleted history!')} - </div> - <p></p> - %endif - - %if not datasets: - <div class="infomessagesmall" id="emptyHistoryMessage"> - %else: - ## Render requested datasets, ordered from newest to oldest, including annotations. - <table class="annotated-item"> - <tr><th>Dataset</th><th class="annotation">Annotation</th></tr> - %for data in datasets: - <tr> - %if data.visible: - <td> - <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}"> - ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )} - </div> - </td> - <td class="annotation"> - %if hasattr( data, "annotation") and data.annotation is not None: - ${data.annotation} - %endif - </td> - %endif - </tr> - %endfor - </table> - <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;"> - %endif - ${_("This history is empty.")} - </div> -</%def> \ No newline at end of file diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/display_structured.mako --- a/templates/history/display_structured.mako +++ /dev/null @@ -1,132 +0,0 @@ -<%inherit file="/base.mako"/> -<%namespace file="/root/history_common.mako" import="render_dataset" /> - -<%def name="stylesheets()"> - ${parent.stylesheets()} - ${h.css( "history" )} - <style type="text/css"> - body { - background: white; - padding: 5px; - } - - .clickable { - cursor: pointer; - } - - .workflow { - border: solid gray 1px; - margin: 5px 0; - border-left-width: 5px; - } - - .workflow > .header { - background: lightgray; - padding: 5px 10px; - - font-weight: bold; - } - - .workflow > .body { - border-top: solid gray 1px; - padding: 5px; - } - - div.toolForm { - margin: 5px 0; - border-left-width: 5px; - } - div.toolFormBody { - padding: 5px 5px; - } - </style> -</%def> - -<%def name="javascripts()"> - ${parent.javascripts()} - <script type="text/javascript"> - $(function(){ - - $(".workflow, .tool").each( function() { - var body = $(this).children( ".body" ); - $(this).children( ".header" ).click( function() { - body.toggle(); - }).addClass( "clickable" ); - // body.hide(); - }); - - $(".historyItem").each( function() { - var id = this.id; - var body = $(this).children( "div.historyItemBody" ); - var peek = body.find( "pre.peek" ) - $(this).children( ".historyItemTitleBar" ).find( ".historyItemTitle" ).wrap( "<a href='#'></a>" ).click( function() { - if ( body.is(":visible") ) { - // Hiding stuff here - if ( $.browser.mozilla ) { peek.css( "overflow", "hidden" ) } - body.slideUp( "fast" ); - } else { - // Showing stuff here - body.slideDown( "fast", function() { - if ( $.browser.mozilla ) { peek.css( "overflow", "auto" ); } - }); - } - return false; - }); - body.hide(); - }); - }); - </script> -</%def> - -<%def name="render_item( entity, children )"> -<% -entity_name = entity.__class__.__name__ -if entity_name == "HistoryDatasetAssociation": - render_item_hda( entity, children ) -elif entity_name == "Job": - render_item_job( entity, children ) -elif entity_name == "WorkflowInvocation": - render_item_wf( entity, children ) -%> -</%def> - -<%def name="render_item_hda( hda, children )"> - ${render_dataset( hda, hda.hid, display_structured=True )} -</%def> - -<%def name="render_item_job( job, children )"> - - <div class="tool toolForm"> - <% - tool = trans.app.toolbox.get_tool( job.tool_id ) - if tool: - tool_name = tool.name - else: - tool_name = "Unknown tool with id '%s'" % job.tool_id - %> - <div class="header toolFormTitle">Tool: ${tool_name}</div> - <div class="body toolFormBody"> - %for e, c in reversed( children ): - ${render_item( e, c )} - %endfor - </div> - </div> - -</%def> - -<%def name="render_item_wf( wf, children )"> - - <div class="workflow"> - <div class="header">Workflow: ${wf.workflow.name}</div> - <div class="body"> - %for e, c in reversed( children ): - ${render_item( e, c )} - %endfor - </div> - </div> - -</%def> - -%for entity, children in items: - ${render_item( entity, children )} -%endfor \ No newline at end of file diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/embed.mako --- a/templates/history/embed.mako +++ /dev/null @@ -1,13 +0,0 @@ -<%inherit file="/embed_base.mako"/> -<%! - from galaxy.web.framework.helpers import iff -%> - -<%def name="render_summary_content( history, datasets )"> - -## <ul> -## <% num_datasets = len ( datasets ) %> -## <li>${num_datasets} dataset${iff( num_datasets != 1, "s", "" )} -## <li>Operations: ... -## </ul> -</%def> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/grid.mako --- a/templates/history/grid.mako +++ /dev/null @@ -1,25 +0,0 @@ -<%inherit file="../grid_base.mako"/> - -<%def name="grid_javascripts()"> - ${parent.grid_javascripts()} - <script type="text/javascript"> - %if refresh_frames: - %if 'history' in refresh_frames: - if ( parent.frames && parent.frames.galaxy_history ) { - parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}"; - if ( parent.force_right_panel ) { - parent.force_right_panel( 'show' ); - } - } - %endif - %endif - </script> -</%def> - -<%def name="grid_body( grid )"> - ${self.make_grid( grid )} - <br/> - <div class="toolParamHelp" style="clear: both;"> - Histories that have been deleted for more than a time period specified by the Galaxy administrator(s) may be permanently deleted. - </div> -</%def> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/item_content.mako --- a/templates/history/item_content.mako +++ /dev/null @@ -1,3 +0,0 @@ -<%namespace file="/history/display.mako" import="*" /> - -${render_item( item, item_data )} \ No newline at end of file diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/list_as_xml.mako --- a/templates/history/list_as_xml.mako +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0"?> -<history_ids> - %for i, history in enumerate( t.user.histories ): - <data id="${trans.security.encode_id( history.id )}" hid="${i+1}" num="${len(history.datasets)}" name="${history.name}" create="${history.create_time}" update="${history.update_time}" > - </data> - %endfor -</history_ids> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/list_published.mako --- a/templates/history/list_published.mako +++ /dev/null @@ -1,34 +0,0 @@ -<%inherit file="/webapps/galaxy/base_panels.mako"/> - -<%def name="init()"> -<% - self.has_left_panel=False - self.has_right_panel=False - self.active_view="shared" - self.message_box_visible=False -%> -</%def> - -<%def name="title()"> - Galaxy | Published Histories -</%def> - -<%def name="stylesheets()"> - ${parent.stylesheets()} - <style> - .grid td { - min-width: 100px; - } - </style> -</%def> - -<%def name="center_panel()"> - - <div style="overflow: auto; height: 100%;"> - <div class="page-container" style="padding: 10px;"> - ${h.to_unicode( grid )} - </div> - </div> - - -</%def> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/options.mako --- a/templates/history/options.mako +++ /dev/null @@ -1,32 +0,0 @@ -<% _=n_ %> -<%inherit file="/base.mako"/> -<%def name="title()">History options</%def> - -<h2>${_('History Options')}</h2> - -%if not user: -<div class="infomessage"> - <div>${_('You must be ')}<a target="galaxy_main" href="${h.url_for( controller='user', action='login' )}">${_('logged in')}</a>${_(' to store or switch histories.')}</div> -</div> -%endif - -<ul> - %if user: - <li><a href="${h.url_for( controller='history', action='list')}" target="galaxy_main">Previously</a> stored histories</li> - %if len( history.active_datasets ) > 0: - <li><a href="${h.url_for( controller='root', action='history_new' )}">Create</a> a new empty history</li> - <li><a href="${h.url_for( controller='workflow', action='build_from_current_history' )}">Construct workflow</a> from current history</li> - <li><a href="${h.url_for( controller='history', action='copy', id=trans.security.encode_id( history.id ) )}">Copy</a> current history</li> - %endif - <li><a href="${h.url_for( controller='history', action='share' )}" target="galaxy_main">Share</a> current history</div> - <li><a href="${h.url_for( controller='root', action='history_set_default_permissions' )}">Change default permissions</a> for current history</li> - %endif - %if len( history.activatable_datasets ) > 0: - <li><a href="${h.url_for( controller='root', action='history', show_deleted=True)}" target="galaxy_history">Show deleted</a> datasets in current history</li> - %endif - <li><a href="${h.url_for( controller='history', action='rename', id=trans.security.encode_id( history.id ) )}" target="galaxy_main">Rename</a> current history (stored as "${history.name}")</li> - <li><a href="${h.url_for( controller='history', action='delete_current' )}" confirm="Are you sure you want to delete the current history?">Delete</a> current history</div> - %if user and user.histories_shared_by_others: - <li><a href="${h.url_for( controller='history', action='list_shared')}" target="galaxy_main">Histories</a> shared with you by others</li> - %endif -</ul> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/permissions.mako --- a/templates/history/permissions.mako +++ /dev/null @@ -1,8 +0,0 @@ -<%inherit file="/base.mako"/> -<%def name="title()">Change Default Permissions on New Datasets in This History</%def> -<%namespace file="/dataset/security_common.mako" import="render_permission_form" /> - -%if trans.user: - <% history = trans.get_history() %> - ${render_permission_form( history, history.name, h.url_for(), trans.user.all_roles() )} -%endif diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/rename.mako --- a/templates/history/rename.mako +++ /dev/null @@ -1,38 +0,0 @@ -<%inherit file="/base.mako"/> -<%def name="title()">${_('Rename History')}</%def> - -<div class="toolForm"> - <div class="toolFormTitle">${_('Rename')}</div> - <div class="toolFormBody"> - <form action="${h.url_for( controller='history', action='rename' )}" method="post" > - <div class="form-row"> - <table> - <thead> - <tr> - <th>${_('Current Name')}</th> - <th>${_('New Name')}</th> - </tr> - </thead> - <tbody> - %for history in histories: - <tr> - <td> - <input type="hidden" name="id" value="${trans.security.encode_id( history.id )}"> - ${history.get_display_name() | h} - </td> - <td> - <input type="text" name="name" value="${history.get_display_name() | h}" size="40"> - </td> - </tr> - %endfor - </tbody> - <tr> - <td colspan="2"> - <input type="submit" name="history_rename_btn" value="${_('Rename Histories')}"> - </td> - </tr> - </table> - </div> - </form> - </div> -</div> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/share.mako --- a/templates/history/share.mako +++ /dev/null @@ -1,192 +0,0 @@ -<% _=n_ %> -<%inherit file="/base.mako"/> -<%def name="title()">Share histories</%def> - -<div class="toolForm"> - <div class="toolFormTitle">Share ${len( histories)} histories</div> - <div class="toolFormBody"> - %if not can_change and not cannot_change and not no_change_needed: - ## We are sharing histories that contain only public datasets - <form name='share' id='share' action="${h.url_for( action='share' )}" method="post" > - <div class="form-title-row"><b>Histories to be shared:</b></div> - <div class="form-row" style="padding-left: 2em;"> - <table width="100%"> - <thead> - <th>${_('History Name')}</th> - <th>${_('Number of Datasets')}</th> - </thead> - <tbody> - %for history in histories: - <tr> - <td> - <input type="hidden" name="id" value="${trans.security.encode_id( history.id )}"> - ${ util.unicodify( history.name )} - </td> - <td> - %if len( history.datasets ) < 1: - <div class="warningmark">${_('This history contains no data.')}</div> - %else: - ${len(history.datasets)} - %endif - </td> - </tr> - %endfor - </tbody> - </table> - </div> - <div style="clear: both"></div> - <div class="form-row"> - <label>Galaxy user emails with which to share histories</label> - <div style="float: left; width: 250px; margin-right: 10px;"> - <input type="text" name="email" value="${email}" size="40"> - </div> - <div class="toolParamHelp" style="clear: both;"> - Enter a Galaxy user email address or a comma-separated list of addresses if sharing with multiple users - </div> - </div> - %if send_to_err: - <div style="clear: both"></div> - <div class="form-row"> - <div class="errormessage">${send_to_err}</div> - </div> - %endif - <div style="clear: both"></div> - <div class="form-row"> - <input type="submit" name="share_button" value="Submit"> - </div> - </form> - %else: - ## We are sharing restricted histories - %if no_change_needed or can_change: - <form name='share_restricted' id=share_restricted' action="${h.url_for( controller='history', action='share_restricted' )}" method="post"> - %if send_to_err: - <div style="clear: both"></div> - <div class="form-row"> - <div class="errormessage">${send_to_err}</div> - </div> - %endif - ## Needed for rebuilding dicts - <input type="hidden" name="email" value="${email}" size="40"> - %for history in histories: - <input type="hidden" name="id" value="${trans.security.encode_id( history.id )}"> - %endfor - %if no_change_needed: - ## no_change_needed looks like: {historyX : [hda, hda], historyY : [hda] } - <div style="clear: both"></div> - <div class="form-row"> - <div class="donemessage"> - The following datasets can be shared with ${email} with no changes - </div> - </div> - %for history, hdas in no_change_needed.items(): - <div class="form-row"> - <label>History</label> - ${util.unicodify( history.name )} - </div> - <div style="clear: both"></div> - <div class="form-row"> - <label>Datasets</label> - </div> - %for hda in hdas: - <div class="form-row"> - ${util.unicodify( hda.name )} - %if hda.deleted: - (deleted) - %endif - </div> - %endfor - %endfor - %endif - %if can_change: - ## can_change looks like: {historyX : [hda, hda], historyY : [hda] } - <div style="clear: both"></div> - <div class="form-row"> - <div class="warningmessage"> - The following datasets can be shared with ${email} by updating their permissions - </div> - </div> - %for history, hdas in can_change.items(): - <div class="form-row"> - <label>History</label> - ${util.unicodify( history.name )} - </div> - <div style="clear: both"></div> - <div class="form-row"> - <label>Datasets</label> - </div> - %for hda in hdas: - <div class="form-row"> - ${util.unicodify( hda.name )} - %if hda.deleted: - (deleted) - %endif - </div> - %endfor - %endfor - %endif - %if cannot_change: - ## cannot_change looks like: {historyX : [hda, hda], historyY : [hda] } - <div style="clear: both"></div> - <div class="form-row"> - <div class="errormessage"> - The following datasets cannot be shared with ${email} because you are not authorized to - change the permissions on them - </div> - </div> - %for history, hdas in cannot_change.items(): - <div class="form-row"> - <label>History</label> - ${util.unicodify( history.name )} - </div> - <div style="clear: both"></div> - <div class="form-row"> - <label>Datasets</label> - </div> - %for hda in hdas: - <div class="form-row"> - ${util.unicodify( hda.name )} - %if hda.deleted: - (deleted) - %endif - </div> - %endfor - %endfor - %endif - <div class="toolFormTitle"></div> - <div class="form-row"> - <label>How would you like to proceed?</label> - </div> - %if can_change: - <div class="form-row"> - <input type="radio" name="action" value="public"> Make datasets public so anyone can access them - %if cannot_change: - (where possible) - %endif - </div> - <div class="form-row"> - %if no_change_needed: - <input type="radio" name="action" value="private"> Make datasets private to me and the user(s) with whom I am sharing - %else: - <input type="radio" name="action" value="private" checked> Make datasets private to me and the user(s) with whom I am sharing - %endif - %if cannot_change: - (where possible) - %endif - </div> - %endif - %if no_change_needed: - <div class="form-row"> - <input type="radio" name="action" value="share_anyway" checked> Share anyway - %if can_change: - (don't change any permissions) - %endif - </div> - %endif - <div class="form-row"> - <input type="submit" name="share_restricted_button" value="Go"><br/> - </div> - </form> - %endif - %endif - </div> -</div> diff -r c714feaad11541377edd84af1179869c1a8e4f47 -r 4c6e63dc04c9bd2a82ecd11b8ffdf5b544a8e355 templates/history/view.mako --- a/templates/history/view.mako +++ /dev/null @@ -1,140 +0,0 @@ -<%namespace file="/display_common.mako" import="get_history_link, get_controller_name" /> -<%namespace file="/root/history_common.mako" import="render_dataset" /> -<%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" /> - -<%! - def inherit(context): - if context.get('use_panels'): - return '/webapps/galaxy/base_panels.mako' - else: - return '/base.mako' -%> -<%inherit file="${inherit(context)}"/> - -<%def name="javascripts()"> - ${parent.javascripts()} - ${h.js( "libs/jquery/jstorage" )} - <script type="text/javascript"> - $(function() { - init_history_items( $("div.historyItemWrapper"), false, "nochanges" ); - }); - </script> -</%def> - -<%def name="stylesheets()"> - ${parent.stylesheets()} - ${h.css( "history", "autocomplete_tagging" )} - <style type="text/css"> - .historyItemContainer { - padding-right: 3px; - border-right-style: solid; - border-right-color: #66AA66; - } - .page-body - { - padding: 10px; - float: left; - width: 65%; - } - .page-meta - { - float: right; - width: 27%; - padding: 0.5em; - margin: 0.25em; - vertical-align: text-top; - border: 2px solid #DDDDDD; - border-top: 4px solid #DDDDDD; - } - </style> - - <style> - .historyItemBody { - display: none; - } - </style> - - <noscript> - <style> - .historyItemBody { - display: block; - } - </style> - </noscript> -</%def> - -<%def name="init()"> -<% - self.has_left_panel=False - self.has_right_panel=False - self.message_box_visible=False -%> -</%def> - -<%def name="body()"> - ${center_panel()} -</%def> - -<%def name="center_panel()"> - ## Get URL to other histories owned by user that owns this history. - <% - ##TODO: is there a better way to create this URL? Can't use 'f-username' as a key b/c it's not a valid identifier. - href_to_published_histories = h.url_for( controller='/history', action='list_published') - if history.user is not None: - href_to_user_histories = h.url_for( controller='/history', action='list_published', xxx=history.user.username).replace( 'xxx', 'f-username') - else: - href_to_user_histories = h.url_for( controller='/history', action='list_published' )##should this instead be be None or empty string? - %> - - <div class="unified-panel-header" unselectable="on"> - </div> - - <div class="unified-panel-body"> - <div style="overflow: auto; height: 100%;"> - ## Render view of history. - <div id="top-links" class="historyLinks" style="padding: 0px 0px 5px 0px"> - %if not history.purged: - <a href="${h.url_for( action='imp', id=trans.security.encode_id(history.id) )}">import and start using history</a> | - <a href="${get_history_link( history )}">${_('refresh')}</a> | - %endif - %if show_deleted: - <a href="${h.url_for( id=trans.security.encode_id(history.id), show_deleted=False, use_panels=use_panels )}">${_('hide deleted')}</a> | - %else: - <a href="${h.url_for( id=trans.security.encode_id(history.id), show_deleted=True, use_panels=use_panels )}">${_('show deleted')}</a> | - %endif - <a href="#" class="toggle">collapse all</a> - </div> - - <div id="history-name-area" class="historyLinks" style="color: gray; font-weight: bold; padding: 0px 0px 5px 0px"> - <div id="history-name">${history.get_display_name()}</div> - </div> - - %if history.deleted: - <div class="warningmessagesmall"> - ${_('You are currently viewing a deleted history!')} - </div> - <p></p> - %endif - - %if not datasets: - - <div class="infomessagesmall" id="emptyHistoryMessage"> - - %else: - - ## Render requested datasets, ordered from newest to oldest - %for data in datasets: - %if data.visible: - <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}"> - ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )} - </div> - %endif - %endfor - - <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;"> - %endif - ${_("Your history is empty. Click 'Get Data' on the left pane to start")} - </div> - </div> - </div> -</%def> This diff is so big that we needed to truncate the remainder. Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket