source: subversion/sites/rails_port/app/views/browse/_changeset_details.html.erb @ 20172

Revision 20172, 3.4 KB checked in by tomhughes, 4 years ago (diff)

Add some strategic rel="nofollow" attributes to the data browser pages
to control what search engines will explore.

Line 
1<table>
2
3  <tr>
4    <th><%= t 'browse.changeset_details.created_at' %></th>
5    <td><%= l changeset_details.created_at %></td>
6  </tr>
7 
8  <tr>
9    <th><%= t 'browse.changeset_details.closed_at' %></th>
10    <td><%= l changeset_details.closed_at %></td>
11  </tr>
12 
13  <% if changeset_details.user.data_public? %>
14    <tr>
15      <th><%= t 'browse.changeset_details.belongs_to' %></th>
16      <td><%= link_to h(changeset_details.user.display_name), :controller => "user", :action => "view", :display_name => changeset_details.user.display_name %></td>
17    </tr>
18  <% end %>
19 
20  <%= render :partial => "tag_details", :object => changeset_details %>
21
22  <tr>
23    <th><%= t 'browse.changeset_details.bounding_box' %></th>
24    <% unless changeset_details.has_valid_bbox? %>
25      <td><%= t 'browse.changeset_details.no_bounding_box' %></td>
26    <% else
27          minlon = changeset_details.min_lon/GeoRecord::SCALE.to_f
28          minlat = changeset_details.min_lat/GeoRecord::SCALE.to_f
29          maxlon = changeset_details.max_lon/GeoRecord::SCALE.to_f
30          maxlat = changeset_details.max_lat/GeoRecord::SCALE.to_f
31    %>
32      <td>
33        <table>
34          <tr>
35            <td colspan="3" style="text-align:center"><%=maxlat -%></td>
36          </tr>
37          <tr>
38            <td><%=minlon -%></td>
39            <td>(<a href='/?minlon=<%= minlon %>&minlat=<%= minlat %>&maxlon=<%= maxlon %>&maxlat=<%= maxlat %>&box=yes' title='<%= t 'browse.changeset_details.show_area_box' %>' rel='nofollow'><%= t 'browse.changeset_details.box' %></a>)</td>
40            <td><%=maxlon -%></td>
41          </tr>
42          <tr>
43            <td colspan="3" style="text-align:center"><%= minlat -%></td>
44          </tr>
45        </table>
46      </td>
47    <% end %>
48  </tr>
49
50  <% unless @nodes.empty? %>
51    <tr valign="top">
52      <th><%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %></th>
53      <td>
54        <table cellpadding="0">
55          <% @nodes.each do |node| %>
56            <tr><td><%= link_to h(printable_name(node, true)), :action => "node", :id => node.id.to_s %></td></tr>
57          <% end %>
58        </table>
59      </td>
60    </tr>
61    <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
62  <% end %>
63 
64  <% unless @ways.empty? %>
65    <tr valign="top">
66      <th><%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %></th>
67      <td>
68        <table cellpadding="0">
69          <% @ways.each do |way| %>
70          <tr><td><%= link_to h(printable_name(way, true)), :action => "way", :id => way.id.to_s %></td></tr>
71          <% end %>
72          <%=
73          #render :partial => "containing_relation", :collection => changeset_details.containing_relation_members
74          %>
75        </table>
76      </td>
77    </tr>
78    <%= render :partial => 'paging_nav', :locals => { :pages => @way_pages, :page_param => "way_page" } %>
79  <% end %>
80 
81  <% unless @relations.empty? %>
82    <tr valign="top">
83      <th><%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %></th>
84      <td>
85        <table cellpadding="0">
86          <% @relations.each do |relation| %>
87          <tr><td><%= link_to h(printable_name(relation, true)), :action => "relation", :id => relation.id.to_s %></td></tr>
88          <% end %>
89        </table>
90      </td>
91    </tr>
92    <%= render :partial => 'paging_nav', :locals => { :pages => @relation_pages, :page_param => "relation_page" } %>
93  <% end %>
94
95</table>
Note: See TracBrowser for help on using the repository browser.