diff --git a/client/galaxy/scripts/mvc/library/library-dataset-view.js b/client/galaxy/scripts/mvc/library/library-dataset-view.js index fe55da9dc5c..289488adae3 100644 --- a/client/galaxy/scripts/mvc/library/library-dataset-view.js +++ b/client/galaxy/scripts/mvc/library/library-dataset-view.js @@ -29,7 +29,6 @@ var LibraryDatasetView = Backbone.View.extend({ "click .btn-remove-restrictions" : "removeDatasetRestrictions", "click .toolbtn_save_permissions" : "savePermissions", - // missing features below "click .toolbtn_save_modifications" : "comingSoon", // "click .btn-share-dataset" : "comingSoon" @@ -44,8 +43,7 @@ var LibraryDatasetView = Backbone.View.extend({ fetchDataset: function(options){ this.options = _.extend(this.options, options); - - this.model = new mod_library_model.Item({id:this.options.id}); + this.model = new mod_library_model.Item({id: this.options.id}); var that = this; this.model.fetch({ success: function() { @@ -490,490 +488,438 @@ var LibraryDatasetView = Backbone.View.extend({ }, templateDataset : function(){ - var tmpl_array = []; + return _.template([ // CONTAINER START - tmpl_array.push('
| ">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")) %> | ', + '
| ">Name | '); - tmpl_array.push('<%= _.escape(item.get("name")) %> | '); - tmpl_array.push('
|---|---|
| Data type | '); - tmpl_array.push('<%= _.escape(item.get("file_ext")) %> | '); - tmpl_array.push('
| Genome build | '); - tmpl_array.push('<%= _.escape(item.get("genome_build")) %> | '); - tmpl_array.push('
| Size | '); - tmpl_array.push('<%= _.escape(item.get("file_size")) %> | '); - tmpl_array.push('
| Date uploaded (UTC) | '); - tmpl_array.push('<%= _.escape(item.get("date_uploaded")) %> | '); - tmpl_array.push('
| Uploaded by | '); - tmpl_array.push('<%= _.escape(item.get("uploaded_by")) %> | '); - tmpl_array.push('
| Data Lines | '); - tmpl_array.push('<%= _.escape(item.get("metadata_data_lines")) %> | '); - tmpl_array.push('
| Comment Lines | '); - tmpl_array.push('<%= _.escape(item.get("metadata_comment_lines")) %> | '); - tmpl_array.push('
| Number of Columns | '); - tmpl_array.push('<%= _.escape(item.get("metadata_columns")) %> | '); - tmpl_array.push('
| Column Types | '); - tmpl_array.push('<%= _.escape(item.get("metadata_column_types")) %> | '); - tmpl_array.push('
| Message | '); - tmpl_array.push('<%= _.escape(item.get("message")) %> | '); - tmpl_array.push('
| Miscellaneous blurb | '); - tmpl_array.push('<%= _.escape(item.get("misc_blurb")) %> | '); - tmpl_array.push('
| Miscellaneous information | '); - tmpl_array.push('<%= _.escape(item.get("misc_info")) %> | '); - tmpl_array.push('
');
- tmpl_array.push(' ');
- tmpl_array.push(' ', + '', + '
| Name | '); - tmpl_array.push('<%= _.escape(ldda.get("name")) %> | '); - tmpl_array.push('
|---|---|
| Data type | '); - tmpl_array.push('<%= _.escape(ldda.get("file_ext")) %> | '); - tmpl_array.push('
| Genome build | '); - tmpl_array.push('<%= _.escape(ldda.get("genome_build")) %> | '); - tmpl_array.push('
| Size | '); - tmpl_array.push('<%= _.escape(ldda.get("file_size")) %> | '); - tmpl_array.push('
| Date uploaded (UTC) | '); - tmpl_array.push('<%= _.escape(ldda.get("date_uploaded")) %> | '); - tmpl_array.push('
| Uploaded by | '); - tmpl_array.push('<%= _.escape(ldda.get("uploaded_by")) %> | '); - tmpl_array.push('
| Data Lines | '); - tmpl_array.push('<%= _.escape(ldda.get("metadata_data_lines")) %> | '); - tmpl_array.push('
| Comment Lines | '); - tmpl_array.push('<%= _.escape(ldda.get("metadata_comment_lines")) %> | '); - tmpl_array.push('
| Number of Columns | '); - tmpl_array.push('<%= _.escape(ldda.get("metadata_columns")) %> | '); - tmpl_array.push('
| Column Types | '); - tmpl_array.push('<%= _.escape(ldda.get("metadata_column_types")) %> | '); - tmpl_array.push('
| Message | '); - tmpl_array.push('<%= _.escape(ldda.get("message")) %> | '); - tmpl_array.push('
| Miscellaneous blurb | '); - tmpl_array.push('<%= _.escape(ldda.get("misc_blurb")) %> | '); - tmpl_array.push('
| Miscellaneous information | '); - tmpl_array.push('<%= _.escape(ldda.get("misc_info")) %> | '); - tmpl_array.push('
');
- tmpl_array.push(' ');
- tmpl_array.push(' | 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")) %> | ', + '
', + '', + '
For more editing options please import the dataset to history and use "Edit attributes" on it.
'); - tmpl_array.push('| ">Name | '); - tmpl_array.push('"> | '); - tmpl_array.push('
|---|---|
| Data type | '); - tmpl_array.push('<%= _.escape(item.get("file_ext")) %> | '); - tmpl_array.push('
| Genome build | '); - tmpl_array.push('<%= _.escape(item.get("genome_build")) %> | '); - tmpl_array.push('
| Size | '); - tmpl_array.push('<%= _.escape(item.get("file_size")) %> | '); - tmpl_array.push('
| Date uploaded (UTC) | '); - tmpl_array.push('<%= _.escape(item.get("date_uploaded")) %> | '); - tmpl_array.push('
| Uploaded by | '); - tmpl_array.push('<%= _.escape(item.get("uploaded_by")) %> | '); - tmpl_array.push('
| Data Lines | '); - tmpl_array.push('<%= _.escape(item.get("metadata_data_lines")) %> | '); - tmpl_array.push('Comment Lines | '); - tmpl_array.push(' <% if (item.get("metadata_comment_lines") === "") { %>'); - tmpl_array.push('<%= _.escape(item.get("metadata_comment_lines")) %> | '); - tmpl_array.push(' <% } else { %>'); - tmpl_array.push('unknown | '); - tmpl_array.push(' <% } %>'); - tmpl_array.push(' '); - tmpl_array.push('
| Number of Columns | '); - tmpl_array.push('<%= _.escape(item.get("metadata_columns")) %> | '); - tmpl_array.push('
| Column Types | '); - tmpl_array.push('<%= _.escape(item.get("metadata_column_types")) %> | '); - tmpl_array.push('
| Message | '); - tmpl_array.push('<%= _.escape(item.get("message")) %> | '); - tmpl_array.push('
| Miscellaneous information | '); - tmpl_array.push('<%= _.escape(item.get("misc_info")) %> | '); - tmpl_array.push('
| Miscellaneous blurb | '); - tmpl_array.push('<%= _.escape(item.get("misc_blurb")) %> | '); - tmpl_array.push('
');
- tmpl_array.push(' ');
- tmpl_array.push('For more editing options please import the dataset to history and use "Edit attributes" on it.
', + '| ">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 | ', + '<% if (item.get("metadata_comment_lines") === "") { %>', + '<%= _.escape(item.get("metadata_comment_lines")) %> | ', + '<% } else { %>', + '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")) %> | ', + '
', + '', + '
You can remove all access restrictions on this dataset. '); - tmpl_array.push(' '); - tmpl_array.push('
'); - tmpl_array.push('<% } else { %>'); - tmpl_array.push(' This dataset is unrestricted so everybody can access it. Just share the URL of this page.'); - tmpl_array.push(' '); - tmpl_array.push('You can make this dataset private to you. '); - tmpl_array.push(' '); - tmpl_array.push('
'); - // tmpl_array.push('You can share this dataset privately with other Galaxy users. '); - // tmpl_array.push(' '); - // tmpl_array.push('
'); - tmpl_array.push('<% } %>'); - - tmpl_array.push('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. ', + '', + '
', + // 'You can share this dataset privately with other Galaxy users. ', + // '', + // '
', + '<% } %>', + '| ">Name | '),a.push('<%= _.escape(item.get("name")) %> | '),a.push("
|---|---|
| Data type | '),a.push('<%= _.escape(item.get("file_ext")) %> | '),a.push("
| Genome build | '),a.push('<%= _.escape(item.get("genome_build")) %> | '),a.push("
| Size | '),a.push('<%= _.escape(item.get("file_size")) %> | '),a.push("
| Date uploaded (UTC) | '),a.push('<%= _.escape(item.get("date_uploaded")) %> | '),a.push("
| Uploaded by | '),a.push('<%= _.escape(item.get("uploaded_by")) %> | '),a.push("
| Data Lines | '),a.push('<%= _.escape(item.get("metadata_data_lines")) %> | '),a.push("
| Comment Lines | '),a.push('<%= _.escape(item.get("metadata_comment_lines")) %> | '),a.push("
| Number of Columns | '),a.push('<%= _.escape(item.get("metadata_columns")) %> | '),a.push("
| Column Types | '),a.push('<%= _.escape(item.get("metadata_column_types")) %> | '),a.push("
| Message | '),a.push('<%= _.escape(item.get("message")) %> | '),a.push("
| Miscellaneous blurb | '),a.push('<%= _.escape(item.get("misc_blurb")) %> | '),a.push("
| Miscellaneous information | '),a.push('<%= _.escape(item.get("misc_info")) %> | '),a.push("
'),a.push(" "),a.push(" | Name | '),a.push('<%= _.escape(ldda.get("name")) %> | '),a.push("
|---|---|
| Data type | '),a.push('<%= _.escape(ldda.get("file_ext")) %> | '),a.push("
| Genome build | '),a.push('<%= _.escape(ldda.get("genome_build")) %> | '),a.push("
| Size | '),a.push('<%= _.escape(ldda.get("file_size")) %> | '),a.push("
| Date uploaded (UTC) | '),a.push('<%= _.escape(ldda.get("date_uploaded")) %> | '),a.push("
| Uploaded by | '),a.push('<%= _.escape(ldda.get("uploaded_by")) %> | '),a.push("
| Data Lines | '),a.push('<%= _.escape(ldda.get("metadata_data_lines")) %> | '),a.push("
| Comment Lines | '),a.push('<%= _.escape(ldda.get("metadata_comment_lines")) %> | '),a.push("
| Number of Columns | '),a.push('<%= _.escape(ldda.get("metadata_columns")) %> | '),a.push("
| Column Types | '),a.push('<%= _.escape(ldda.get("metadata_column_types")) %> | '),a.push("
| Message | '),a.push('<%= _.escape(ldda.get("message")) %> | '),a.push("
| Miscellaneous blurb | '),a.push('<%= _.escape(ldda.get("misc_blurb")) %> | '),a.push("
| Miscellaneous information | '),a.push('<%= _.escape(ldda.get("misc_info")) %> | '),a.push("
'),a.push(" "),a.push(" For more editing options please import the dataset to history and use "Edit attributes" on it.
'),a.push('| ">Name | '),a.push('"> | '),a.push("
|---|---|
| Data type | '),a.push('<%= _.escape(item.get("file_ext")) %> | '),a.push("
| Genome build | '),a.push('<%= _.escape(item.get("genome_build")) %> | '),a.push("
| Size | '),a.push('<%= _.escape(item.get("file_size")) %> | '),a.push("
| Date uploaded (UTC) | '),a.push('<%= _.escape(item.get("date_uploaded")) %> | '),a.push("
| Uploaded by | '),a.push('<%= _.escape(item.get("uploaded_by")) %> | '),a.push("
| Data Lines | '),a.push('<%= _.escape(item.get("metadata_data_lines")) %> | '),a.push("Comment Lines | '),a.push(' <% if (item.get("metadata_comment_lines") === "") { %>'),a.push('<%= _.escape(item.get("metadata_comment_lines")) %> | '),a.push(" <% } else { %>"),a.push('unknown | '),a.push(" <% } %>"),a.push(" "),a.push("
| Number of Columns | '),a.push('<%= _.escape(item.get("metadata_columns")) %> | '),a.push("
| Column Types | '),a.push('<%= _.escape(item.get("metadata_column_types")) %> | '),a.push("
| Message | '),a.push('<%= _.escape(item.get("message")) %> | '),a.push("
| Miscellaneous information | '),a.push('<%= _.escape(item.get("misc_info")) %> | '),a.push("
| Miscellaneous blurb | '),a.push('<%= _.escape(item.get("misc_blurb")) %> | '),a.push("
'),a.push(" "),a.push("You can remove all access restrictions on this dataset. "),a.push(' "),a.push("
"),a.push("<% } else { %>"),a.push(" This dataset is unrestricted so everybody can access it. Just share the URL of this page."),a.push(' '),a.push("You can make this dataset private to you. "),a.push(' '),a.push("
"),a.push("<% } %>"),a.push("| ">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")) %> | ',"
',"","
| 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")) %> | ',"
',"","
For more editing options please import the dataset to history and use "Edit attributes" on it.
','| ">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 | ','<% if (item.get("metadata_comment_lines") === "") { %>','<%= _.escape(item.get("metadata_comment_lines")) %> | ',"<% } else { %>",'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")) %> | ',"
',"","
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. ",'',"
","<% } %>","