summaryrefslogtreecommitdiff
path: root/web/views
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/views
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/views')
-rw-r--r--web/views/key.erb5
-rw-r--r--web/views/tag.erb5
2 files changed, 10 insertions, 0 deletions
diff --git a/web/views/key.erb b/web/views/key.erb
index 14f952a..c51af26 100644
--- a/web/views/key.erb
+++ b/web/views/key.erb
@@ -33,6 +33,11 @@
<p><%= t.pages.key.overview.distribution_of_values %></p>
<div class="canvas" id="canvas-values"></div>
</div>
+<% if @image_url %>
+ <div style="float: right; padding: 0 20px 20px 20px;">
+ <img src="<%= @image_url %>" style="border: 1px solid #a0a0a0; border-radius: 4px; padding: 1px;" alt=""/>
+ </div>
+<% end %>
<h2><%= t.taginfo.overview %></h2>
<table id="grid-overview">
</table>
diff --git a/web/views/tag.erb b/web/views/tag.erb
index 70ebd8c..243954d 100644
--- a/web/views/tag.erb
+++ b/web/views/tag.erb
@@ -28,6 +28,11 @@
</ul>
<div id="overview">
<h2><%= t.taginfo.overview %></h2>
+<% if @image_url %>
+ <div style="float: right;">
+ <img src="<%= @image_url %>" style="border: 1px solid #a0a0a0; border-radius: 4px; padding: 1px;" alt=""/>
+ </div>
+<% end %>
<table id="grid-overview">
</table>
</div>