1.申请子域名时,对子域名进行规范,仅能输入字母、数字和下划线;
2.博客主页,添加取消主页按钮; 3.私信只能发送者和接收者能看到
This commit is contained in:
parent
539d971901
commit
178f9e167c
|
@ -58,6 +58,23 @@
|
|||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == @article.author.id %>
|
||||
</li>
|
||||
<li>
|
||||
<% 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 %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -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("子域名命名不规范,只能包含字母、数字和下划线,请重新输入");
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -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'%>
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
<% if org.domain.nil? %>
|
||||
<%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
|
||||
<% else %>
|
||||
<a href="http://test.<%= org.domain %>.trustie.net" class = 'f16 linkBlue'><%= org.name %></a>
|
||||
<%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
|
||||
<!--<a href="http://test.<%#= org.domain %>.trustie.net" class = 'f16 linkBlue'><%#= org.name %></a>-->
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="orgIntro"><%= org.description %></div>
|
||||
|
|
Loading…
Reference in New Issue