post index noe works

This commit is contained in:
albert
2011-06-24 18:22:54 -04:00
parent 9ac7f85f0b
commit 1ad075c05a
17 changed files with 91 additions and 136 deletions

View File

@@ -48,13 +48,13 @@
</nav>
</header>
<%- if flash[:notice] -%>
<div class="ui-corner-all ui-state-highlight" id="notice"><span class="ui-icon ui-icon-info"></span> <%= flash[:notice] %></div>
<%- else -%>
<div class="ui-corner-all ui-state-highlight" id="notice" style="display: none;"><span class="ui-icon ui-icon-info"></span></div>
<%- end -%>
<div id="page">
<%- if flash[:notice] -%>
<div class="ui-corner-all ui-state-highlight" id="notice"><span class="ui-icon ui-icon-info"></span> <%= flash[:notice] %></div>
<%- else -%>
<div class="ui-corner-all ui-state-highlight" id="notice" style="display: none;"><span class="ui-icon ui-icon-info"></span></div>
<%- end -%>
<%= yield :layout %>
</div>

View File

@@ -0,0 +1,3 @@
<p>Nobody here but us chickens!</p>
<p><%= link_to "Go back", :back %>.</p>

View File

@@ -34,7 +34,7 @@
</section>
<% content_for(:page_title) do %>
/<%= @post_set.tags.join(" ") %>
/<%= @post_set.tag_string %>
<% end %>
<%= render :partial => "posts/partials/common/secondary_links" %>

View File

@@ -1,11 +1,11 @@
<h1>Posts</h1>
<%= post_set.presenter.post_previews_html %>
<%= post_set.presenter.post_previews_html(self) %>
<div class="clearfix"></div>
<div class="paginator">
<%= smart_paginator(post_set.posts) do |page| %>
<%= link_to(page, posts_path(:page => page, :tags => post_set.tags)) %>
<%= numbered_paginator(post_set.posts) do |page| %>
<%= link_to(page, posts_path(:page => page, :tags => post_set.tag_string)) %>
<% end %>
</div>

View File

@@ -1,24 +1,32 @@
<table width="100%">
<thead>
<tr>
<th></th>
<th>Uploader</th>
<th>Status</th>
<th>Date</th>
<th>Tags</th>
</tr>
</thead>
<tbody>
<% @uploads.each do |upload| %>
<tr>
<td><%= link_to upload.id, upload_path(upload) %></td>
<td><%= link_to upload.uploader.name, user_path(upload.uploader) %></td>
<td><%= upload.presenter.status(self) %></td>
<td><%= upload.created_at %></td>
<td><%= upload.tag_string %></td>
</tr>
<% end %>
</tbody>
</table>
<div id="c-uploads">
<div id="a-index">
<table width="100%">
<thead>
<tr>
<th></th>
<th>Uploader</th>
<th>Status</th>
<th>Date</th>
<th>Tags</th>
</tr>
</thead>
<tbody>
<% @uploads.each do |upload| %>
<tr>
<td><%= link_to upload.id, upload_path(upload) %></td>
<td><%= link_to upload.uploader.name, user_path(upload.uploader) %></td>
<td><%= upload.presenter.status(self) %></td>
<td><%= upload.created_at %></td>
<td><%= upload.tag_string %></td>
</tr>
<% end %>
</tbody>
</table>
<div class="paginator">
<%= sequential_paginator(@uploads) %>
</div>
</div>
</div>
<%= render :partial => "posts/partials/common/secondary_links" %>

View File

@@ -16,7 +16,7 @@
<p>
You can <%= link_to "upload another file", new_upload_path %> or <%= link_to "view your current uploads", uploads_path %>.
<% if CurrentUser.user.is_moderator? %>
<% if CurrentUser.user.is_moderator? && @upload.is_pending? %>
<%= link_to "Force update", upload_path(@upload, :format => "js"), :remote => true, :method => :put %>.
<% end %>
</p>