Commit 43b7cbd0 authored by 神楽坂玲奈's avatar 神楽坂玲奈

不知道改了什么

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@85 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent d03fc03e
class Board < ActiveRecord::Base class Board < ActiveRecord::Base
belongs_to :superboard, :class_name => "::Board" belongs_to :superboard, :class_name => :"::Board"
has_many :subboards, :foreign_key => :superboard_id, :class_name => "::Board" has_many :subboards, :foreign_key => :superboard_id, :class_name => :"::Board"
has_many :topics, :foreign_key => :category_id has_many :topics, :foreign_key => :category_id
has_many :posts, :through =>:topics has_many :posts, :through =>:topics
default_scope order(:displayorder) default_scope order(:displayorder)
......
class Pm < ActiveRecord::Base class Pm < ActiveRecord::Base
belongs_to :user belongs_to :from_user, :class_name => :"::User", :foreign_key => :from_user_id
#belongs_to :from_user, :as => :user, :foreign_key => :from_user_id belongs_to :to_user, :class_name => :"::User", :foreign_key => :to_user_id
end end
...@@ -71,11 +71,11 @@ ...@@ -71,11 +71,11 @@
<label>&nbsp;</label> <label>&nbsp;</label>
<span id="thread_<%= topic.id %>"><%= topic %></span> <span id="thread_<%= topic.id %>"><%= topic %></span>
<%= link_to(t('topic.control.delete'), control_topic_path(topic, :deleted => 1)) if @corrent_user.role.topic_delete %> <%= link_to(t('topic.control.delete'), control_topics_path(topic, :deleted => 1)) if @corrent_user.role.topic_delete %>
<%= link_to(t('topic.control.digest'), control_topic_path(topic, :digest => 1)) if @corrent_user.role.topic_digest > 0 %> <%= link_to(t('topic.control.digest'), control_topics_path(topic, :digest => 1)) if @corrent_user.role.topic_digest > 0 %>
<%= link_to(t('topic.control.displayorder'), control_topic_path(topic, :displayorder => 1)) if @corrent_user.role.topic_displayorder > 0 %> <%= link_to(t('topic.control.displayorder'), control_topics_path(topic, :displayorder => 1)) if @corrent_user.role.topic_displayorder > 0 %>
<%= link_to(t('topic.control.lock'), control_topic_path(topic, :locked => 1)) if @corrent_user.role.topic_lock %> <%= link_to(t('topic.control.lock'), control_topics_path(topic, :locked => 1)) if @corrent_user.role.topic_lock %>
<%= link_to(t('topic.control.highlight'), control_topic_path(topic, :highlight => 0xFF0000)) if @corrent_user.role.topic_highlight %> <%= link_to(t('topic.control.highlight'), control_topics_path(topic, :highlight => 0xFF0000)) if @corrent_user.role.topic_highlight %>
</th> </th>
<td class="author"> <td class="author">
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<span class="pipe">|</span> <span class="pipe">|</span>
<%= link_to t('user.my'), @corrent_user %> <%= link_to t('user.my'), @corrent_user %>
<%= link_to t('user.space'), @corrent_user %> <%= link_to t('user.space'), @corrent_user %>
<%= link_to t('user.notice'), @corrent_user %> <%#= link_to t('user.notice'), @corrent_user %>
<span id="myprompt_check"></span> <span id="myprompt_check"></span>
<%= link_to t('user.pm'), @corrent_user %> <%= link_to t('user.pm'), pms_path %>
<span class="pipe">|</span> <span class="pipe">|</span>
<%= link_to t('user.logout'), logout_path %> <%= link_to t('user.logout'), logout_path %>
......
<h1>Listing pms</h1>
<table>
<tr>
<th>User</th>
<th>User</th>
<th>Content</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @pms.each do |pm| %> <% @pms.each do |pm| %>
<tr> <tr>
<td><%= pm.user %></td> <td><%= pm.user %></td>
......
<h1>New pm</h1> <%= form_for(@pm) do |f| %>
<% if @pm.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@pm.errors.count, "error") %> prohibited this pm from being saved:</h2>
<%= render 'form' %> <ul>
<% @pm.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :user_id %>
<%= f.text_field :user_id %>
</div>
<%= render 'topics/editor_lite', :name => "pm[content]" %>
<% end %>
<%= link_to 'Back', pms_path %> <%= link_to 'Back', pms_path %>
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
</div> </div>
<p><%= image_tag 'common/star_level2.gif', :alt => 'Rank:2' %></p> <p><%= image_tag 'common/star_level2.gif', :alt => 'Rank:2' %></p>
<dl class="profile s_clear"> <dl class="profile s_clear">
<dt><%=t 'user.id' %></dt><dd><%= post.user.id %></dd>
<dt><%=t 'user.post' %></dt><dd><%= post.user.posts.count %></dd> <dt><%=t 'user.post' %></dt><dd><%= post.user.posts.count %></dd>
<dt><%=t 'user.topic' %></dt><dd><%= post.user.topics.count %></dd> <dt><%=t 'user.topic' %></dt><dd><%= post.user.topics.count %></dd>
<dt><%=t 'user.digest' %></dt><dd><%= post.user.topics.where(:digest => true).count %></dd> <dt><%=t 'user.digest' %></dt><dd><%= post.user.topics.where(:digest => true).count %></dd>
......
...@@ -3,6 +3,7 @@ Reliz::Application.routes.draw do ...@@ -3,6 +3,7 @@ Reliz::Application.routes.draw do
root :to => 'boards#index' root :to => 'boards#index'
resources :boards resources :boards
resources :topics resources :topics
get 'topics/control' => "topics#control", :as => :control_topics
resources :posts resources :posts
resources :users do resources :users do
get 'pms' => "pms#index" get 'pms' => "pms#index"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
6068 2852
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment