fixes #450
This commit is contained in:
@@ -67,15 +67,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def compact_time(time)
|
||||
if time > Time.now.end_of_day
|
||||
time_tag(time.strftime("%b %e, %Y"), time)
|
||||
elsif time > Time.now.beginning_of_day
|
||||
time_tag(time.strftime("%l:%M %P"), time)
|
||||
elsif time > Time.now.beginning_of_year
|
||||
time_tag(time.strftime("%b %e"), time)
|
||||
else
|
||||
time_tag(time.strftime("%b %e, %Y"), time)
|
||||
end
|
||||
time_tag(time.strftime("%Y-%m-%d %H:%M"), time)
|
||||
end
|
||||
|
||||
def mod_link_to_user(user, positive_or_negative)
|
||||
|
||||
@@ -3,7 +3,7 @@ module PostSets
|
||||
def initialize(params)
|
||||
# don't call super because we don't want to repeat these queries
|
||||
@tag_array = Tag.scan_query(params[:tags])
|
||||
@page = params[:page]
|
||||
@page = params[:page] || 1
|
||||
@posts = ::Post.tag_match(tag_string).has_notes.paginate(page)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="author">
|
||||
<h1><%= link_to comment.creator_name, user_path(comment.creator_id) %></h1>
|
||||
<p>
|
||||
<%= time_ago_in_words_tagged(comment.created_at) %> ago
|
||||
<%= time_ago_in_words_tagged(comment.created_at) %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% cache("news-updates", :expires_in => 1.hour) do %>
|
||||
<div id="news-updates" data-updated-at="<%= NewsUpdate.recent.first.try(:created_at).try(:strftime, "%m/%d/%Y") %>">
|
||||
<div id="news-updates" data-updated-at="<%= NewsUpdate.recent.first.try(:created_at).try(:strftime, "%Y-%m-%d") %>">
|
||||
<ul>
|
||||
<% NewsUpdate.recent.each do |news_update| %>
|
||||
<li><%= news_update.created_at.strftime("%m/%d") %>: <%= news_update.message.html_safe %></li>
|
||||
<li><%= news_update.created_at.strftime("%b %d") %>: <%= news_update.message.html_safe %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to wiki_page_version.updated_at.strftime("%m/%d/%Y %I:%M"), wiki_page_version_path(wiki_page_version) %>
|
||||
<%= link_to wiki_page_version.updated_at.strftime("%Y-%m-%d %I:%M"), wiki_page_version_path(wiki_page_version) %>
|
||||
<% if wiki_page_version.updater %>
|
||||
by
|
||||
<%= link_to wiki_page_version.updater_name, user_path(wiki_page_version.updater) %>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<% @wiki_pages.each do |wiki_page| %>
|
||||
<tr>
|
||||
<td class="tag-category-<%= wiki_page.category_name %>"><%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %></td>
|
||||
<td><%= wiki_page.updated_at.strftime("%m/%d/%Y %I:%M") %> by <%= h link_to wiki_page.creator.name, user_path(wiki_page.creator) %></td>
|
||||
<td><%= wiki_page.updated_at.strftime("%Y-%m-%d %I:%M") %> by <%= h link_to wiki_page.creator.name, user_path(wiki_page.creator) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user