Commit 7ba1b251 authored by 神楽坂玲奈's avatar 神楽坂玲奈

临时

parent c0f9d7d2
......@@ -61,6 +61,7 @@ border-color:rgba(0, 0, 0, 0.2);
display:block;
font:25px bold 'Nunito',sans-serif;
float:left;
font-size:24px;
}
.nav_link{
......@@ -88,13 +89,16 @@ border-color:#e1e1e1;
width:900px;
margin:0 auto;
padding:30px 0 0 0;
height:280px;
}
#information{
width:390px;
float:left;
}
.title{
font:45px bold 'Nunito',sans-serif;
font-size:45px ;
font-weight:bold;
font-family:'Nunito',sans-serif;
}
.subtitle{
font:30px "\5FAE\8F6F\96C5\9ED1";
......@@ -137,26 +141,28 @@ z-index:0;
clear:both;
display:block;
float:right;
top:-212px;
*top:0;
}
.show1{
width:500px;
height:275px;
background:image-url("index/01.png");
margin:-215px 0 0 -10px;
border-radius:10px;
}
.show2{
width:500px;
height:275px;
background:image-url("index/02.png");
margin:-215px 0 0 -10px;
border-radius:10px;
}
.show3{
width:500px;
height:275px;
background:image-url("index/03.png");
margin:-210px 0 0 -10px;
border-radius:10px;
}
footer{
......
......@@ -59,13 +59,13 @@ class PostsController < ApplicationController
end
@post.user = @current_user
@post.displayorder = @post.topic.floor
@post.attachments.build
@actions = [@post, "发表回复"]
respond_to do |format|
if @post.save
format.html { redirect_to(@post.topic, :notice => 'Post was successfully created.') }
format.xml { render :xml => @post, :status => :created, :location => @post.topic }
else
@post.attachments.build
format.html { render :action => "new" }
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
end
......@@ -76,13 +76,13 @@ class PostsController < ApplicationController
# PUT /posts/1.xml
def update
@post = Post.find(params[:id])
@post.attachments.build
@actions = [@post, "编辑帖子"]
respond_to do |format|
if @post.update_attributes(params[:post])
format.html { redirect_to(@post.topic, :notice => 'Post was successfully updated.') }
format.xml { head :ok }
else
@post.attachments.build
format.html { render :action => "edit" }
format.xml { render :xml => @post.errors, :status => :unprocessable_entity }
end
......
......@@ -98,6 +98,8 @@ class TopicsController < ApplicationController
format.xml { render :xml => @topic, :status => :created, :location => @topic }
else
@topic.errors[:base] << ("验证码错误") if params[:captcha] != session[:captcha]
@post = @topic.posts.first
@post.attachments.build
format.html { render :action => "new" }
format.xml { render :xml => @topic.errors, :status => :unprocessable_entity }
end
......@@ -108,14 +110,14 @@ class TopicsController < ApplicationController
# PUT /topics/1.xml
def update
@topic = Topic.find(params[:id])
@post = @topic.posts.first
@post.attachments.build
@actions = [@topic.category, @topic, "编辑"]
respond_to do |format|
if @topic.update_attributes(params[:topic])
format.html { redirect_to(@topic, :notice => 'Topic was successfully updated.') }
format.xml { head :ok }
else
@post = @topic.posts.first
@post.attachments.build
format.html { render :action => "edit" }
format.xml { render :xml => @topic.errors, :status => :unprocessable_entity }
end
......
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