Permalink
Browse files

blackboard

  • Loading branch information...
1 parent c6ec453 commit 9b415934a497818a43ce2f4b1a7a7e24771767a7 root.panserver committed Dec 16, 2011
@@ -44,6 +44,14 @@ def edit
# PUT /resource
def update
+ param = params[resource_name]
+ unless param[:password].blank?
+ if param[:password]!=param[:password_confirmation]
+ flash[:alert]='密码与确认密码不符'
+ render_with_scope :edit
+ return
+ end
+ end
if resource.update_attributes(params[resource_name])
set_flash_message :notice, :updated
sign_in resource_name, resource, :bypass => true
@@ -4,7 +4,7 @@ class BaseMailer < ActionMailer::Base
#the following line is critical for the assyncronous sending of mails
#with this line, mails are sent through Resque, which can be inspected via /cpanel/resque
#without, the mails are sended directly, with the risk of hindering the request and errors.
- include Resque::Mailer
+# include Resque::Mailer
default :from => Setting.email_sender
helper :application,:users,:asks
layout "mailer"
@@ -229,6 +229,45 @@
<a rel="nofollow" href="<%= share_ask_path(@ask.id) %>?type=email"><span class="has_icon email">Email</span></a>
<a rel="nofollow" href="<%= share_ask_path(@ask.id) %>?type=url"><span class="has_icon url">转发地址</span></a>
</div> <div id="share_ask_box3" class="box standard">
+
+
+
+<%@topic = Topic.where(name:@ask.jigou).first%>
+ <script type="text/javascript">
+ function sendFeed() {
+ var uiOpts = {
+ url : "feed",
+ display : "popup",
+ params : {
+ "url":"http://www.yourdomain.com/feed.html",
+ "name":"<%= raw @page_title %><%= Setting.app_name %>",
+ "description":'去考考点评看看吧\nhttp://www.kaokaodianping.com<%=request.path%>',
+ "image":'<%=(@topic.blank? or @topic.cover.blank?) ? "http://www.kaokaodianping.com/images/logo.png" : "http://kkdp.net/"+@topic.cover.normal.url%>',
+ "action_name": "考考点评",
+ "action_link": 'http://www.kaokaodianping.com<%=request.path%>'
+ },onSuccess : function(response){
+ if(window.console)
+ console.log("success: "+JSON.encode(response));
+ if(response.access_token){
+ accessToken = response.access_token;
+ alert("access token: " + accessToken);
+ }
+ },
+ onFailure : function(response){
+ if(window.console)
+ console.log("failure: " + response.error + ',' + response.error_description);
+ }
+ };
+ Renren.ui(uiOpts);
+ }
+ </script>
+<% content_for :butt2 do%>
+Renren.init({appId:172741});
+<% end %>
+
+
+
+
<a href="javascript:sendFeed();">
<%=image_tag 'renren.png'%>
</a>
@@ -10,6 +10,7 @@
<% end %>
<%= render 'sidebar' %>
+
<div id="shouye_chang">
<div class="box">
<% if !@node.blank? %>
@@ -20,7 +21,28 @@
</p>
</div>
<% else %>
- <h1><%= image_tag('kaokaodianpingbbs.png') %></h1>
+ <%=image_tag 'bbsblackboard.png',style:'position:absolute;top:12px;left:16px'%>
+ <div id="sections" style="position:absolute;top:93px;line-height:29px;left:50px;width:545px;color:yellow">
+≡互助区≡
+<a title="【出国交流】" href="/bbs/n4edb0d079bd4bf14c1000013">【出国交流】</a>
+<a title="【英语学习】" href="/bbs/n4edb0d3b9bd4bf14c1000015">【英语学习】</a>
+<a title="【考研互助】" href="/bbs/n4edb0d529bd4bf14c1000017">【考研互助】</a>
+<a title="【驾校攻略】" href="/bbs/n4edb0d9e9bd4bf14c1000019">【驾校攻略】</a>
+<a title="【会计证区】" href="/bbs/n4edb0e619bd4bf14c100001c">【会计证区】</a>
+<br>
+≡事务区≡
+<a title="【新手成长】" href="/bbs/n4edada929bd4bf129800000f">【新手成长】</a>
+<a title="【活动公告】" href="/bbs/n4edb0c9e9bd4bf14c100000b">【活动公告】</a>
+<a title="【广告专版】" href="/bbs/n4edb0cd19bd4bf14c100000f">【广告专版】</a>
+<a title="【意见反馈】" href="/bbs/n4ee81b69e138233980000010">【意见反馈】</a>
+<a title="【版主会议室】" href="/bbs/n4edb0e919bd4bf14c1000020">【版主会议室】</a>
+<br>
+≡娱乐区≡
+<a title="【休闲灌水】" href="/bbs/n4edb0e759bd4bf14c100001e">【休闲灌水】</a>
+<a title="【贴图区】" href="/bbs/n4edcd6abe1382304b7000003">【贴图区】</a>
+ </div>
+
+ <h1 style="margin-top:252px;font-size:20px">最新帖子</h1>
<% end %>
<% if params[:action] == "node" %>
<table class="node_topics">
@@ -113,22 +135,6 @@
<% end %>
</div>
<% if params[:action] == "index" %>
- <div id="sections" class="box">
- <h2><%= image_tag 'kaokaodianpingdh.png' %></h2>
- <ul>
- <% @sections.each do |section| %>
- <li>
- <div><%= section.name %></div>
- <div>
- <% section.nodes.each do |node| %>
- <div style="<%unless @is_ie6%>float:left<%end%>"><a href="<%= bbs_node_topics_path(node.id) %>" title="<%= node.name %>"><%= node.name %></a></div>
- <% end %>
- <br style="clear:both">
- </div>
- </li>
- <% end %>
- </ul>
- </div>
<% end %>
<% if @is_ie %><div id="ie_every_foot" style="<%='left:0px' if @is_ie7 or @is_ie8%>">&nbsp;</div><div id="ie_every_footer"></div><%end%></div>
@@ -29,6 +29,7 @@ max-width:605px;
<% end %>
, <%= @topic.hits %>次阅读
</div>
+<div class="bshare-custom icon-medium"><a title="分享到人人网" class="bshare-renren" href="javascript:void(0);"></a><a title="分享到新浪微博" class="bshare-sinaminiblog" href="javascript:void(0);"></a><a title="分享到QQ空间" class="bshare-qzone" href="javascript:void(0);"></a><a title="分享到腾讯微博" class="bshare-qqmb" href="javascript:void(0);"></a><a title="分享到豆瓣" class="bshare-douban" href="javascript:void(0);"></a><a title="更多平台" class="bshare-more bshare-more-icon more-style-addthis"></a><span class="BSHARE_COUNT bshare-share-count">1.29K</span></div><script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=3&amp;lang=zh"></script><script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script>
</div>
</div>
<div class="body">
@@ -1,11 +1,13 @@
+<div id="shouye_chang">
+
<h2>接受邀请,注册用户</h2>
<%= simple_form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f| %>
<%= devise_error_messages! %>
<%= f.hidden_field :invitation_token %>
- <%= f.input :email, :input_html => { :disabled => :disabled } %>
+ <%= f.input :email,:label=>'E-mail', :input_html => { :disabled => :disabled } %>
<%= f.input :name %>
- <%= f.input :password %>
- <%= f.input :password_confirmation %>
+ <%= f.input :password,:label=>'密码' %>
+ <%= f.input :password_confirmation,:label=>'密码确认' %>
<div class="actions">
<button type="submit" class="submit">提交注册信息</button>
</div>
@@ -14,9 +16,8 @@
<div class="box">
<h2>说明</h2>
<div class="content">
- 你是通过他人邀请过来的。<br />
- 本站推崇实名制,请真正填写你的注册信息。<br />
- 注册成功以后,请仔细阅读一遍本站目前的内容。
+欢迎加入考考点评!
</div>
</div>
<% end %>
+<% if @is_ie %><div id="ie_every_foot">&nbsp;</div><div id="ie_every_footer"></div><%end%></div>
@@ -1,9 +1,9 @@
<p>你好 <%= @resource.email %>!</p>
<p>有人邀请你注册 <a href="<%= root_url %>"><%= Setting.app_name %></a>, 你可以点击下面的链接接受邀请.</p>
-
+<p>这是大学生自己的培训机构点评平台,在这里你可以看看过来人的意见,选出最适合你的机构;也可以分享你的考试报班经验,让学弟学妹少走弯路,结交更多朋友!</p>
<p><%= link_to '接受邀请', accept_invitation_url(@resource, :invitation_token => @resource.invitation_token) %></p>
-<p>如果你的邮件无法现实链接,请用这个:<br />
+<p>如果你的邮件无法显示链接,请用这个:<br />
<%= accept_invitation_url(@resource, :invitation_token => @resource.invitation_token) %></p>
<br>
<p>注册成功后,您将可以<a href="http://kkdp.net/users/invitation/new">邀请</a>您的朋友进入考考点评。</p>
@@ -1,7 +1,7 @@
<div id="shouye_chang">
<div class="listing">
-<%=image_tag 'email.gif'%>
+<%=image_tag 'contact.gif'%>
</div>
</div>
@@ -155,14 +155,16 @@
<% else %>
<%= javascript_include_tag "jquery.min","rails","facebox","jquery.jdialog","jquery.qeditor","jquery.autocomplete", "jquery.cookie","jquery.tipsy","jquery.ui","jcaches","application","asks","topics","users","inbox",cache:'cache_js'%>
<% end %>
+
+<% if !pos_bbs?%>
<script type="text/javascript">
if(!$.browser.msie){
$("[rel=tipsy]").tipsy({gravity: $.fn.tipsy.autoNS});
$("[rel=tipsyr]").tipsy({gravity: "w" });
$("[rel=tipsyt]").tipsy({gravity: "s" });
}
</script>
-
+<% end %>
<%= yield :scripts %>
@@ -40,6 +40,21 @@
<% end %>
</div>
</div>
+
+ <div class="box">
+ <h2 id="mail_notify_settings">修改密码</h2>
+ <div class="content">
+ <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :enctype => "multipart/form-data" }) do |f| %>
+ <%= f.input :password, :as=>:password, :label => "密码" %>
+ <%= f.input :password_confirmation, :as => :password, :label => "密码确认" %>
+ <div class="actions">
+ <button type="submit">保存</button>
+ </div>
+ <% end %>
+ </div>
+ </div>
+
+
</div>
<% if @is_ie %><div id="ie_every_foot" style="left:0px">&nbsp;</div><div id="ie_every_footer"></div><%end%></div>
@@ -7,7 +7,7 @@
<p>
考考点评目前还处于Alpha阶段,我们正在努力完善它,如果有问题还请多多谅解。<br /><br />
反馈与建议可以发往:<br />
-<a href="mailto:pmq2001@gmail.com">pmq2001@gmail.com</a> 或 <a href="<%= bugtrace_url %>">意见反馈区</a> <br /><br />
+<%= image_tag 'email.gif' %> 或 <a href="<%= bugtrace_url %>">意见反馈区</a> <br /><br />
</p>
<p>谢谢!</p>
@@ -7,4 +7,4 @@
no_invitations_remaining: "没有邀请码。"
mailer:
invitation_instructions:
- subject: '有人邀请你加入者也'
+ subject: '有人邀请你加入考考点评'
View
@@ -2,9 +2,9 @@ default: &defaults
# 网站名称
app_name: "考考点评"
# 页脚版权
- foot_html: "&copy; 考考点评 kkdp.net - 帮你选出最适合你的培训培训机构。内测期间,如有点评还请谅解。"
+ foot_html: "&copy; 考考点评 kaokaodianping.com - 帮你选出最适合你的培训培训机构。内测期间,如有点评还请谅解。"
# 网站的域名
- domain: "kkdp.net"
+ domain: "kaokaodianping.com"
# 配置图片的域名
upload_url: "/uploads"
# 设置管理员,在下面填写需要设置为管理员的用户 email
@@ -13,7 +13,7 @@ default: &defaults
- '136415405@qq.com'
- '894062261@qq.com'
google_analytics_key: "UA-27433368-1"
- email_sender: '"考考点评自动邮件" <no-reply@kkdp.net>'
+ email_sender: '"考考点评自动邮件" <no-reply@kaokaodianping.com>'
smtp_username: 'jigou.ping@gmail.com'
smtp_password: 'pmqpmq55'
aws_access_key_id: 'your aws access_key_id'
@@ -39,9 +39,9 @@ production:
<<: *defaults
app_name: "考考点评"
# 页脚版权
- foot_html: "&copy; 考考点评 kkdp.net - 帮你选出最适合你的培训培训机构"
+ foot_html: "&copy; 考考点评 kaokaodianping.com - 帮你选出最适合你的培训培训机构"
# 网站的域名
- domain: "kkdp.net"
+ domain: "kaokaodianping.com"
# 配置图片的域名
upload_url: "/uploads"
google_analytics_id: "UA-22413508-1"
Oops, something went wrong.

0 comments on commit 9b41593

Please sign in to comment.