aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2015-03-04 17:16:29 +0100
committerJochen Topf <jochen@topf.org>2015-03-04 17:16:29 +0100
commitbcc7efc99bf87d6e8164dff537d2cc4a5c358b22 (patch)
tree74b11eaedad104f2f980590ef807ed9402034d57 /web
parente4dacd87e3df877f908827dc09332a44f4503622 (diff)
downloadtaginfo-bcc7efc99bf87d6e8164dff537d2cc4a5c358b22.tar
taginfo-bcc7efc99bf87d6e8164dff537d2cc4a5c358b22.tar.gz
Check if db table is available for 'Similar keys' report.
Diffstat (limited to 'web')
-rw-r--r--web/lib/reports.rb2
-rw-r--r--web/views/reports/similar_keys.erb12
2 files changed, 5 insertions, 9 deletions
diff --git a/web/lib/reports.rb b/web/lib/reports.rb
index 0412181..db16948 100644
--- a/web/lib/reports.rb
+++ b/web/lib/reports.rb
@@ -60,6 +60,6 @@ Report.new 'Language comparison table for keys in the wiki', :wiki
Report.new 'Languages', :wiki
Report.new 'Wiki pages about non-existing keys', :db, :wiki
Report.new 'Name tags' #disabled
-Report.new 'Similar keys' #disabled, :db
+Report.new 'Similar keys', :db
Report.new 'Historic development', :db
diff --git a/web/views/reports/similar_keys.erb b/web/views/reports/similar_keys.erb
index cc57929..cab3a70 100644
--- a/web/views/reports/similar_keys.erb
+++ b/web/views/reports/similar_keys.erb
@@ -3,14 +3,10 @@
<%= t.reports.similar_keys.intro %>
</div>
<div class="box resize">
+<% begin @db.count('db.similar_keys_common_rare').execute() %>
<table id="grid-keys">
</table>
+<% rescue %>
+ <p><i>Report not available due to missing database table. Please run update!</i></p>
+<% end %>
</div>
-<% javascript do
- JS.raw(<<"JAVASCRIPT")
-function page_init2() {
-// create_flexigrid();
-}
-JAVASCRIPT
-end
-%>