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