diff --git a/app/views/blog_comments/show.html.erb b/app/views/blog_comments/show.html.erb
index aa984c621..02f1ad1ad 100644
--- a/app/views/blog_comments/show.html.erb
+++ b/app/views/blog_comments/show.html.erb
@@ -58,6 +58,23 @@
:class => 'postOptionLink'
) if User.current && User.current.id == @article.author.id %>
+
+ <% if @article.id == @article.blog.homepage_id %>
+ <%= link_to(
+ l(:button_cancel_homepage),
+ {:controller => 'blogs',:action => 'cancel_homepage',:user_id=>@article.author_id,:id=>@article.blog_id, :article_id => @article.id},
+ :method => :post,
+ :class => 'postOptionLink'
+ ) if User.current && User.current.id == @article.blog.author_id %>
+ <% else %>
+ <%= link_to(
+ l(:button_set_homepage),
+ {:controller => 'blogs',:action => 'set_homepage',:user_id=>@article.author_id,:id=>@article.blog_id, :article_id => @article.id},
+ :method => :post,
+ :class => 'postOptionLink'
+ ) if User.current && User.current.id == @article.blog.author_id %>
+ <% end %>
+
diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb
index 77cfdc985..57e2de64b 100644
--- a/app/views/organizations/setting.html.erb
+++ b/app/views/organizations/setting.html.erb
@@ -140,16 +140,22 @@
$("#add_subfield_form").submit();
}
function apply_subdomain(id, domain){
- $.ajax({
- url:"<%= apply_subdomain_organization_path %>",
- type:'post',
- data:{
- id:id,
- domain:domain
- },
- success:function(){
- $("#apply_hint").text("您的申请已提交,系统会以消息的形式通知您结果");
- }
- });
+ var reg = new RegExp("[a-zA-Z0-9_]{1,}");
+ if (reg.exec(domain)){
+ $.ajax({
+ url:"<%= apply_subdomain_organization_path %>",
+ type:'post',
+ data:{
+ id:id,
+ domain:domain
+ },
+ success:function(){
+ $("#apply_hint").text("您的申请已提交,系统会以消息的形式通知您结果");
+ }
+ });
+ }
+ else{
+ $("#apply_hint").text("子域名命名不规范,只能包含字母、数字和下划线,请重新输入");
+ }
}
\ No newline at end of file
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 4953dc134..fa41d2998 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -126,7 +126,9 @@
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'JournalsForMessage' %>
- <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
+ <% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
+ <%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
+ <% end %>
<% end %>
<% end %>
<% when 'Blog'%>
diff --git a/app/views/users/user_organizations.html.erb b/app/views/users/user_organizations.html.erb
index e9709f766..f3005c456 100644
--- a/app/views/users/user_organizations.html.erb
+++ b/app/views/users/user_organizations.html.erb
@@ -25,7 +25,8 @@
<% if org.domain.nil? %>
<%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
<% else %>
- <%= org.name %>
+ <%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
+
<% end %>
<%= org.description %>