diff options
author | Jochen Topf <jochen@topf.org> | 2014-09-06 20:37:13 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-09-06 20:37:13 +0200 |
commit | a841bf2f35bfe477db2458533b8a875cd9cf38e8 (patch) | |
tree | 2ab19aef5c06c65f09d7d5e7406918d6ffc30b9b /web/views/taginfo | |
parent | 95ff801f4829046ca44f949beddb56b066768466 (diff) | |
download | taginfo-a841bf2f35bfe477db2458533b8a875cd9cf38e8.tar taginfo-a841bf2f35bfe477db2458533b8a875cd9cf38e8.tar.gz |
Refactor projects code to work without the Project class.
This way we always get the data dynamically from the database instead of
loading it once at program start. This could allow faster updates in the
future.
Diffstat (limited to 'web/views/taginfo')
-rw-r--r-- | web/views/taginfo/projects.erb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/web/views/taginfo/projects.erb b/web/views/taginfo/projects.erb index dd07ed6..dda4111 100644 --- a/web/views/taginfo/projects.erb +++ b/web/views/taginfo/projects.erb @@ -1,4 +1,4 @@ -<h1 class="section">Projects</h1> +<h1 class="section"><%= h(t.taginfo.projects) %></h1> <table class="list"> <tr> @@ -9,32 +9,32 @@ <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' : '' %> +<% @projects.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=""/> + <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) %> + <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) %> + <%= 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="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> + <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="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> + <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> + <td class="<%= c %> nowrap"><%= h(project['contact_name']) %><br/><%= h(project['contact_email']) %></td> + <td class="<%= c %>"><%= h(project['description']) %></td> </tr> <% end %> </table> |