aboutsummaryrefslogtreecommitdiff
path: root/web/viewsjs
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2015-03-14 11:19:21 +0100
committerJochen Topf <jochen@topf.org>2015-03-14 11:19:21 +0100
commit09c7c596a1cdc045298018af14c2b1e4ea4d6702 (patch)
treeeac337208646281fc5f4b7af6cbfacbc4aa68dd6 /web/viewsjs
parent5ee19155669c1248d5ea9a2613cbd2eb5e478b3d (diff)
downloadtaginfo-09c7c596a1cdc045298018af14c2b1e4ea4d6702.tar
taginfo-09c7c596a1cdc045298018af14c2b1e4ea4d6702.tar.gz
Add wiki images report.
Diffstat (limited to 'web/viewsjs')
-rw-r--r--web/viewsjs/reports/wiki_images.js.erb15
1 files changed, 15 insertions, 0 deletions
diff --git a/web/viewsjs/reports/wiki_images.js.erb b/web/viewsjs/reports/wiki_images.js.erb
new file mode 100644
index 0000000..2e90453
--- /dev/null
+++ b/web/viewsjs/reports/wiki_images.js.erb
@@ -0,0 +1,15 @@
+<%
+ osm = @trans.t.osm
+ misc = @trans.t.misc
+ %>
+function page_init() {
+ var keys = <%= @db.select("SELECT DISTINCT key FROM wiki.wikipages WHERE value IS NULL AND image IN (SELECT image FROM wiki.wiki_images) ORDER BY key").execute().map{ |row| row['key'] }.to_json; %>;
+ console.log(keys);
+ up = function() { window.location = '/reports'; };
+ jQuery('.keyimg').each(function(index) {
+ console.log(index, this);
+ jQuery(this).attr('href', url_for_key(keys[index]));
+ jQuery(this).text(fmt_key(keys[index]));
+ });
+}
+