]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/changeset/list.html.erb
Sanitise parameters used in URL generation
[rails.git] / app / views / changeset / list.html.erb
index 19707cd3f24f7998c0a35087b01695d100c4225f..36ec593793f85f0327edd7d2133748e36f2bcbbc 100644 (file)
@@ -1,32 +1,17 @@
-<% content_for :head do -%>
-  <%= javascript_include_tag "index" %>
-  <%= javascript_include_tag "changeset" %>
-
-  <% unless params[:friends] or params[:nearby] -%>
-    <%= auto_discovery_link_tag :atom, params.merge({ :page => nil, :action => :feed }) %>
-  <% end -%>
+<% if @edits.present? %>
+  <ol class="changesets">
+    <%= render :partial => 'changeset', :collection => @edits %>
+  </ol>
+<% if @edits.size == 20 -%>
+  <div class="changeset_more">
+    <%= link_to t('changeset.list.load_more'), url_for(params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %>
+    <%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %>
+  </div>
 <% end -%>
-
-<% content_for :sidebar do %>
-  <h2><%= @heading %></h2>
-
-  <% if @edits.size > 0 %>
-    <ol class="changesets">
-      <%= render :partial => 'changeset',
-                 :collection => @edits %>
-    </ol>
-
-    <div class="search_more">
-      <div class="inner12 search_results_entry">
-        <%= link_to t('geocoder.results.more_results'), '#', :class => "button" %>
-      </div>
-      <%= image_tag "searching.gif", :class => ["search_searching", "hidden"] %>
-    </div>
-  <% elsif @user and @user.display_name == params[:display_name] %>
-    <h4><%= t('changeset.list.empty_user_html') %></h4>
-  <% else %>
-    <h4><%= t('changeset.list.empty_anon_html') %></h4>
-  <% end %>
+<% elsif params[:bbox] %>
+  <div class="inner22"><%= t(params[:max_id] ? 'changeset.list.no_more_area' : 'changeset.list.empty_area') %></div>
+<% elsif params[:display_name] %>
+  <div class="inner22"><%= t(params[:max_id] ? 'changeset.list.no_more_user' : 'changeset.list.empty_user') %></div>
+<% else %>
+  <div class="inner22"><%= t(params[:max_id] ? 'changeset.list.no_more' : 'changeset.list.empty') %></div>
 <% end %>
-
-<%= render :template => 'layouts/map' %>