1.申请子域名时,对子域名进行规范,仅能输入字母、数字和下划线;
2.博客主页,添加取消主页按钮; 3.私信只能发送者和接收者能看到
This commit is contained in:
parent
539d971901
commit
178f9e167c
|
@ -58,6 +58,23 @@
|
||||||
:class => 'postOptionLink'
|
:class => 'postOptionLink'
|
||||||
) if User.current && User.current.id == @article.author.id %>
|
) if User.current && User.current.id == @article.author.id %>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -140,6 +140,8 @@
|
||||||
$("#add_subfield_form").submit();
|
$("#add_subfield_form").submit();
|
||||||
}
|
}
|
||||||
function apply_subdomain(id, domain){
|
function apply_subdomain(id, domain){
|
||||||
|
var reg = new RegExp("[a-zA-Z0-9_]{1,}");
|
||||||
|
if (reg.exec(domain)){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"<%= apply_subdomain_organization_path %>",
|
url:"<%= apply_subdomain_organization_path %>",
|
||||||
type:'post',
|
type:'post',
|
||||||
|
@ -152,4 +154,8 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
$("#apply_hint").text("子域名命名不规范,只能包含字母、数字和下划线,请重新输入");
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
|
@ -126,9 +126,11 @@
|
||||||
<% if act %>
|
<% if act %>
|
||||||
<% case user_activity.act_type.to_s %>
|
<% case user_activity.act_type.to_s %>
|
||||||
<% when 'JournalsForMessage' %>
|
<% when 'JournalsForMessage' %>
|
||||||
|
<% 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} %>
|
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
<% when 'Blog'%>
|
<% when 'Blog'%>
|
||||||
<%if act %>
|
<%if act %>
|
||||||
<% case user_activity.act_type.to_s %>
|
<% case user_activity.act_type.to_s %>
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
<% if org.domain.nil? %>
|
<% if org.domain.nil? %>
|
||||||
<%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
|
<%= link_to org.name, organization_path(org), :class => 'f16 linkBlue' %>
|
||||||
<% else %>
|
<% 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 %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orgIntro"><%= org.description %></div>
|
<div class="orgIntro"><%= org.description %></div>
|
||||||
|
|
Loading…
Reference in New Issue