aboutsummaryrefslogtreecommitdiff
path: root/web/views
diff options
context:
space:
mode:
Diffstat (limited to 'web/views')
-rw-r--r--web/views/key.erb6
-rw-r--r--web/views/project.erb46
-rw-r--r--web/views/projects.erb8
-rw-r--r--web/views/tag.erb6
-rw-r--r--web/views/taginfo/index.erb1
-rw-r--r--web/views/taginfo/projects.erb40
6 files changed, 107 insertions, 0 deletions
diff --git a/web/views/key.erb b/web/views/key.erb
index 7e51f31..91c79fa 100644
--- a/web/views/key.erb
+++ b/web/views/key.erb
@@ -41,6 +41,7 @@
<li><a href="#map"><%= h(t.taginfo.map) %></a></li>
<li><a href="#wiki"><%= h(t.sources.wiki.name) %></a></li>
<li><a href="#josm"><%= h(t.sources.josm.name) %></a></li>
+ <li><a href="#projects"><%= h(t.taginfo.projects) %></a></li>
</ul>
<div id="overview">
<div style="float: right; text-align: center; padding-left: 20px;">
@@ -116,6 +117,11 @@
<p class="empty"><%= h(t.pages.key.josm.no_styles) %></p>
<% end %>
</div>
+ <div id="projects">
+ <h2><%= h(t.pages.key.projects.title) %></h2>
+ <table id="grid-projects">
+ </table>
+ </div>
</div>
<iframe id="josmiframe" name="josmiframe"></iframe>
<% javascript do
diff --git a/web/views/project.erb b/web/views/project.erb
new file mode 100644
index 0000000..0b7dea4
--- /dev/null
+++ b/web/views/project.erb
@@ -0,0 +1,46 @@
+<div class="pre">
+ <h1><%= h(@project.name) %></h1>
+ <p><%= h(@project.description) %></p>
+</div>
+<div id="tabs">
+ <ul class="no-print">
+ <li><a href="#overview"><%= h(t.taginfo.overview) %></a></li>
+ <li><a href="#tags"><%= h(t.osm.tags) %></a></li>
+ </ul>
+ <div id="overview">
+ <table class="desc">
+ <tr><th><%= h(t.pages.project.overview.project_name) %>:</th><td><%= h(@project.name) %></td></tr>
+ <tr><th><%= h(t.pages.project.overview.project_url) %>:</th><td id="project_url"></td></tr>
+ <tr><th><%= h(t.pages.project.overview.description) %>:</th><td><%= h(@project.description) %></td></tr>
+<% if @project.doc_url %>
+ <tr><th><%= h(t.pages.project.overview.documentation_url) %>:</th><td id="doc_url"></td></tr>
+<% end %>
+ <tr><th><%= h(t.pages.project.overview.last_update) %>:</th><td><%= h(@project.data_updated) %></td></tr>
+ </table>
+ </div>
+ <div id="tags">
+ <h2><%= h(t.pages.project.tags.title) %></h2>
+ <p><%= h(t.pages.project.tags.intro) %></p>
+ <table id="grid-tags">
+ </table>
+ </div>
+</div>
+<% javascript do
+ JS.raw(<<"JAVASCRIPT")
+function page_init2() {
+ var project = #{ @project_id.to_json },
+ project_url = #{ @project.project_url.to_json },
+ doc_url = #{ @project.doc_url.to_json };
+
+ if (project_url) {
+ jQuery('#project_url').html(link_to_url(project_url));
+ }
+ if (doc_url) {
+ jQuery('#doc_url').html(link_to_url(doc_url));
+ }
+
+ init_tabs([project]);
+}
+JAVASCRIPT
+end
+%>
diff --git a/web/views/projects.erb b/web/views/projects.erb
new file mode 100644
index 0000000..ec95947
--- /dev/null
+++ b/web/views/projects.erb
@@ -0,0 +1,8 @@
+<div class="pre">
+ <h1 class="section"><%= h(t.taginfo.projects) %></h1>
+ <p><%= h(t.pages.projects.intro) %></p>
+</div>
+<div class="box resize">
+ <table id="grid-projects">
+ </table>
+</div>
diff --git a/web/views/tag.erb b/web/views/tag.erb
index 1ae5274..de9453c 100644
--- a/web/views/tag.erb
+++ b/web/views/tag.erb
@@ -40,6 +40,7 @@
<li><a href="#map"><%= h(t.taginfo.map) %></a></li>
<li><a href="#wiki"><%= h(t.sources.wiki.name) %></a></li>
<li><a href="#josm"><%= h(t.sources.josm.name) %></a></li>
+ <li><a href="#projects"><%= h(t.taginfo.projects) %></a></li>
</ul>
<div id="overview">
<% if @image_url %>
@@ -113,6 +114,11 @@
<p class="empty"><%= h(t.pages.key.josm.no_styles) %></p>
<% end %>
</div>
+ <div id="projects">
+ <h2><%= h(t.pages.tag.projects.title) %></h2>
+ <table id="grid-projects">
+ </table>
+ </div>
</div>
<iframe id="josmiframe" name="josmiframe"></iframe>
<% javascript do
diff --git a/web/views/taginfo/index.erb b/web/views/taginfo/index.erb
index 81d3862..3139642 100644
--- a/web/views/taginfo/index.erb
+++ b/web/views/taginfo/index.erb
@@ -9,6 +9,7 @@
<li><a href="/taginfo/translations">Translations Overview</a></li>
<li><a href="/taginfo/i18n">Translated Texts</a></li>
<li><a href="/taginfo/config">Configuration</a></li>
+ <li><a href="/taginfo/projects">Projects</a></li>
</ul>
<h2>Software Version</h2>
<p><%= @commit %></p>
diff --git a/web/views/taginfo/projects.erb b/web/views/taginfo/projects.erb
new file mode 100644
index 0000000..dd07ed6
--- /dev/null
+++ b/web/views/taginfo/projects.erb
@@ -0,0 +1,40 @@
+<h1 class="section">Projects</h1>
+
+<table class="list">
+ <tr>
+ <th>Icon</th>
+ <th>Project ID<br/>Project Name</th>
+ <th>Fetch Date<br/>Updated</th><th>Code</th><th>Res</th>
+ <th>JSON URL<br/>Data URL</th><th>Fmt<br/>Vers</th>
+ <th>Project URL<br/>Doc URL</th><th>Contact</th>
+ <th>Description</th>
+ </tr>
+<% Project.each_with_index do |project, n| c = (n%2!=0) ? ' even' : '' %>
+ <tr>
+ <td class="tc<%= c %> nowrap">
+ <img src="<%= h(project.icon_url) %>" width="16" height="16" alt=""/>
+ </td>
+ <td class="<%= c %> nowrap">
+ <a href="/projects/<%= h(project.id) %>"><%= h(project.id) %></a><br/>
+ <%= h(project.name) %>
+ </td>
+ <td class="<%= c %> nowrap">
+ <%= h(project.fetch_date) %><br/>
+ <%= h(project.data_updated) %>
+ </td>
+ <td class="tc<%= c %> nowrap"><%= h(project.fetch_status) %></td>
+ <td class="tc<%= c %> nowrap"><%= h(project.fetch_result) %></td>
+ <td class="<%= c %> nowrap">
+ <a href="<%= h(project.json_url) %>"><%= h(project.json_url) %></a><br/>
+ <a href="<%= h(project.data_url) %>"><%= h(project.data_url) %></a>
+ </td>
+ <td class="tc<%= c %> nowrap"><%= h(project.data_format) %></td>
+ <td class="<%= c %> nowrap">
+ <a href="<%= h(project.project_url) %>"><%= h(project.project_url) %></a><br/>
+ <a href="<%= h(project.doc_url) %>"><%= h(project.doc_url) %></a>
+ </td>
+ <td class="<%= c %> nowrap"><%= h(project.contact_name) %><br/><%= h(project.contact_email) %></td>
+ <td class="<%= c %>"><%= h(project.description) %></td>
+ </tr>
+<% end %>
+</table>