fixes #306
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class ModActionsController < ApplicationController
|
||||
def index
|
||||
@mod_actions = ModAction.search(params[:search]).paginate(params[:page])
|
||||
@mod_actions = ModAction.search(params[:search]).order("id desc").paginate(params[:page])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -75,6 +75,7 @@ class DText
|
||||
str = str.gsub(/\bforum #(\d+)/i, %{<a href="/forum_posts/\\1">forum #\\1</a>})
|
||||
str = str.gsub(/\bcomment #(\d+)/i, %{<a href="/comments/\\1">comment #\\1</a>})
|
||||
str = str.gsub(/\bpool #(\d+)/i, %{<a href="/pools/\\1">pool #\\1</a>})
|
||||
str = str.gsub(/\buser #(\d+)/i, %{<a href="/users/\\1">user #\\1</a>})
|
||||
end
|
||||
|
||||
def self.parse_list(str, options = {})
|
||||
|
||||
@@ -63,6 +63,7 @@ class User < ActiveRecord::Base
|
||||
module InvitationMethods
|
||||
def invite!(level)
|
||||
if level.to_i <= Levels::CONTRIBUTOR
|
||||
ModAction.create(:description => "invited user ##{id} (#{name})")
|
||||
self.level = level
|
||||
self.inviter_id = CurrentUser.id
|
||||
save
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div id="c-mod-actions">
|
||||
<div id="a-index">
|
||||
<h1>Mod Actions</h1>
|
||||
<table class="striped">
|
||||
<table class="striped" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
@@ -12,7 +12,7 @@
|
||||
<tbody>
|
||||
<% @mod_actions.each do |mod_action| %>
|
||||
<tr>
|
||||
<td><%= mod_action.created_at %></td>
|
||||
<td><%= compact_time mod_action.created_at %></td>
|
||||
<td><%= link_to mod_action.creator.name, user_path(mod_action.creator) %></td>
|
||||
<td><%= format_text(mod_action.description) %></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user