-
- Showing {{visible_ont_count}} of {{ontologies.length}}
-
-
-
+
+
Is of Type
+
+
+
+
+ ({{facet_counts["is_of_type"][is_of_type_uri] || 0}})
+
+
+
-
-
-
No matches
-
+
+
Missing Status
+
+
+
-
-
-
VIEW
-
-
-
{{ontology.description | descriptionToText}}
-
- Uploaded: {{ontology.creationDate | date:'shortDate'}}
-
-
- Format: {{ontology.format}}
-
-
- View of: {{ontology.viewOfOnt.acronym}}
-
-
- Summary Only
-
-
- Groups: {{groupAcronyms(ontology.groups).join(', ')}}
-
-
- Categories: {{categoryNames(ontology.categories).join(', ')}}
-
-
-
- Admins: {{adminUsernames(ontology.administeredBy).join(', ')}}
-
-
- Pull URL
-
-
- Status: {{ontology.submissionStatusFormatted}}
-
-
-
-
-
No submissions available
-
+
+
diff --git a/app/views/ontologies/sections/_metadata.html.haml b/app/views/ontologies/sections/_metadata.html.haml
index 43c7180c6..46c942e61 100644
--- a/app/views/ontologies/sections/_metadata.html.haml
+++ b/app/views/ontologies/sections/_metadata.html.haml
@@ -1,4 +1,4 @@
-= turbo_frame_tag 'summary' do
+= turbo_frame_tag 'summary', target:"_top" do
%div.ont-metadata
-# Details pane
%section.ont-metadata-card.ont-details-card
@@ -49,6 +49,11 @@
%tr
%td Groups
%td= groups.map {|g| groups_hash[g].name}.sort.join(", ")
+ - if @ontology.admin?(session[:user])
+ %tr
+ %td Pull URL
+ %td
+ = link_to @submission_latest.pullLocation, @submission_latest.pullLocation
= raw additional_details
= render partial: 'additional_metadata'
@@ -63,7 +68,8 @@
- unless (@submission_latest.nil? || (@submission_latest.respond_to?(:status) && @submission_latest.status == 404))
= link_to(edit_ontology_submission_path(@ontology.acronym, @submission_latest.submissionId), "aria-label": "Edit latest submission", title: "Edit latest submission") do
%i.fas.fa-user-edit{"aria-hidden": "true", style: "margin-left: 0.5rem;"}
- = render partial: "submissions"
+ = render TurboFrameComponent.new(id: 'ontology_submissions', src: ontology_submissions_path(@ontology.acronym))
+
-# Views pane (don't show if the ontology is a view - we don't allow views of views).
- unless @ontology.view?
diff --git a/app/views/ontologies_metadata_curator/_form_edit.html.haml b/app/views/ontologies_metadata_curator/_form_edit.html.haml
index c1cd1ec10..24ed94da2 100644
--- a/app/views/ontologies_metadata_curator/_form_edit.html.haml
+++ b/app/views/ontologies_metadata_curator/_form_edit.html.haml
@@ -1,10 +1,5 @@
= turbo_frame_tag 'application_modal_content' do
:javascript
- function displayWarning() {
- const container = document.getElementById("change_all_warning_container")
- const display = container.style.display
- container.style.display = display === 'block' ? 'none' : 'block'
- }
function saveSelectedTab(value){
const input = document.getElementById("active_ontology")
input.value = value
@@ -19,6 +14,7 @@
= form_for :submission, url: "/ontologies_metadata_curator/update", html: {method: :put}, data: { turbo: true} do
= hidden_field_tag :active_ontology, ontology_submission_id_label(*@selected_ontologies.first), id: 'active_ontology'
+ = hidden_field_tag :all_metadata, @all_metadata
%div.d-flex.justify-content-between
%ul#ontologies-pills-tab.nav.nav-pills.mb-3
- @selected_ontologies.each_with_index do |value, index|
@@ -26,9 +22,7 @@
%li.nav-item
%a.nav-link{id: "pills-"+onto+sub_i+"-tab", "data-toggle": "pill", href: "#pills-"+onto+sub_i, class: index.zero? ? 'active' : ''}
= ontology_submission_id_label(onto, sub_i)
- %div{onchange: 'displayWarning()'}
- = render SwitchInputComponent.new(id: 'change_all', name: 'change_all', label: "Apply the change for all")
- %div#change_all_warning_container{style: 'display: none'}
+ %div#change_all_warning_container
= render AlertMessageComponent.new(id:'change_all_warning', type: 'warning') do
%strong Apply the change for all
will update the current displayed content to all the following submssions:
diff --git a/app/views/ontologies_metadata_curator/_metadata_tab.html.haml b/app/views/ontologies_metadata_curator/_metadata_tab.html.haml
index 57951c64c..d0c2abf76 100644
--- a/app/views/ontologies_metadata_curator/_metadata_tab.html.haml
+++ b/app/views/ontologies_metadata_curator/_metadata_tab.html.haml
@@ -13,7 +13,7 @@
%div.mt-3.flex-shrink-0
%button{type: "submit", class: "btn btn-success"}
Get values
- %div.mt-3.flex-shrink-0.flex-fill
+ %div.mt-3.flex-shrink-0.flex-fill.d-flex.align-items-center
= turbo_frame_tag "edit_metadata_btn"
= render TurboFrameComponent.new(id: 'selection_metadata_form') do
diff --git a/app/views/ontologies_metadata_curator/_result.html.haml b/app/views/ontologies_metadata_curator/_metadata_table.html.haml
similarity index 59%
rename from app/views/ontologies_metadata_curator/_result.html.haml
rename to app/views/ontologies_metadata_curator/_metadata_table.html.haml
index d20a232fa..73850816d 100644
--- a/app/views/ontologies_metadata_curator/_result.html.haml
+++ b/app/views/ontologies_metadata_curator/_metadata_table.html.haml
@@ -6,6 +6,7 @@
}
= form_tag("/ontologies_metadata_curator/edit", id: "properties_result_form", method: "post", data: { turbo: true, turbo_frame: 'application_modal_content' }) do
+ = hidden_field_tag :all_metadata, @metadata_sel
= submit_to_modal("Edit metadata values" , id:"show_bulk_edit_from_btn", class: "d-none",
data: { show_modal_title_value: "Metadata curator editor", show_modal_size_value: 'modal-xl' })
%div.table-container.mx-3
@@ -21,13 +22,4 @@
%tbody
- @submissions.each do |submission|
- - acronym = submission.ontology.acronym
- %tr
- %th{scope:"row", style: 'width: 5%'}
- %div
- - value = ontology_submission_id_label(acronym, submission.submissionId)
- = render SwitchInputComponent.new(id: submission.id, name: 'selected_acronyms[]', value: value) do
- %h6{style:'margin-top: 0.2rem'}=value
- - @metadata_sel.each do |meta|
- %td{style: "width: #{95 / @metadata_sel.size}%; vertical-align: top; word-break: break-word;"}
- = render partial: 'attribute_inline_editable', locals: {attribute: meta, submission: submission, ontology: submission.ontology}
+ = render partial: 'metadata_table_row', locals: {submission: submission, attributes: @metadata_sel}
diff --git a/app/views/ontologies_metadata_curator/_metadata_table_row.html.haml b/app/views/ontologies_metadata_curator/_metadata_table_row.html.haml
new file mode 100644
index 000000000..dd687bfba
--- /dev/null
+++ b/app/views/ontologies_metadata_curator/_metadata_table_row.html.haml
@@ -0,0 +1,10 @@
+- acronym = submission.ontology.acronym
+- id = ontology_submission_id_label(acronym, submission.submissionId)
+%tr{id: id+'_row'}
+ %th{scope:"row", style: 'width: 5%'}
+ %div
+ = render SwitchInputComponent.new(id: submission.id, name: 'selected_acronyms[]', value: id) do
+ %h6{style:'margin-top: 0.2rem'}=id
+ - attributes.each do |meta|
+ %td{style: "width: #{95 / attributes.size}%; vertical-align: top; word-break: break-word;"}
+ = render partial: 'attribute_inline_editable', locals: {attribute: meta, submission: submission, ontology: submission.ontology}
\ No newline at end of file
diff --git a/app/views/shared/_ontology_picker_advanced.html.erb b/app/views/shared/_ontology_picker_advanced.html.erb
index 0e0720e15..dcaa32a46 100644
--- a/app/views/shared/_ontology_picker_advanced.html.erb
+++ b/app/views/shared/_ontology_picker_advanced.html.erb
@@ -10,122 +10,7 @@ var ontSelectListPos = { top: 0, left: 0, width: 0 };
var allSelected = false;
var alignToDOMId = <%=(align_to_dom_id || @select_id).to_json.html_safe%>;
-jQuery(document).ready(function(){
- ontSelectListPos.top = jQuery("#"+alignToDOMId).offset().top;
- ontSelectListPos.left = jQuery("#"+alignToDOMId).offset().left;
- ontSelectListPos.width = jQuery("#"+alignToDOMId).width();
-
- // Watch for changes in the entry of the select list
- jQuery("#<%=@select_id%>").change(function(e) {
- ontLabelToAbbr();
- syncFromList();
- });
-
- // Reset labels on page load and make sure checkbox is in sync
- ontLabelToAbbr();
- syncFromList();
-
- // Hide the advanced select when focusing in the chosen select box
- jQuery("#"+alignToDOMId).bind("focus", hideAdvancedSelect);
-
- // Hide the advanced select when clicking anywhere except in advanced select
- jQuery('html').click(function() {
- hideAdvancedSelect();
- });
-
- // Hide advanced select when hitting escape
- jQuery(document).keyup(function(e) {
- if (e.keyCode == 27) { hideAdvancedSelect(); } // esc
- });
-
- // Wire advanced selection
- jQuery('#ont_select_adv').click(function(event){
- event.stopPropagation();
- bp_popup_cleanup();
- });
-
- // Wire clear selections
- jQuery("#ont_select_clear").click(clearAllSelections);
-
- // Wire up the link to open dialog box
- jQuery("#ont_select_adv_href").click(function() {
- var ont_select = jQuery("#ont_select_adv");
- var chzn_select = jQuery("#"+alignToDOMId);
-
- ont_select.css("top", "50px");
- ont_select.css("left", chzn_select.offset().left + chzn_select.width() - 1);
- ont_select.css("width", jQuery(window).width() - (chzn_select.offset().left + chzn_select.width()) - 100 + "px");
- ont_select.css("height", jQuery(window).height() - 80);
-
- // Configure the chosen select list box to remove background, move z-index above the advanced select
- chzn_select.css("z-index", "4000");
- chzn_select.children("ul.chzn-choices").addClass("no_right_border");
- chzn_select.children("ul.chzn-choices").css("background", "white");
- // Chosen select list congig changes for IE
- chzn_select.children("ul.chzn-choices").css("filter", "none");
- jQuery("#<%=@select_id%>_chzn input").css("filter", "none");
-
- jQuery("#<%=@select_id%>_container").css("box-shadow", "0 0 10px gray");
-
-
- jQuery("#ont_list_container").height(ont_select.height() - 80);
-
- jQuery("#ont_select_adv").show();
- return false;
- });
-
- // Wire up close advanced select "X"
- jQuery("#close_adv_select").click(function(){
- hideAdvancedSelect();
- });
-
- // Wire up watcher for checkboxes for sync
- jQuery(".ont_select_boxes_tr input:checkbox").click(function(){
- syncFromCheckboxes();
- if (allSelected = true) {
- allSelected = false;
- jQuery("#ont_select_all").attr("checked", false);
- } else {
- // Compare total checkboxes to checked to see if they're all checked
- if (jQuery(".ont_select_boxes_tr input:checkbox").length == jQuery(".ont_select_boxes_tr input:checked").length) {
- allSelected = true;
- jQuery("#ont_select_all").attr("checked", true);
- }
- }
- });
-
- // Toggle all selected
- jQuery("#ont_select_all").click(function(){
- if (jQuery(this).attr("checked")) {
- allSelected = true;
- } else {
- allSelected = false;
- }
- jQuery(".ont_select_boxes_tr input:checkbox").attr("checked", allSelected);
- syncFromCheckboxes();
- refreshOntList();
- });
-
- // Select ontologies that are visible in the filter list
- jQuery("#ont_select_all_filtered").click(function(){
- if (jQuery(this).attr("checked")) {
- jQuery(".ont_select_boxes_tr input:checkbox:visible").attr("checked", true);
- } else {
- jQuery(".ont_select_boxes_tr input:checkbox:visible").attr("checked", false);
- }
- syncFromCheckboxes();
- refreshOntList();
- });
-
- // Wire up group/category select
- select_groups.init();
- select_categories.init();
-
- // Wire up show all filtered link
- jQuery("#show_all_filtered_ontologies").bind("click", showAllFiltered);
-
-});
var hideAdvancedSelect = function(){
if (jQuery("#ont_select_adv").is(":visible")) {
@@ -310,10 +195,127 @@ function clearAllSelections() {
//ondomready
- jQuery(function () {
- listFilter(jQuery("#advanced_filter_input"), jQuery("#ont_list"));
- });
+ jQuery(document).ready(() => {
+ listFilter(jQuery("#advanced_filter_input"), jQuery("#ont_list"));
+ })
}(jQuery));
+
+jQuery(document).ready(function(){
+ ontSelectListPos.top = jQuery("#"+alignToDOMId).offset().top;
+ ontSelectListPos.left = jQuery("#"+alignToDOMId).offset().left;
+ ontSelectListPos.width = jQuery("#"+alignToDOMId).width();
+
+ // Watch for changes in the entry of the select list
+ jQuery("#<%=@select_id%>").change(function(e) {
+ ontLabelToAbbr();
+ syncFromList();
+ });
+
+ // Reset labels on page load and make sure checkbox is in sync
+ ontLabelToAbbr();
+ syncFromList();
+
+ // Hide the advanced select when focusing in the chosen select box
+ jQuery("#"+alignToDOMId).bind("focus", hideAdvancedSelect);
+
+ // Hide the advanced select when clicking anywhere except in advanced select
+ jQuery('html').click(function() {
+ hideAdvancedSelect();
+ });
+
+ // Hide advanced select when hitting escape
+ jQuery(document).keyup(function(e) {
+ if (e.keyCode == 27) { hideAdvancedSelect(); } // esc
+ });
+
+ // Wire advanced selection
+ jQuery('#ont_select_adv').click(function(event){
+ event.stopPropagation();
+ bp_popup_cleanup();
+ });
+
+ // Wire clear selections
+ jQuery("#ont_select_clear").click(clearAllSelections);
+
+ // Wire up the link to open dialog box
+ jQuery("#ont_select_adv_href").click(function() {
+ var ont_select = jQuery("#ont_select_adv");
+ var chzn_select = jQuery("#"+alignToDOMId);
+
+ ont_select.css("top", "50px");
+ ont_select.css("left", chzn_select.offset().left + chzn_select.width() - 1);
+ ont_select.css("width", jQuery(window).width() - (chzn_select.offset().left + chzn_select.width()) - 100 + "px");
+ ont_select.css("height", jQuery(window).height() - 80);
+
+ // Configure the chosen select list box to remove background, move z-index above the advanced select
+ chzn_select.css("z-index", "4000");
+ chzn_select.children("ul.chzn-choices").addClass("no_right_border");
+ chzn_select.children("ul.chzn-choices").css("background", "white");
+ // Chosen select list congig changes for IE
+ chzn_select.children("ul.chzn-choices").css("filter", "none");
+ jQuery("#<%=@select_id%>_chzn input").css("filter", "none");
+
+ jQuery("#<%=@select_id%>_container").css("box-shadow", "0 0 10px gray");
+
+
+ jQuery("#ont_list_container").height(ont_select.height() - 80);
+
+ jQuery("#ont_select_adv").show();
+
+ return false;
+ });
+
+ // Wire up close advanced select "X"
+ jQuery("#close_adv_select").click(function(){
+ hideAdvancedSelect();
+ });
+
+ // Wire up watcher for checkboxes for sync
+ jQuery(".ont_select_boxes_tr input:checkbox").click(function(){
+ syncFromCheckboxes();
+ if (allSelected = true) {
+ allSelected = false;
+ jQuery("#ont_select_all").attr("checked", false);
+ } else {
+ // Compare total checkboxes to checked to see if they're all checked
+ if (jQuery(".ont_select_boxes_tr input:checkbox").length == jQuery(".ont_select_boxes_tr input:checked").length) {
+ allSelected = true;
+ jQuery("#ont_select_all").attr("checked", true);
+ }
+ }
+ });
+
+ // Toggle all selected
+ jQuery("#ont_select_all").click(function(){
+ if (jQuery(this).attr("checked")) {
+ allSelected = true;
+ } else {
+ allSelected = false;
+ }
+ jQuery(".ont_select_boxes_tr input:checkbox").attr("checked", allSelected);
+ syncFromCheckboxes();
+ refreshOntList();
+ });
+
+ // Select ontologies that are visible in the filter list
+ jQuery("#ont_select_all_filtered").click(function(){
+ if (jQuery(this).attr("checked")) {
+ jQuery(".ont_select_boxes_tr input:checkbox:visible").attr("checked", true);
+ } else {
+ jQuery(".ont_select_boxes_tr input:checkbox:visible").attr("checked", false);
+ }
+ syncFromCheckboxes();
+ refreshOntList();
+ });
+
+ // Wire up group/category select
+ select_groups.init();
+ select_categories.init();
+
+ // Wire up show all filtered link
+ jQuery("#show_all_filtered_ontologies").bind("click", showAllFiltered);
+
+});
diff --git a/app/views/submissions/_submissions.html.haml b/app/views/submissions/_submissions.html.haml
new file mode 100644
index 000000000..6a666118f
--- /dev/null
+++ b/app/views/submissions/_submissions.html.haml
@@ -0,0 +1,77 @@
+= turbo_frame_tag id do
+ - return "" if @ontology.metadata_only?
+
+ - more_colspan = 7
+ - more_colspan = 6 if @ont_restricted
+
+ %div.click_versions_collapse
+ = render_alerts_container(AdminController)
+ %table#ontology_versions.table.table-sm.table-striped
+ %thead
+ %tr
+ - if @ontology.admin?(session[:user])
+ %th.align-middle ID
+ %th.align-middle Version
+ %th
+ = generate_attribute_text("released", "Released")
+ %th
+ = generate_attribute_text("modificationDate", "Modified")
+ %th
+ = generate_attribute_text("creationDate", "Uploaded")
+ - unless @ont_restricted
+ %th.align-middle Downloads
+ - if @ontology.admin?(session[:user])
+ %th.align-middle Actions
+
+ - begin
+ - submission_ready = @ontology.explore.latest_submission({:include_status => 'ready', display: 'submissionId'})
+ - submission_readyId = submission_ready.submissionId unless submission_ready.nil?
+ - rescue
+ - submission_readyId = -1
+ - @submissions.each_with_index do |sub, index|
+ - hidden_row_class = index >= 5 ? "hidden_ont hidden_select" : ""
+ %tr{class: "#{hidden_row_class}", id: "submission_#{sub.submissionId}"}
+ - if @ontology.admin?(session[:user])
+ %td
+ = sub.submissionId
+ %td
+ = raw status_link(sub, sub.submissionId==submission_readyId)
+ %td
+ = xmldatetime_to_date(sub.released) unless sub.released.nil?
+ %td
+ = xmldatetime_to_date(sub.modificationDate) unless sub.modificationDate.nil?
+ %td
+ = xmldatetime_to_date(sub.creationDate) unless sub.creationDate.nil?
+ - unless @ont_restricted
+ %td
+ = raw download_link(sub, @ontology)
+ - if @ontology.admin?(session[:user])
+ %td
+ %div.d-flex
+ %a.btn.btn-sm.btn-link{:href => "/ontologies/#{@ontology.acronym}/submissions/#{sub.submissionId}/edit"}
+ %span Edit
+ - unless index.zero?
+ - alert_text = "Are you sure you want to delete submission " + sub.submissionId.to_s + " for ontology " + @ontology.acronym + "?
This action CAN NOT be undone!!!"
+ = button_to "Delete", "/admin/ontologies/#{@ontology.acronym}/submissions/#{sub.submissionId}?turbo_stream=true", method: :delete, class:'btn btn-sm btn-link', form: {data: { turbo: true, turbo_confirm: alert_text, turbo_frame: '_top'}}
+
+ - if @submissions.length > 5
+ %tr
+ %td{colspan: more_colspan, class: "show_more_subs"}
+ %a#version_toggle{:href => ""} more...
+
+ :javascript
+ jQuery(document).ready(() => {
+ jQuery("#version_toggle").click( (event) => {
+ event.preventDefault();
+ jQuery("#ontology_versions tr.hidden_select").toggleClass("hidden_ont")
+ const oldText = event.target.innerHTML
+ switch (oldText) {
+ case 'more...':
+ event.target.innerHTML = 'less...'
+ break
+ case 'less...':
+ event.target.innerHTML = 'more...'
+ break
+ }
+ })
+ })
\ No newline at end of file
diff --git a/app/views/submissions/index.html.haml b/app/views/submissions/index.html.haml
new file mode 100644
index 000000000..d31fd94d2
--- /dev/null
+++ b/app/views/submissions/index.html.haml
@@ -0,0 +1 @@
+= render partial: "submissions", locals: {id: 'ontology_submissions'}
\ No newline at end of file
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 02348c8df..3a32ccf0a 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -30,8 +30,9 @@
%h2 Subscriptions
%table
- @user.subscription.each do |subscription|
- - ont = (!subscription[:ontology].nil? ? subscription[:ontology].split('/').last: nil) # ensure we get the acronym
- - type = (!subscription[:notification_type].nil? ? subscription[:notification_type].downcase : nil)
+ - ont_id = subscription[:ontology]
+ - ont = ont_id.nil? ? nil: subscription[:ontology].split('/').last
+ - type = subscription[:notification_type].nil? ? nil : subscription[:notification_type].downcase
%tr{style: "padding: 5px;"}
%td{style: "padding: 5px;"}
%a{href: "/ontologies/#{ont}"}= ont
@@ -42,7 +43,7 @@
= type
%td{style: "padding: 5px;"}
.subscribe_to_ontology{style: "float: left;"}
- = raw subscribe_ontology_button(ont, @user)
+ = subscribe_button(ont_id)
%br/
- unless @user_projects.nil? || @user_projects.empty?
@@ -66,38 +67,8 @@
:javascript
jQuery(document).ready(function(){
jQuery("#edit_custom_ontologies").click(editCustomOntologies);
- // Wire up subscriptions button activity
- jQuery("a.subscribe_to_ontology").live("click", function(){
- subscribeToOntology(this);
- });
});
- function subscribeToOntology(button) {
- var ontologyId = jQuery(button).attr("data-bp_ontology_id");
- var isSubbed = jQuery(button).attr("data-bp_is_subbed");
- var userId = jQuery(button).attr("data-bp_user_id");
- jQuery(".subscribe_error").html("");
- jQuery(".subscribe_spinner").show();
- jQuery.ajax({
- type: "POST",
- url: "/subscriptions?user_id="+userId+"&ontology_id="+ontologyId+"&subbed="+isSubbed,
- dataType: "json",
- success: function(data) {
- jQuery(".subscribe_spinner").hide();
- // Toggle subbed value on a element
- var subbedVal = (isSubbed === "true") ? "false" : "true";
- jQuery("a.subscribe_to_ontology").attr("data-bp_is_subbed", subbedVal);
- // Change button text
- var txt = jQuery("a.subscribe_to_ontology").html();
- var newButtonText = txt.match("Unsubscribe") ? txt.replace("Unsubscribe", "Subscribe") : txt.replace("Subscribe", "Unsubscribe");
- jQuery("a.subscribe_to_ontology").html(newButtonText);
- },
- error: function(data) {
- jQuery(".subscribe_spinner").hide();
- jQuery(".subscribe_error").html("Problem subscribing to emails, please try again");
- }
- });
- }
function editCustomOntologies() {
jQuery("#custom_ontologies_picker").css("left", "").css("position", "");
@@ -132,9 +103,36 @@
- else
%p{style: "padding-left: 7px;"} You haven't picked any ontologies yet
-
- %li= link_to("Subscribe","/users/subscribe/" + @user.username, class: "btn btn-sm btn-default")
- %li= link_to("Unsubscribe","/users/un-subscribe/" + @user.email,class: "btn btn-sm btn-default")
+ %div
+ %h5{style:"margin-top:18px"} Subscription service
+
+ %div{style:"margin-top:12px"}
+
+ %label.switch
+ %input{type: "checkbox", id: "subscribe", data: {url: '/toggle'}}
+ %span Subscribe to the #{$ANNOUNCE_LIST} user mailing list
+ %span.slider.round
+
+ %br
+
+ %label.switch
+ %input{type: "checkbox", id: "unsubscribe", data: {url: '/toggle'}}
+ %span Unsubscribe from the #{$ANNOUNCE_LIST} user mailing list
+ %span.slider.round
+
+
+ :javascript
+ document.getElementById('subscribe').addEventListener('change', function() {
+ if (this.checked) {
+ window.location.href = "/users/subscribe/" + "#{@user.username}"
+ }
+ });
+
+ document.getElementById('unsubscribe').addEventListener('change', function() {
+ if (this.checked) {
+ window.location.href = "/users/un-subscribe/" + "#{@user.email}"
+ }
+ });
#custom_ontologies_picker{style: "left: -9999px; position: absolute;"}
= form_tag custom_ontologies_path(url_encode(@user.username)) do
diff --git a/config/bioportal_config_env.rb.sample b/config/bioportal_config_env.rb.sample
index 52bf20072..4c83979d0 100644
--- a/config/bioportal_config_env.rb.sample
+++ b/config/bioportal_config_env.rb.sample
@@ -50,6 +50,11 @@ $REST_URL = "http://example.org:8080/"
#$ANNOTATOR_URL = "http://services.stageportal.lirmm.fr/annotator"
$ANNOTATOR_URL = "#{$REST_URL}/annotator"
+# Announcements sympa mailing list REQUEST address, EX: list-request@lists.example.org
+$ANNOUNCE_LIST_SERVICE ||= "SERVICE_EXAMPLE"
+$ANNOUNCE_SERVICE_HOST ||= "service@test.com"
+$ANNOUNCE_LIST||= "users-list@test"
+
# Used to define other bioportal that can be mapped to
# Example to map to ncbo bioportal : {"ncbo" => {"api" => "http://data.bioontology.org", "ui" => "http://bioportal.bioontology.org", "apikey" => ""}
# Then create the mapping using the following class in JSON : "http://purl.bioontology.org/ontology/MESH/C585345": "ncbo:MESH"
diff --git a/config/newrelic.yml b/config/newrelic.yml
new file mode 100644
index 000000000..57282d3ec
--- /dev/null
+++ b/config/newrelic.yml
@@ -0,0 +1,51 @@
+# This file configures the New Relic Agent. New Relic monitors Ruby, Java,
+# .NET, PHP, Python, Node, and Go applications with deep visibility and low
+# overhead. For more information, visit www.newrelic.com.
+#
+# Generated December 31, 2022
+#
+# This configuration file is custom generated for NewRelic Administration
+#
+# For full documentation of agent configuration options, please refer to
+# https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration
+
+common: &default_settings
+ # Required license key associated with your New Relic account.
+ license_key: <%= Rails.application.credentials[:newrelic][:license_key] %>
+
+ # Your application name. Renaming here affects where data displays in New
+ # Relic. For more details, see https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/renaming-applications
+ app_name: <%= Rails.application.credentials[:newrelic][:app_name] %>
+
+ distributed_tracing:
+ enabled: true
+
+ # To disable the agent regardless of other settings, uncomment the following:
+ # agent_enabled: false
+
+ # Logging level for log/newrelic_agent.log
+ log_level: info
+
+ application_logging:
+ # If `true`, all logging-related features for the agent can be enabled or disabled
+ # independently. If `false`, all logging-related features are disabled.
+ enabled: true
+ forwarding:
+ # If `true`, the agent captures log records emitted by this application.
+ enabled: true
+ # Defines the maximum number of log records to buffer in memory at a time.
+ max_samples_stored: 10000
+ metrics:
+ # If `true`, the agent captures metrics related to logging for this application.
+ enabled: true
+ local_decorating:
+ # If `true`, the agent decorates logs with metadata to link to entities, hosts, traces, and spans.
+ # This requires a log forwarder to send your log files to New Relic.
+ # This should not be used when forwarding is enabled.
+ enabled: false
+
+# Environment-specific settings are in this section.
+# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
+# If your application has other named environments, configure them here.
+appliance:
+ <<: *default_settings
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index f55d67452..057297ac7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -2,6 +2,10 @@
root to: 'home#index'
+ get '/notes/new_comment', to: 'notes#new_comment'
+ get '/notes/new_proposal', to: 'notes#new_proposal'
+ get '/notes/new_reply', to: 'notes#new_reply'
+ delete '/notes', to: 'notes#destroy'
resources :notes, constraints: { id: /.+/ }
resources :ontolobridge do
@@ -104,7 +108,8 @@
match '/ontologies/:acronym' => 'ontologies#update', via: [:get, :post]
match '/ontologies/:acronym/submissions/:id' => 'submissions#update', via: [:get, :post]
get '/ontologies/:ontology_id/submissions/new' => 'submissions#new', :ontology_id => /.+/
- match '/ontologies/:ontology_id/submissions' => 'submissions#create', :ontology_id => /.+/, via: [:get, :post]
+ match '/ontologies/:ontology_id/submissions' => 'submissions#create', :ontology_id => /.+/, via: [:post]
+ match '/ontologies/:ontology_id/submissions' => 'submissions#index', :ontology_id => /.+/, via: [:get]
get '/ontologies/:acronym/classes/:purl_conceptid', to: 'ontologies#show', constraints: { purl_conceptid: /[^\/]+/ }
get '/ontologies/:acronym/: f', to: 'ontologies#show', constraints: { purl_conceptid: /[^\/]+/ }
match '/ontologies/:acronym/submissions/:id/edit_metadata' => 'submissions#edit_metadata', via: [:get, :post]
@@ -114,6 +119,7 @@
# Notes
get 'ontologies/:ontology/notes/:noteid', to: 'notes#virtual_show', as: :note_virtual, noteid: /.+/
+ get 'ontologies/:ontology/notes', to: 'notes#virtual_show'
# Ajax
get '/ajax/' => 'ajax_proxy#get', :as => :ajax
@@ -145,6 +151,7 @@
# User
get '/logout' => 'login#destroy', :as => :logout
get '/lost_pass' => 'login#lost_password'
+ get '/lost_pass_success' => 'login#lost_password_success'
get '/reset_password' => 'login#reset_password'
post '/accounts/:id/custom_ontologies' => 'users#custom_ontologies', :as => :custom_ontologies
get '/login_as/:login_as' => 'login#login_as' , constraints: { login_as: /[\d\w\.\-\%\+ ]+/ }
diff --git a/spec/mailers/previews/subscribe_preview.rb b/spec/mailers/previews/subscribe_preview.rb
deleted file mode 100644
index f87949475..000000000
--- a/spec/mailers/previews/subscribe_preview.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-# Preview all emails at http://localhost:3000/rails/mailers/subscribe
-class SubscribePreview < ActionMailer::Preview
-
-end
From 63f68869fc380e9fd3c82132d88e56e65d7d99ce Mon Sep 17 00:00:00 2001
From: Bilel Kihal <61744974+Bilelkihal@users.noreply.github.com>
Date: Thu, 16 Feb 2023 14:14:22 +0100
Subject: [PATCH 33/33] remove import browse
---
app/assets/stylesheets/application.css.scss.erb | 1 -
1 file changed, 1 deletion(-)
diff --git a/app/assets/stylesheets/application.css.scss.erb b/app/assets/stylesheets/application.css.scss.erb
index a9491f3a9..269ee0db0 100644
--- a/app/assets/stylesheets/application.css.scss.erb
+++ b/app/assets/stylesheets/application.css.scss.erb
@@ -42,7 +42,6 @@
@import "fair_assement";
@import "instances_table";
@import "file_uploader";
-@import "browse";
@import "register";
@import "lostpassword";
@import "flatpickr/dist/themes/light";