diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 5b1fcc8e2..6f6920889 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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) diff --git a/app/logical/post_sets/note.rb b/app/logical/post_sets/note.rb index c2217184c..7c4dd97ff 100644 --- a/app/logical/post_sets/note.rb +++ b/app/logical/post_sets/note.rb @@ -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 diff --git a/app/views/comments/partials/show/_comment.html.erb b/app/views/comments/partials/show/_comment.html.erb index 249a78bed..69f1bab1e 100644 --- a/app/views/comments/partials/show/_comment.html.erb +++ b/app/views/comments/partials/show/_comment.html.erb @@ -2,7 +2,7 @@

<%= link_to comment.creator_name, user_path(comment.creator_id) %>

- <%= time_ago_in_words_tagged(comment.created_at) %> ago + <%= time_ago_in_words_tagged(comment.created_at) %>

diff --git a/app/views/news_updates/_listing.html.erb b/app/views/news_updates/_listing.html.erb index 9f995ea05..bad60cfdf 100644 --- a/app/views/news_updates/_listing.html.erb +++ b/app/views/news_updates/_listing.html.erb @@ -1,8 +1,8 @@ <% cache("news-updates", :expires_in => 1.hour) do %> -
"> +
">
    <% NewsUpdate.recent.each do |news_update| %> -
  • <%= news_update.created_at.strftime("%m/%d") %>: <%= news_update.message.html_safe %>
  • +
  • <%= news_update.created_at.strftime("%b %d") %>: <%= news_update.message.html_safe %>
  • <% end %>
diff --git a/app/views/wiki_page_versions/index.html.erb b/app/views/wiki_page_versions/index.html.erb index 6cee591af..c51dc95fe 100644 --- a/app/views/wiki_page_versions/index.html.erb +++ b/app/views/wiki_page_versions/index.html.erb @@ -23,7 +23,7 @@ <% end %> - <%= 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) %> diff --git a/app/views/wiki_pages/index.html.erb b/app/views/wiki_pages/index.html.erb index d8e343da1..49d780503 100644 --- a/app/views/wiki_pages/index.html.erb +++ b/app/views/wiki_pages/index.html.erb @@ -16,7 +16,7 @@ <% @wiki_pages.each do |wiki_page| %> <%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %> - <%= wiki_page.updated_at.strftime("%m/%d/%Y %I:%M") %> by <%= h link_to wiki_page.creator.name, user_path(wiki_page.creator) %> + <%= wiki_page.updated_at.strftime("%Y-%m-%d %I:%M") %> by <%= h link_to wiki_page.creator.name, user_path(wiki_page.creator) %> <% end %>