Commit eb0a54a4 authored by 神楽坂玲奈's avatar 神楽坂玲奈

主题管理前台初步

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@34 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 7b1b2ee3
......@@ -70,6 +70,12 @@
<label>&nbsp;</label>
<span id="thread_<%= topic.id %>"><%= topic %></span>
<a href="/topic/control?id=<%= topic.id %>&deleted=1">删除</a>
<a href="/topic/control?id=<%= topic.id %>&displayorder=1">置顶</a>
<a href="/topic/control?id=<%= topic.id %>&digest=1">精华</a>
<a href="/topic/control?id=<%= topic.id %>&locked=1">锁定</a>
</th>
<td class="author">
<cite>
......
class CreateTopics < ActiveRecord::Migration
def self.up
create_table :topics do |t|
t.references :user
t.references :user, :null => false
t.references :type
t.references :category, :polymorphic => true
t.string :name
t.integer :displayorder
t.integer :views
t.integer :readperm
t.boolean :locked
t.boolean :deleted
t.boolean :reverse
t.boolean :private
t.references :category, :polymorphic => true, :null => false
t.string :name, :null => false
t.integer :displayorder, :default => 0, :null => false
t.integer :views, :default => 0, :null => false
t.integer :readperm, :default => 1, :null => false
t.boolean :locked, :default => false, :null => false
t.boolean :deleted, :default => false, :null => false
t.boolean :reverse, :default => false, :null => false
t.boolean :private, :default => false, :null => false
t.timestamps
......
......@@ -76,17 +76,18 @@ ActiveRecord::Schema.define(:version => 20101226125042) do
end
create_table "topics", :force => true do |t|
t.integer "user_id"
t.integer "user_id", :null => false
t.integer "type_id"
t.integer "category_id"
t.string "category_type"
t.string "name"
t.integer "displayorder"
t.integer "views"
t.integer "readperm"
t.boolean "locked"
t.boolean "reverse"
t.boolean "private"
t.integer "category_id", :null => false
t.string "category_type", :default => "", :null => false
t.string "name", :default => "", :null => false
t.integer "displayorder", :default => 0, :null => false
t.integer "views", :default => 0, :null => false
t.integer "readperm", :default => 1, :null => false
t.boolean "locked", :default => false, :null => false
t.boolean "deleted", :default => false, :null => false
t.boolean "reverse", :default => false, :null => false
t.boolean "private", :default => false, :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
......
This diff is collapsed.
5552
\ No newline at end of file
7788
\ 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