From 84dc56483203e13eafe69962ec6bc0c28c47aca7 Mon Sep 17 00:00:00 2001 From: hellekin Date: Sat, 23 Jan 2021 15:42:33 +0100 Subject: Remove unused Taxonomy target and refactor debug Cleaning up the code. --- app/javascript/controllers/taxonomy_controller.js | 3 ++- app/views/application/_debug.html.erb | 2 +- app/views/welcome/index.html.erb | 19 ++++++++++--------- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'app') diff --git a/app/javascript/controllers/taxonomy_controller.js b/app/javascript/controllers/taxonomy_controller.js index 413872b..48d9a52 100644 --- a/app/javascript/controllers/taxonomy_controller.js +++ b/app/javascript/controllers/taxonomy_controller.js @@ -9,7 +9,7 @@ import { Controller } from "stimulus" export default class extends Controller { - static targets = [ "category", "deploy", "filter", "layers", "section", "toggle" ] + static targets = [ "category", "deploy", "filter", "section", "toggle" ] initialize() { console.log("Taxonomy controller initialized.") @@ -18,6 +18,7 @@ export default class extends Controller { this.sectionsOnMap = [] } + // Load filtering sidebar connect() { console.log("Taxonomy controller connected.") this.taxonomy_uuid = this.data.get('uuid') diff --git a/app/views/application/_debug.html.erb b/app/views/application/_debug.html.erb index fce114d..94b4a1a 100644 --- a/app/views/application/_debug.html.erb +++ b/app/views/application/_debug.html.erb @@ -1,4 +1,4 @@ -<% if Rails.env.development? %> +<% if Rails.env.development? && current_user.present? %>
<%= yield :debug %>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 0d70707..ca0245a 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,23 +1,24 @@ -

Bienvenue à l'atelier carto d'IN COMMON

+

Bienvenue à l'atelier carto d'IN COMMON

<%= map_container %> + <% content_for :aside do %>
-
<% end %> <% content_for :debug do %> - <% if current_user.present? %> - <%= pluralize(Resource.count, "resource") %> - <% end %><%# ensure it does not break when we don't have a record... %> -<% end %> - -<% content_for :footer do %> - <%= version_string %> +

<%= pluralize(Resource.count, "resource") %>

+

<%= pluralize(Agent.count, "agent") %>

<% end %> -- cgit v1.2.3