2016-08-26 14:31:14 +08:00
|
|
|
<% if @user %>
|
|
|
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_source_tx',:style=>"width:78px;height:78px;overflow:hidden",:alt=>"头像") %>');
|
2015-08-19 17:14:19 +08:00
|
|
|
$("#nh_user_logo").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_logo',:width =>"40",:height => "40",:alt=>"头像") %>');
|
2016-08-26 14:31:14 +08:00
|
|
|
<% elsif @course %>
|
|
|
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@course), :id=>'nh_source_tx',:style=>"width:96px;height:96px;overflow:hidden",:alt=>"班级logo") %>');
|
|
|
|
if($("#course_avatar_form").length > 0) {
|
|
|
|
window.location.href = "<%=settings_course_path(@course) %>";
|
|
|
|
}
|
|
|
|
<% elsif @project %>
|
2016-09-27 09:31:59 +08:00
|
|
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@project), :id=>'nh_source_tx',:style=>"width:110px;height:110px;overflow:hidden",:alt=>"项目logo") %>');
|
2016-08-26 14:31:14 +08:00
|
|
|
if($("#project_avatar_form").length > 0) {
|
|
|
|
window.location.href = "<%=settings_project_path(@project) %>";
|
2016-08-29 16:19:06 +08:00
|
|
|
}
|
|
|
|
<% elsif @organization %>
|
|
|
|
<% if @organization.show_mode == 1 %>
|
|
|
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@organization), :id=>'nh_source_tx',:style=>"width:51px;height:51px;overflow:hidden",:alt=>"组织logo") %>');
|
|
|
|
<% else %>
|
|
|
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@organization), :id=>'nh_source_tx',:style=>"width:60px;height:60px;overflow:hidden",:alt=>"组织logo") %>');
|
|
|
|
<% end %>
|
|
|
|
if($("#org_avatar_form").length > 0) {
|
|
|
|
window.location.href = "<%=setting_organization_path(@organization) %>";
|
|
|
|
}
|
|
|
|
<% end %>
|
2015-07-09 15:27:49 +08:00
|
|
|
hideModal();
|