OSDN Git Service

fix owner
[pettanr/pettanr.git] / app / views / panels / index.html.erb
index 3783fd3..8cd2db6 100644 (file)
@@ -1,28 +1,12 @@
-<h1>Listing panels 最近の投稿</h1>
-<% @panels.each do |panel| %>
-  <div>
-    <%= link_to h(panel.comic.title), panel.comic %>t:<%= panel.t %>
-<div class="panel" style="width:<%= panel.width %>px;height:<%= panel.height %>px;overflow:hidden; border:solid black <%= panel.border %>px; background:white;">
-  <% panel.panel_pictures.each do |panel_picture| %>
-    <div id="vPicture<%= panel_picture.id -%>" class="panel_picture" style="position:relative;  top:<%= panel_picture.y -%>px; left:<%= panel_picture.x -%>px; z-index:<%= panel_picture.z -%>; ">
-      <img style=" position:absolute; width:<%= panel_picture.width -%>px; height:<%= panel_picture.height -%>px; " src="<%= panel_picture.url -%>">
-    </div>
+<% if @items.empty? -%>
+  <h2><%= t('panels.empty') %></h2>
+<% else %>
+  <h2><%= link_to t('panels.filer'), main_app.panels_path(:mode => 'filer', :page => params[:page], :page_size => params[:page_size]) %></h2>
+  <%= paginate(@pager) %>
+  <% @items.each do |panel| %>
+    <%= render 'body', :panel => panel, :operators => @operators, :spot => nil %>
+    <%= render 'panels/footer', :panel => panel, :operators => @operators %>
   <% end %>
-  <% panel.balloons.each do |balloon| %>
-    <div id="vballoon<%= balloon.id -%>" class="balloon" style="position:relative;  top:<%= balloon.y -%>px; left:<%= balloon.x -%>px; z-index:<%= balloon.z -%>; ">
-      <img style=" position:absolute; width:<%= balloon.width -%>px; height:<%= balloon.height -%>px; " src="<%= balloon.system_picture.url -%>">
-      <% balloon.speeches.each do |speech| %>
-        <div style="position:relative; top:<%= speech.y -%>px; left:<%= speech.x -%>px;width:<%= speech.width -%>px; height:<%= speech.height -%>px; top:1px; left:1px; z-index:1; ">
-          <%= h speech.content -%>
-        </div>
-      <% end %>
-    </div>
-  <% end %>
-</div>
-    <%= h panel.author.name %> <%= panel.updated_at %>
-  </div>
+  <%= render 'panels/licensed_pictures', :licensed_pictures => Panel.licensed_pictures(@items) %>
+  <%= paginate(@pager) %>
 <% end %>
-<%= link_to 'open form', new_panel_path, :remote => true %>\r
-  <div id="newpanel">\r
-    uploader\r
-  </div>\r