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

3-24

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@32 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 278813ae
class BoardsController < ApplicationController class BoardsController < ApplicationController
ApplicationHelper::addon_header.push "zh_header" #ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top" #ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer" #ApplicationHelper::addon_footer.push "zh_footer"
# GET /boards # GET /boards
# GET /boards.xml # GET /boards.xml
def index def index
......
class PostsController < ApplicationController class PostsController < ApplicationController
ApplicationHelper::addon_header.push "zh_header" #ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top" #ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer" #ApplicationHelper::addon_footer.push "zh_footer"
# GET /posts # GET /posts
# GET /posts.xml # GET /posts.xml
def index def index
......
class TopicsController < ApplicationController class TopicsController < ApplicationController
ApplicationHelper::addon_header.push "zh_header" # ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top" # ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer" # ApplicationHelper::addon_footer.push "zh_footer"
=begin
查看主题: GET /topic/1
发表主题:POST /topic/1
编辑主题: PUT /topic/1
主题管理:
删除:/topic/control?id=1&deleted=1
反删除:/topic/control?id=1&deleted=0
置顶 3 /topic/control?id=1&displayorder=3
沉底 /topic/control?id=1&displayorder=-1
恢复正常排序 /topic/control?id=1&displayorder=-1
高亮 /topic/control?id=1&highlight= //TODO
精华 3 /topic/control?id=1&digest=3
取消精华 /topic/control?id=1&digest=0
锁定 /topic/control?id=1&locked=1
打开 /topic/control?id=1&locked=0
移动 /topic/control?id=1&category_id=1
分类 /topic/control?id=1&type_id=1
以上操作可以多重进行
例如把1,2,3号id的主题进行精华3和置顶1
/topic/control?id=1,2,3&digest=3&displayorder=1
=end
=begin
# GET /topics # GET /topics
# GET /topics.xml # GET /topics.xml
def index def index
...@@ -12,7 +47,7 @@ class TopicsController < ApplicationController ...@@ -12,7 +47,7 @@ class TopicsController < ApplicationController
format.xml { render :xml => @topics } format.xml { render :xml => @topics }
end end
end end
=end
# GET /topics/1 # GET /topics/1
# GET /topics/1.xml # GET /topics/1.xml
def show def show
...@@ -82,7 +117,7 @@ class TopicsController < ApplicationController ...@@ -82,7 +117,7 @@ class TopicsController < ApplicationController
end end
end end
end end
=begin
# DELETE /topics/1 # DELETE /topics/1
# DELETE /topics/1.xml # DELETE /topics/1.xml
def destroy def destroy
...@@ -94,24 +129,9 @@ class TopicsController < ApplicationController ...@@ -94,24 +129,9 @@ class TopicsController < ApplicationController
format.xml { head :ok } format.xml { head :ok }
end end
end end
=end
#主题管理:
#删除:/topic/control?id=1&deleted=1
#反删除:/topic/control?id=1&deleted=0
#置顶 3 /topic/control?id=1&displayorder=3
#沉底 /topic/control?id=1&displayorder=-1
#恢复正常排序 /topic/control?id=1&displayorder=-1
#高亮 /topic/control?id=1&highlight= //TODO
#精华 3 /topic/control?id=1&digest=3
#取消精华 /topic/control?id=1&digest=0
#锁定 /topic/control?id=1&locked=1
#打开 /topic/control?id=1&locked=0
#移动 /topic/control?id=1&category_id=1
#分类 /topic/control?id=1&type_id=1
#以上操作可以多重进行
#例如把1,2,3号id的主题进行精华3和置顶1
#/topic/control?id=1,2,3&digest=3&displayorder=1
Data_Control = ['deleted', 'displayorder', 'highlight', 'digest', 'locked', 'category_id', 'type_id'] Data_Control = ['deleted', 'displayorder', 'highlight', 'digest', 'locked', 'category_id', 'type_id']
def control def control
if params['id'] if params['id']
......
class UsersController < ApplicationController class UsersController < ApplicationController
ApplicationHelper::addon_header.push "zh_header" #ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top" #ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer" #ApplicationHelper::addon_footer.push "zh_footer"
# GET /users # GET /users
# GET /users.xml # GET /users.xml
def index def index
......
module ApplicationHelper module ApplicationHelper
=begin
@@addon_stylesheet = [] @@addon_stylesheet = []
@@addon_javascript = [] @@addon_javascript = []
@@addon_top = [] @@addon_top = []
...@@ -39,4 +40,5 @@ module ApplicationHelper ...@@ -39,4 +40,5 @@ module ApplicationHelper
def self.addon_footer=(val) def self.addon_footer=(val)
@@addon_footer = val @@addon_footer = val
end end
end =end
end
\ No newline at end of file
...@@ -2,20 +2,20 @@ ...@@ -2,20 +2,20 @@
<html> <html>
<head> <head>
<title> <%= @site.name %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> </title> <title> <%= @site.name %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> </title>
<%= render 'layouts/header' %> <%#= render 'layouts/header' %>
<% ApplicationHelper::addon_header.each { |s| %> <%# ApplicationHelper::addon_header.each { |s| %>
<%= render 'layouts/'+s %> <%#= render 'layouts/'+s %>
<% } %> <%# } %>
</head> </head>
<body> <body>
<%= render 'layouts/top' %> <%#= render 'layouts/top' %>
<% ApplicationHelper::addon_top.each { |s| %> <%# ApplicationHelper::addon_top.each { |s| %>
<%= render 'layouts/'+s %> <%#= render 'layouts/'+s %>
<% } %> <%# } %>
<%= yield %> <%= yield %>
<%= render 'layouts/footer' %> <%#= render 'layouts/footer' %>
<% ApplicationHelper::addon_footer.each { |s| %> <%# ApplicationHelper::addon_footer.each { |s| %>
<%= render 'layouts/'+s %> <%#= render 'layouts/'+s %>
<% } %> <%# } %>
</body> </body>
</html> </html>
This diff is collapsed.
6100 4524
\ 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