Business intelligence made simple
Prefix helpers with blazer_
Andrew Kane6f34f98e9cf3
diff --git a/app/helpers/blazer/base_helper.rb b/app/helpers/blazer/base_helper.rbindex 70052f82..f8102dac 100644--- a/app/helpers/blazer/base_helper.rb+++ b/app/helpers/blazer/base_helper.rb@@ -1,6 +1,6 @@module Blazermodule BaseHelper- def title(title = nil)+ def blazer_title(title = nil)if titlecontent_for(:title) { title }else@@ -8,7 +8,7 @@ module Blazerendend- def format_value(key, value)+ def blazer_format_value(key, value)if value.is_a?(Integer) && !key.to_s.end_with?("id")number_with_delimiter(value)elsediff --git a/app/views/blazer/checks/index.html.erb b/app/views/blazer/checks/index.html.erbindex eb0eb908..a969c097 100644--- a/app/views/blazer/checks/index.html.erb+++ b/app/views/blazer/checks/index.html.erb@@ -1,4 +1,4 @@-<% title "Checks" %>+<% blazer_title "Checks" %><p style="float: right;"><%= link_to "New Check", new_check_path, class: "btn btn-info" %></p><%= render partial: "blazer/nav" %>diff --git a/app/views/blazer/dashboards/index.html.erb b/app/views/blazer/dashboards/index.html.erbindex 832b0415..85c98755 100644--- a/app/views/blazer/dashboards/index.html.erb+++ b/app/views/blazer/dashboards/index.html.erb@@ -1,4 +1,4 @@-<% title "Dashboards" %>+<% blazer_title "Dashboards" %><p style="float: right;"><%= link_to "New Dashboard", new_dashboard_path, class: "btn btn-info" %></p><%= render partial: "blazer/nav" %>diff --git a/app/views/blazer/dashboards/show.html.erb b/app/views/blazer/dashboards/show.html.erbindex bc44e46b..4febeb4f 100644--- a/app/views/blazer/dashboards/show.html.erb+++ b/app/views/blazer/dashboards/show.html.erb@@ -1,4 +1,4 @@-<% title @dashboard.name %>+<% blazer_title @dashboard.name %><script>function submitIfCompleted($form) {diff --git a/app/views/blazer/queries/edit.html.erb b/app/views/blazer/queries/edit.html.erbindex c503ae81..98e93b2b 100644--- a/app/views/blazer/queries/edit.html.erb+++ b/app/views/blazer/queries/edit.html.erb@@ -1,2 +1,2 @@-<% title "Edit - #{@query.name}" %>+<% blazer_title "Edit - #{@query.name}" %><%= render partial: "form" %>diff --git a/app/views/blazer/queries/new.html.erb b/app/views/blazer/queries/new.html.erbindex c2142ff1..da88a44b 100644--- a/app/views/blazer/queries/new.html.erb+++ b/app/views/blazer/queries/new.html.erb@@ -1,2 +1,2 @@-<% title "New Query" %>+<% blazer_title "New Query" %><%= render partial: "form" %>diff --git a/app/views/blazer/queries/run.html.erb b/app/views/blazer/queries/run.html.erbindex bc8ba288..cb0c3178 100644--- a/app/views/blazer/queries/run.html.erb+++ b/app/views/blazer/queries/run.html.erb@@ -65,7 +65,7 @@</script><% elsif @only_chart %><% if @rows.size == 1 && @rows.first.size == 1 %>- <p style="font-size: 160px;"><%= format_value(@rows.first.keys.first, @rows.first.values.first) %></p>+ <p style="font-size: 160px;"><%= blazer_format_value(@rows.first.keys.first, @rows.first.values.first) %></p><% else %><% @no_chart = true %><% end %>@@ -99,9 +99,9 @@<% if v == "" %><div class="text-muted">empty string</div><% elsif @linked_columns[k] %>- <%= link_to format_value(k, v), @linked_columns[k].gsub("{value}", u(v.to_s)), target: "_blank" %>+ <%= link_to blazer_format_value(k, v), @linked_columns[k].gsub("{value}", u(v.to_s)), target: "_blank" %><% else %>- <%= format_value(k, v) %>+ <%= blazer_format_value(k, v) %><% end %><% if v2 = (@boom[k] || {})[v] %>diff --git a/app/views/blazer/queries/show.html.erb b/app/views/blazer/queries/show.html.erbindex 4a68612d..bfc00039 100644--- a/app/views/blazer/queries/show.html.erb+++ b/app/views/blazer/queries/show.html.erb@@ -1,4 +1,4 @@-<% title @query.name %>+<% blazer_title @query.name %><script>function submitIfCompleted($form) {diff --git a/app/views/layouts/blazer/application.html.erb b/app/views/layouts/blazer/application.html.erbindex 590e82b6..34b7df56 100644--- a/app/views/layouts/blazer/application.html.erb+++ b/app/views/layouts/blazer/application.html.erb@@ -1,7 +1,7 @@<!DOCTYPE html><html><head>- <title><%= title ? title : "Blazer" %></title>+ <title><%= blazer_title ? blazer_title : "Blazer" %></title><meta charset="utf-8" />