upgraded to jquery 1.5.1, fixed comment voting ajax
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
module PoolsHelper
|
||||
def recent_updated_pools(&block)
|
||||
def recent_updated_pools
|
||||
pool_ids = session[:recent_pool_ids].to_s.scan(/\d+/)
|
||||
Pool.where(["id IN (?)", pool_ids]).each(&block) if pool_ids.any?
|
||||
if pool_ids.any?
|
||||
Pool.where(["id IN (?)", pool_ids])
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<% if @error %>
|
||||
alert(<%= escape_javascript(@error.to_s) %>);
|
||||
alert("<%= escape_javascript(@error.to_s) %>");
|
||||
<% else %>
|
||||
$("#score-for-comment-<%= @comment.id %>").html("<%= pluralize @comment.score, 'point' %>");
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="comments">
|
||||
<div class="index">
|
||||
<div id="c-comments">
|
||||
<div id="a-index">
|
||||
<% @posts.each do |post| %>
|
||||
<div class="post">
|
||||
<div class="preview">
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<article data-comment-id="<%= comment.id %>">
|
||||
<div class="author">
|
||||
<h1><%= link_to comment.creator_name, user_path(comment.creator_id) %></h1>
|
||||
<time datetime="<%= comment.created_at %>">
|
||||
<%= time_ago_in_words(comment.created_at) %> ago
|
||||
</time>
|
||||
<p>
|
||||
<time datetime="<%= comment.created_at %>">
|
||||
<%= time_ago_in_words(comment.created_at) %> ago
|
||||
</time>
|
||||
</p>
|
||||
<p><span class="comment-score" id="score-for-comment-<%= comment.id %>"><%= pluralize comment.score, "point" %></span></p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<%= nav_link_to("My Account", user_path(CurrentUser.user)) %>
|
||||
<% end %>
|
||||
<%= nav_link_to("Posts", posts_path) %>
|
||||
<%= nav_link_to("Comments", comments_path) %>
|
||||
<%= nav_link_to("Comments", comments_path(:group_by => "post")) %>
|
||||
<%= nav_link_to("Notes", notes_path) %>
|
||||
<%= nav_link_to("Artists", artists_path(:order => "date")) %>
|
||||
<%= nav_link_to("Tags", tags_path(:order => "date")) %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div style="margin-bottom: 1em;">
|
||||
<% form_tag({:action => "index"}, :method => :get) do %>
|
||||
<% form_tag(tag_aliases_path, :method => :get) do %>
|
||||
<%= text_field_tag "query", params[:query] %>
|
||||
<%= submit_tag "Search Aliases" %>
|
||||
<%= submit_tag "Search Implications" %>
|
||||
@@ -12,7 +12,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%"></th>
|
||||
<th width="19%">Alias</th>
|
||||
<th width="19%">From</th>
|
||||
<th width="20%">To</th>
|
||||
<th width="60%">Reason</th>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user