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
ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer"
#ApplicationHelper::addon_header.push "zh_header"
#ApplicationHelper::addon_top.push "zh_top"
#ApplicationHelper::addon_footer.push "zh_footer"
# GET /boards
# GET /boards.xml
def index
......
class PostsController < ApplicationController
ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer"
#ApplicationHelper::addon_header.push "zh_header"
#ApplicationHelper::addon_top.push "zh_top"
#ApplicationHelper::addon_footer.push "zh_footer"
# GET /posts
# GET /posts.xml
def index
......
class TopicsController < ApplicationController
ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer"
# ApplicationHelper::addon_header.push "zh_header"
# ApplicationHelper::addon_top.push "zh_top"
# 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.xml
def index
......@@ -12,7 +47,7 @@ class TopicsController < ApplicationController
format.xml { render :xml => @topics }
end
end
=end
# GET /topics/1
# GET /topics/1.xml
def show
......@@ -82,7 +117,7 @@ class TopicsController < ApplicationController
end
end
end
=begin
# DELETE /topics/1
# DELETE /topics/1.xml
def destroy
......@@ -94,24 +129,9 @@ class TopicsController < ApplicationController
format.xml { head :ok }
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']
def control
if params['id']
......
class UsersController < ApplicationController
ApplicationHelper::addon_header.push "zh_header"
ApplicationHelper::addon_top.push "zh_top"
ApplicationHelper::addon_footer.push "zh_footer"
#ApplicationHelper::addon_header.push "zh_header"
#ApplicationHelper::addon_top.push "zh_top"
#ApplicationHelper::addon_footer.push "zh_footer"
# GET /users
# GET /users.xml
def index
......
module ApplicationHelper
=begin
@@addon_stylesheet = []
@@addon_javascript = []
@@addon_top = []
......@@ -39,4 +40,5 @@ module ApplicationHelper
def self.addon_footer=(val)
@@addon_footer = val
end
=end
end
\ No newline at end of file
......@@ -2,20 +2,20 @@
<html>
<head>
<title> <%= @site.name %> - <%= @actions.last.respond_to?(:name) ? @actions.last.name : @actions.last %> </title>
<%= render 'layouts/header' %>
<% ApplicationHelper::addon_header.each { |s| %>
<%= render 'layouts/'+s %>
<% } %>
<%#= render 'layouts/header' %>
<%# ApplicationHelper::addon_header.each { |s| %>
<%#= render 'layouts/'+s %>
<%# } %>
</head>
<body>
<%= render 'layouts/top' %>
<% ApplicationHelper::addon_top.each { |s| %>
<%= render 'layouts/'+s %>
<% } %>
<%#= render 'layouts/top' %>
<%# ApplicationHelper::addon_top.each { |s| %>
<%#= render 'layouts/'+s %>
<%# } %>
<%= yield %>
<%= render 'layouts/footer' %>
<% ApplicationHelper::addon_footer.each { |s| %>
<%= render 'layouts/'+s %>
<% } %>
<%#= render 'layouts/footer' %>
<%# ApplicationHelper::addon_footer.each { |s| %>
<%#= render 'layouts/'+s %>
<%# } %>
</body>
</html>
This diff is collapsed.
6100
\ No newline at end of file
4524
\ 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