summaryrefslogtreecommitdiff
path: root/web/viewsjs
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-09 19:18:55 +0100
committerJochen Topf <jochen@topf.org>2013-01-09 19:18:55 +0100
commit64a047f622a5ed15dea94b5e52dd8c948fce9e95 (patch)
tree1dfeecec0fa0477c1a246ef6567dffc56592d325 /web/viewsjs
parent9cadfd89c12c9223e7c572646680d0bcce57310c (diff)
downloadtaginfo-64a047f622a5ed15dea94b5e52dd8c948fce9e95.tar
taginfo-64a047f622a5ed15dea94b5e52dd8c948fce9e95.tar.gz
Better support for wiki images.
Key and tag wiki pages can contain images. Until now we only got the titles of those images. Now we also get the URL to the image, URL to thumbnails, width, height, and mime type. This information is now exposed in the API and it is used to show the images in the Overview tab of the key and tag pages. While we are changing the update process anyway, I changed the program that gets the list of all pages to also output the time those pages changed last. This information is currently not used, but it could be used to cache those pages locally making the update much faster and adding less strain to the wiki server.
Diffstat (limited to 'web/viewsjs')
-rw-r--r--web/viewsjs/key.js.erb2
-rw-r--r--web/viewsjs/tag.js.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/viewsjs/key.js.erb b/web/viewsjs/key.js.erb
index 8fc4a04..e2bdcd3 100644
--- a/web/viewsjs/key.js.erb
+++ b/web/viewsjs/key.js.erb
@@ -104,7 +104,7 @@ var create_flexigrid_for = {
print_language(row.lang, row.language, row.language_en),
print_wiki_link(row.title),
row.description,
- row.image == '' ? empty('<%= misc.no_image %>') : hover_expand(print_wiki_link(row.image)),
+ row.image.title ? hover_expand(print_wiki_link(row.image.title)) : empty('<%= misc.no_image %>'),
print_type_icon('node', row.on_node) +
print_type_icon('way', row.on_way) +
print_type_icon('area', row.on_area) +
diff --git a/web/viewsjs/tag.js.erb b/web/viewsjs/tag.js.erb
index 88e1e41..c98d7c5 100644
--- a/web/viewsjs/tag.js.erb
+++ b/web/viewsjs/tag.js.erb
@@ -76,7 +76,7 @@ var create_flexigrid_for = {
print_language(row.lang, row.language, row.language_en),
print_wiki_link(row.title),
row.description,
- row.image == '' ? empty('<%= misc.no_image %>') : hover_expand(print_wiki_link(row.image)),
+ row.image.title ? hover_expand(print_wiki_link(row.image.title)) : empty('<%= misc.no_image %>'),
print_type_icon('node', row.on_node) +
print_type_icon('way', row.on_way) +
print_type_icon('area', row.on_area) +