diff --git a/client/galaxy/scripts/mvc/library/library-dataset-view.js b/client/galaxy/scripts/mvc/library/library-dataset-view.js index 44baf7c9022..81cb6fd4e3d 100644 --- a/client/galaxy/scripts/mvc/library/library-dataset-view.js +++ b/client/galaxy/scripts/mvc/library/library-dataset-view.js @@ -202,29 +202,47 @@ var LibraryDatasetView = Backbone.View.extend({ }, importCurrentIntoHistory: function(){ - // var self = this; - var history_id = $(this.modal.elMain).find('select[name=dataset_import_single] option:selected').val(); - var historyItem = new mod_library_model.HistoryItem(); - historyItem.url = historyItem.urlRoot + history_id + '/contents'; - - // set the used history as current so user will see the last one - // that he imported into in the history panel on the 'analysis' page - jQuery.getJSON( Galaxy.root + 'history/set_as_current?id=' + history_id ); - - // save the dataset into selected history - historyItem.save({ content : this.id, source : 'library' }, { - success : function(){ - Galaxy.modal.hide(); - mod_toastr.success('Dataset imported. Click this to start analyzing it.', '', {onclick: function() {window.location='/';}}); - }, - error : function(model, response){ - if (typeof response.responseJSON !== "undefined"){ - mod_toastr.error('Dataset not imported. ' + response.responseJSON.err_msg); - } else { - mod_toastr.error('An error occured. Dataset not imported. Please try again.'); - } - } + this.modal.disableButton('Import'); + var new_history_name = this.modal.$('input[name=history_name]').val(); + var that = this; + if (new_history_name !== ''){ + $.post( Galaxy.root + 'api/histories', {name: new_history_name}) + .done(function( new_history ) { + that.processImportToHistory(new_history.id); + }) + .fail(function( xhr, status, error ) { + mod_toastr.error('An error ocurred.'); + }) + .always(function() { + that.modal.enableButton('Import'); }); + } else { + var history_id = $(this.modal.$el).find('select[name=dataset_import_single] option:selected').val(); + this.processImportToHistory(history_id); + this.modal.enableButton('Import'); + } + }, + + processImportToHistory: function( history_id ){ + var historyItem = new mod_library_model.HistoryItem(); + historyItem.url = historyItem.urlRoot + history_id + '/contents'; + // set the used history as current so user will see the last one + // that he imported into in the history panel on the 'analysis' page + jQuery.getJSON( Galaxy.root + 'history/set_as_current?id=' + history_id ); + // save the dataset into selected history + historyItem.save({ content : this.id, source : 'library' }, { + success : function(){ + Galaxy.modal.hide(); + mod_toastr.success('Dataset imported. Click this to start analyzing it.', '', {onclick: function() {window.location='/';}}); + }, + error : function(model, response){ + if (typeof response.responseJSON !== "undefined"){ + mod_toastr.error('Dataset not imported. ' + response.responseJSON.err_msg); + } else { + mod_toastr.error('An error occured. Dataset not imported. Please try again.'); + } + } + }); }, shareDataset: function(){ @@ -1039,17 +1057,25 @@ var LibraryDatasetView = Backbone.View.extend({ templateBulkImportInModal: function(){ return _.template([ - '', - 'Select history: ', - '', - '' + '
', + '
', + 'Select history: ', + '', + '
', + '
', + 'or create new: ', + '', + '', + '
', + '
' ].join('')); }, + templateAccessSelect: function(){ return _.template([ ''}),$('
'+e+"
").appendTo("body").submit().remove(),a.info("Your download will begin soon.")}},importIntoHistory:function(){this.refreshUserHistoriesList(function(a){var b=a.templateBulkImportInModal();a.modal=Galaxy.modal,a.modal.show({closing_events:!0,title:"Import into History",body:b({histories:a.histories.models}),buttons:{Import:function(){a.importCurrentIntoHistory()},Close:function(){Galaxy.modal.hide()}}})})},refreshUserHistoriesList:function(c){var d=this;this.histories=new b.GalaxyHistories,this.histories.fetch({success:function(b){0===b.length?a.warning("You have to create history first. Click this to do so.","",{onclick:function(){window.location="/"}}):c(d)},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error ocurred.")}})},importCurrentIntoHistory:function(){var c=$(this.modal.elMain).find("select[name=dataset_import_single] option:selected").val(),d=new b.HistoryItem;d.url=d.urlRoot+c+"/contents",jQuery.getJSON(Galaxy.root+"history/set_as_current?id="+c),d.save({content:this.id,source:"library"},{success:function(){Galaxy.modal.hide(),a.success("Dataset imported. Click this to start analyzing it.","",{onclick:function(){window.location="/"}})},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?"Dataset not imported. "+c.responseJSON.err_msg:"An error occured. Dataset not imported. Please try again.")}})},shareDataset:function(){a.info("Feature coming soon.")},goBack:function(){Galaxy.libraries.library_router.back()},showPermissions:function(b){this.options=_.extend(this.options,b),$(".tooltip").remove(),void 0!==this.options.fetched_permissions&&this.model.set(0===this.options.fetched_permissions.access_dataset_roles.length?{is_unrestricted:!0}:{is_unrestricted:!1});var c=!1;Galaxy.user&&(c=Galaxy.user.isAdmin());var d=this.templateDatasetPermissions();this.$el.html(d({item:this.model,is_admin:c}));var e=this;void 0===this.options.fetched_permissions?$.get(Galaxy.root+"api/libraries/datasets/"+e.id+"/permissions?scope=current").done(function(a){e.prepareSelectBoxes({fetched_permissions:a,is_admin:c})}).fail(function(){a.error("An error occurred while attempting to fetch dataset permissions.")}):this.prepareSelectBoxes({is_admin:c}),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},_serializeRoles:function(a){for(var b=[],c=0;c=0;b--)ids_list.push(a[b].id);return ids_list},savePermissions:function(){var b=this,c=this._extractIds(this.accessSelectObject.$el.select2("data")),d=this._extractIds(this.manageSelectObject.$el.select2("data")),e=this._extractIds(this.modifySelectObject.$el.select2("data"));$.post(Galaxy.root+"api/libraries/datasets/"+b.id+"/permissions?action=set_permissions",{"access_ids[]":c,"manage_ids[]":d,"modify_ids[]":e}).done(function(c){b.showPermissions({fetched_permissions:c}),a.success("Permissions saved.")}).fail(function(){a.error("An error occurred while attempting to set dataset permissions.")})},fetchExtAndGenomes:function(){var a=this;c.get({url:Galaxy.root+"api/datatypes?extension_only=False",success:function(b){for(key in b)a.list_extensions.push({id:b[key].extension,text:b[key].extension,description:b[key].description,description_url:b[key].description_url});a.list_extensions.sort(function(a,b){return a.id>b.id?1:a.idb.id?1:a.id','
','",'",'<% if (item.get("can_user_modify")) { %>','","<% } %>",'<% if (item.get("can_user_manage")) { %>','/datasets/<%- item.id %>/permissions">','","","<% } %>","
",'",'<% if (item.get("is_unrestricted")) { %>','
',"This dataset is unrestricted so everybody can access it. Just share the URL of this page. ",' ","
","<% } %>",'
','',"",'','',"",'<% if (item.get("file_ext")) { %>',"",'','',"","<% } %>",'<% if (item.get("genome_build")) { %>',"",'','',"","<% } %>",'<% if (item.get("file_size")) { %>',"",'','',"","<% } %>",'<% if (item.get("date_uploaded")) { %>',"",'','',"","<% } %>",'<% if (item.get("uploaded_by")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_data_lines")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_comment_lines")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_columns")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_column_types")) { %>',"",'','',"","<% } %>",'<% if (item.get("message")) { %>',"",'','',"","<% } %>",'<% if (item.get("misc_blurb")) { %>',"",'','',"","<% } %>",'<% if (item.get("misc_info")) { %>',"",'','',"","<% } %>","
">Name<%= _.escape(item.get("name")) %>
Data type<%= _.escape(item.get("file_ext")) %>
Genome build<%= _.escape(item.get("genome_build")) %>
Size<%= _.escape(item.get("file_size")) %>
Date uploaded (UTC)<%= _.escape(item.get("date_uploaded")) %>
Uploaded by<%= _.escape(item.get("uploaded_by")) %>
Data Lines<%= _.escape(item.get("metadata_data_lines")) %>
Comment Lines<%= _.escape(item.get("metadata_comment_lines")) %>
Number of Columns<%= _.escape(item.get("metadata_columns")) %>
Column Types<%= _.escape(item.get("metadata_column_types")) %>
Message<%= _.escape(item.get("message")) %>
Miscellaneous blurb<%= _.escape(item.get("misc_blurb")) %>
Miscellaneous information<%= _.escape(item.get("misc_info")) %>
","
",'
',"
","
",'<% if (item.get("has_versions")) { %>',"
","

Expired versions:

","
","<% } %>","
",""].join(""))},templateVersion:function(){return _.template(['
','",'",'
This is an expired version of the library dataset: <%= _.escape(item.get("name")) %>
','
','',"",'','',"",'<% if (ldda.get("file_ext")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("genome_build")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("file_size")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("date_uploaded")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("uploaded_by")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_data_lines")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_comment_lines")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_columns")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_column_types")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("message")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("misc_blurb")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("misc_info")) { %>',"",'','',"","<% } %>","
Name<%= _.escape(ldda.get("name")) %>
Data type<%= _.escape(ldda.get("file_ext")) %>
Genome build<%= _.escape(ldda.get("genome_build")) %>
Size<%= _.escape(ldda.get("file_size")) %>
Date uploaded (UTC)<%= _.escape(ldda.get("date_uploaded")) %>
Uploaded by<%= _.escape(ldda.get("uploaded_by")) %>
Data Lines<%= _.escape(ldda.get("metadata_data_lines")) %>
Comment Lines<%= _.escape(ldda.get("metadata_comment_lines")) %>
Number of Columns<%= _.escape(ldda.get("metadata_columns")) %>
Column Types<%= _.escape(ldda.get("metadata_column_types")) %>
Message<%= _.escape(ldda.get("message")) %>
Miscellaneous blurb<%= _.escape(ldda.get("misc_blurb")) %>
Miscellaneous information<%= _.escape(ldda.get("misc_info")) %>
","
",'
',"
","
","
","
"].join(""))},templateModifyDataset:function(){return _.template(['
','
','",'","
",'",'
','

For full editing options please import the dataset to history and use "Edit attributes" on it.

','',"",'','',"","",'',"","","",'',"","","",'','',"","",'','',"","",'','',"",'','','',"",'','<% if (item.get("metadata_comment_lines") === "") { %>','',"<% } else { %>",'',"<% } %>","","",'','',"","",'','',"","",'','',"","",'','',"","",'','',"","
">Name">
Data type",'',"
Genome build",'',"
Size<%= _.escape(item.get("file_size")) %>
Date uploaded (UTC)<%= _.escape(item.get("date_uploaded")) %>
Uploaded by<%= _.escape(item.get("uploaded_by")) %>
Data Lines<%= _.escape(item.get("metadata_data_lines")) %>
Comment Lines<%= _.escape(item.get("metadata_comment_lines")) %>unknown
Number of Columns<%= _.escape(item.get("metadata_columns")) %>
Column Types<%= _.escape(item.get("metadata_column_types")) %>
Message<%= _.escape(item.get("message")) %>
Miscellaneous information<%= _.escape(item.get("misc_info")) %>
Miscellaneous blurb<%= _.escape(item.get("misc_blurb")) %>
","
",'
',"
","
","
","
"].join(""))},templateDatasetPermissions:function(){return _.template(['
','",'",'

Dataset: <%= _.escape(item.get("name")) %>

','
',"<% if (is_admin) { %>","You are logged in as an administrator therefore you can manage any dataset on this Galaxy instance. Please make sure you understand the consequences.","<% } else { %>","You can assign any number of roles to any of the following permission types. However please read carefully the implications of such actions.","<% } %>","
",'
',"

Library-related permissions

","

Roles that can modify the library item

",'
','
User with any of these roles can modify name, metadata, and other information about this library item.
',"
","

Dataset-related permissions

",'
Changes made below will affect every library item that was created from this dataset and also every history this dataset is part of.
','<% if (!item.get("is_unrestricted")) { %>',"

You can remove all access restrictions on this dataset. ",'","

","<% } else { %>","This dataset is unrestricted so everybody can access it. Just share the URL of this page.",'","

You can make this dataset private to you. ",'","

","<% } %>","

Roles that can access the dataset

",'
','
',"User has to have all these roles in order to access this dataset."," Users without access permission cannot have other permissions on this dataset."," If there are no access roles set on the dataset it is considered unrestricted.","
","

Roles that can manage permissions on the dataset

",'
','
',"User with any of these roles can manage permissions of this dataset. If you remove yourself you will loose the ability manage this dataset unless you are an admin.","
",'","
","
"].join(""))},templateBulkImportInModal:function(){return _.template(['',"Select history: ",'",""].join(""))},templateAccessSelect:function(){return _.template(['"].join(""))}});return{LibraryDatasetView:e}}); +define(["libs/toastr","mvc/library/library-model","utils/utils","mvc/ui/ui-select"],function(a,b,c,d){var e=Backbone.View.extend({el:"#center",model:null,options:{},events:{"click .toolbtn_modify_dataset":"enableModification","click .toolbtn_cancel_modifications":"render","click .toolbtn-download-dataset":"downloadDataset","click .toolbtn-import-dataset":"importIntoHistory","click .toolbtn-share-dataset":"shareDataset","click .btn-copy-link-to-clipboard":"copyToClipboard","click .btn-make-private":"makeDatasetPrivate","click .btn-remove-restrictions":"removeDatasetRestrictions","click .toolbtn_save_permissions":"savePermissions","click .toolbtn_save_modifications":"comingSoon"},select_genome:null,select_extension:null,list_extensions:[],auto:{id:"auto",text:"Auto-detect",description:"This system will try to detect the file type automatically. If your file is not detected properly as one of the known formats, it most likely means that it has some format problems (e.g., different number of columns on different rows). You can still coerce the system to set your data to the format you think it should be. You can also upload compressed files, which will automatically be decompressed."},list_genomes:[],initialize:function(a){this.options=_.extend(this.options,a),this.fetchExtAndGenomes(),this.options.id&&this.fetchDataset()},fetchDataset:function(c){this.options=_.extend(this.options,c),this.model=new b.Item({id:this.options.id});var d=this;this.model.fetch({success:function(){d.options.show_permissions?d.showPermissions():d.options.show_version?d.fetchVersion():d.render()},error:function(b,c){"undefined"!=typeof c.responseJSON?a.error(c.responseJSON.err_msg+" Click this to go back.","",{onclick:function(){Galaxy.libraries.library_router.back()}}):a.error("An error ocurred. Click this to go back.","",{onclick:function(){Galaxy.libraries.library_router.back()}})}})},render:function(a){this.options=_.extend(this.options,a),$(".tooltip").remove();var b=this.templateDataset();this.$el.html(b({item:this.model})),$(".peek").html(this.model.get("peek")),$("#center [data-toggle]").tooltip()},fetchVersion:function(c){this.options=_.extend(this.options,c),that=this,this.options.ldda_id?(this.ldda=new b.Ldda({id:this.options.ldda_id}),this.ldda.url=this.ldda.urlRoot+this.model.id+"/versions/"+this.ldda.id,this.ldda.fetch({success:function(){that.renderVersion()},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error ocurred.")}})):(this.render(),a.error("Library dataset version requested but no id provided."))},renderVersion:function(){$(".tooltip").remove();var a=this.templateVersion();this.$el.html(a({item:this.model,ldda:this.ldda})),$(".peek").html(this.ldda.get("peek"))},enableModification:function(){$(".tooltip").remove();var a=this.templateModifyDataset();this.$el.html(a({item:this.model})),this.renderSelectBoxes({genome_build:this.model.get("genome_build"),file_ext:this.model.get("file_ext")}),$(".peek").html(this.model.get("peek")),$("#center [data-toggle]").tooltip()},downloadDataset:function(){var a=Galaxy.root+"api/libraries/datasets/download/uncompressed",b={ld_ids:this.id};this.processDownload(a,b)},processDownload:function(b,c,d){if(b&&c){c="string"==typeof c?c:$.param(c);var e="";$.each(c.split("&"),function(){var a=this.split("=");e+=''}),$('
'+e+"
").appendTo("body").submit().remove(),a.info("Your download will begin soon.")}},importIntoHistory:function(){this.refreshUserHistoriesList(function(a){var b=a.templateBulkImportInModal();a.modal=Galaxy.modal,a.modal.show({closing_events:!0,title:"Import into History",body:b({histories:a.histories.models}),buttons:{Import:function(){a.importCurrentIntoHistory()},Close:function(){Galaxy.modal.hide()}}})})},refreshUserHistoriesList:function(c){var d=this;this.histories=new b.GalaxyHistories,this.histories.fetch({success:function(b){0===b.length?a.warning("You have to create history first. Click this to do so.","",{onclick:function(){window.location="/"}}):c(d)},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?c.responseJSON.err_msg:"An error ocurred.")}})},importCurrentIntoHistory:function(){this.modal.disableButton("Import");var b=this.modal.$("input[name=history_name]").val(),c=this;if(""!==b)$.post(Galaxy.root+"api/histories",{name:b}).done(function(a){c.processImportToHistory(a.id)}).fail(function(){a.error("An error ocurred.")}).always(function(){c.modal.enableButton("Import")});else{var d=$(this.modal.$el).find("select[name=dataset_import_single] option:selected").val();this.processImportToHistory(d),this.modal.enableButton("Import")}},processImportToHistory:function(c){var d=new b.HistoryItem;d.url=d.urlRoot+c+"/contents",jQuery.getJSON(Galaxy.root+"history/set_as_current?id="+c),d.save({content:this.id,source:"library"},{success:function(){Galaxy.modal.hide(),a.success("Dataset imported. Click this to start analyzing it.","",{onclick:function(){window.location="/"}})},error:function(b,c){a.error("undefined"!=typeof c.responseJSON?"Dataset not imported. "+c.responseJSON.err_msg:"An error occured. Dataset not imported. Please try again.")}})},shareDataset:function(){a.info("Feature coming soon.")},goBack:function(){Galaxy.libraries.library_router.back()},showPermissions:function(b){this.options=_.extend(this.options,b),$(".tooltip").remove(),void 0!==this.options.fetched_permissions&&this.model.set(0===this.options.fetched_permissions.access_dataset_roles.length?{is_unrestricted:!0}:{is_unrestricted:!1});var c=!1;Galaxy.user&&(c=Galaxy.user.isAdmin());var d=this.templateDatasetPermissions();this.$el.html(d({item:this.model,is_admin:c}));var e=this;void 0===this.options.fetched_permissions?$.get(Galaxy.root+"api/libraries/datasets/"+e.id+"/permissions?scope=current").done(function(a){e.prepareSelectBoxes({fetched_permissions:a,is_admin:c})}).fail(function(){a.error("An error occurred while attempting to fetch dataset permissions.")}):this.prepareSelectBoxes({is_admin:c}),$("#center [data-toggle]").tooltip(),$("#center").css("overflow","auto")},_serializeRoles:function(a){for(var b=[],c=0;c=0;b--)ids_list.push(a[b].id);return ids_list},savePermissions:function(){var b=this,c=this._extractIds(this.accessSelectObject.$el.select2("data")),d=this._extractIds(this.manageSelectObject.$el.select2("data")),e=this._extractIds(this.modifySelectObject.$el.select2("data"));$.post(Galaxy.root+"api/libraries/datasets/"+b.id+"/permissions?action=set_permissions",{"access_ids[]":c,"manage_ids[]":d,"modify_ids[]":e}).done(function(c){b.showPermissions({fetched_permissions:c}),a.success("Permissions saved.")}).fail(function(){a.error("An error occurred while attempting to set dataset permissions.")})},fetchExtAndGenomes:function(){var a=this;c.get({url:Galaxy.root+"api/datatypes?extension_only=False",success:function(b){for(key in b)a.list_extensions.push({id:b[key].extension,text:b[key].extension,description:b[key].description,description_url:b[key].description_url});a.list_extensions.sort(function(a,b){return a.id>b.id?1:a.idb.id?1:a.id','
','",'",'<% if (item.get("can_user_modify")) { %>','","<% } %>",'<% if (item.get("can_user_manage")) { %>','/datasets/<%- item.id %>/permissions">','","","<% } %>","
",'",'<% if (item.get("is_unrestricted")) { %>','
',"This dataset is unrestricted so everybody can access it. Just share the URL of this page. ",' ","
","<% } %>",'
','',"",'','',"",'<% if (item.get("file_ext")) { %>',"",'','',"","<% } %>",'<% if (item.get("genome_build")) { %>',"",'','',"","<% } %>",'<% if (item.get("file_size")) { %>',"",'','',"","<% } %>",'<% if (item.get("date_uploaded")) { %>',"",'','',"","<% } %>",'<% if (item.get("uploaded_by")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_data_lines")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_comment_lines")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_columns")) { %>',"",'','',"","<% } %>",'<% if (item.get("metadata_column_types")) { %>',"",'','',"","<% } %>",'<% if (item.get("message")) { %>',"",'','',"","<% } %>",'<% if (item.get("misc_blurb")) { %>',"",'','',"","<% } %>",'<% if (item.get("misc_info")) { %>',"",'','',"","<% } %>","
">Name<%= _.escape(item.get("name")) %>
Data type<%= _.escape(item.get("file_ext")) %>
Genome build<%= _.escape(item.get("genome_build")) %>
Size<%= _.escape(item.get("file_size")) %>
Date uploaded (UTC)<%= _.escape(item.get("date_uploaded")) %>
Uploaded by<%= _.escape(item.get("uploaded_by")) %>
Data Lines<%= _.escape(item.get("metadata_data_lines")) %>
Comment Lines<%= _.escape(item.get("metadata_comment_lines")) %>
Number of Columns<%= _.escape(item.get("metadata_columns")) %>
Column Types<%= _.escape(item.get("metadata_column_types")) %>
Message<%= _.escape(item.get("message")) %>
Miscellaneous blurb<%= _.escape(item.get("misc_blurb")) %>
Miscellaneous information<%= _.escape(item.get("misc_info")) %>
","
",'
',"
","
",'<% if (item.get("has_versions")) { %>',"
","

Expired versions:

","
","<% } %>","
",""].join(""))},templateVersion:function(){return _.template(['
','",'",'
This is an expired version of the library dataset: <%= _.escape(item.get("name")) %>
','
','',"",'','',"",'<% if (ldda.get("file_ext")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("genome_build")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("file_size")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("date_uploaded")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("uploaded_by")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_data_lines")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_comment_lines")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_columns")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("metadata_column_types")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("message")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("misc_blurb")) { %>',"",'','',"","<% } %>",'<% if (ldda.get("misc_info")) { %>',"",'','',"","<% } %>","
Name<%= _.escape(ldda.get("name")) %>
Data type<%= _.escape(ldda.get("file_ext")) %>
Genome build<%= _.escape(ldda.get("genome_build")) %>
Size<%= _.escape(ldda.get("file_size")) %>
Date uploaded (UTC)<%= _.escape(ldda.get("date_uploaded")) %>
Uploaded by<%= _.escape(ldda.get("uploaded_by")) %>
Data Lines<%= _.escape(ldda.get("metadata_data_lines")) %>
Comment Lines<%= _.escape(ldda.get("metadata_comment_lines")) %>
Number of Columns<%= _.escape(ldda.get("metadata_columns")) %>
Column Types<%= _.escape(ldda.get("metadata_column_types")) %>
Message<%= _.escape(ldda.get("message")) %>
Miscellaneous blurb<%= _.escape(ldda.get("misc_blurb")) %>
Miscellaneous information<%= _.escape(ldda.get("misc_info")) %>
","
",'
',"
","
","
","
"].join(""))},templateModifyDataset:function(){return _.template(['
','
','",'","
",'",'
','

For full editing options please import the dataset to history and use "Edit attributes" on it.

','',"",'','',"","",'',"","","",'',"","","",'','',"","",'','',"","",'','',"",'','','',"",'','<% if (item.get("metadata_comment_lines") === "") { %>','',"<% } else { %>",'',"<% } %>","","",'','',"","",'','',"","",'','',"","",'','',"","",'','',"","
">Name">
Data type",'',"
Genome build",'',"
Size<%= _.escape(item.get("file_size")) %>
Date uploaded (UTC)<%= _.escape(item.get("date_uploaded")) %>
Uploaded by<%= _.escape(item.get("uploaded_by")) %>
Data Lines<%= _.escape(item.get("metadata_data_lines")) %>
Comment Lines<%= _.escape(item.get("metadata_comment_lines")) %>unknown
Number of Columns<%= _.escape(item.get("metadata_columns")) %>
Column Types<%= _.escape(item.get("metadata_column_types")) %>
Message<%= _.escape(item.get("message")) %>
Miscellaneous information<%= _.escape(item.get("misc_info")) %>
Miscellaneous blurb<%= _.escape(item.get("misc_blurb")) %>
","
",'
',"
","
","
","
"].join(""))},templateDatasetPermissions:function(){return _.template(['
','",'",'

Dataset: <%= _.escape(item.get("name")) %>

','
',"<% if (is_admin) { %>","You are logged in as an administrator therefore you can manage any dataset on this Galaxy instance. Please make sure you understand the consequences.","<% } else { %>","You can assign any number of roles to any of the following permission types. However please read carefully the implications of such actions.","<% } %>","
",'
',"

Library-related permissions

","

Roles that can modify the library item

",'
','
User with any of these roles can modify name, metadata, and other information about this library item.
',"
","

Dataset-related permissions

",'
Changes made below will affect every library item that was created from this dataset and also every history this dataset is part of.
','<% if (!item.get("is_unrestricted")) { %>',"

You can remove all access restrictions on this dataset. ",'","

","<% } else { %>","This dataset is unrestricted so everybody can access it. Just share the URL of this page.",'","

You can make this dataset private to you. ",'","

","<% } %>","

Roles that can access the dataset

",'
','
',"User has to have all these roles in order to access this dataset."," Users without access permission cannot have other permissions on this dataset."," If there are no access roles set on the dataset it is considered unrestricted.","
","

Roles that can manage permissions on the dataset

",'
','
',"User with any of these roles can manage permissions of this dataset. If you remove yourself you will loose the ability manage this dataset unless you are an admin.","
",'","
","
"].join(""))},templateBulkImportInModal:function(){return _.template(["
",'
',"Select history: ",'","
",'
',"or create new: ",'',"","
","
"].join(""))},templateAccessSelect:function(){return _.template(['"].join(""))}});return{LibraryDatasetView:e}}); //# sourceMappingURL=../../../maps/mvc/library/library-dataset-view.js.map \ No newline at end of file