Merge branch 'dev_shcool' into develop
Conflicts: app/helpers/users_helper.rb
This commit is contained in:
commit
e7e873e0df
|
@ -616,9 +616,14 @@ class AdminController < ApplicationController
|
|||
# 未审批tab页
|
||||
# status: 0 未审批; 1 已批阅; 2已更改; 3拒绝;
|
||||
def applied_schools
|
||||
# 更新消息状态
|
||||
if params[:flag]
|
||||
applied_message = AppliedMessage.where(:id => params[:applied_message_id]).first
|
||||
applied_message.update_attribute(:viewed, true)
|
||||
end
|
||||
|
||||
@name = params[:name] || ""
|
||||
condition = "#{@name.strip}".gsub(" ","")
|
||||
|
||||
@apply_status = ApplyAddSchools.where("status = 0 and name like '%#{condition}%'").order('created_at desc')
|
||||
@apply_count = @apply_status.count
|
||||
@apply_pages = Paginator.new @apply_count, 30, params['page'] || 1
|
||||
|
@ -655,7 +660,7 @@ class AdminController < ApplicationController
|
|||
applied_school.update_column('status', 1) unless applied_school.nil?
|
||||
school = applied_school.school
|
||||
school.update_attribute("province", applied_school.province)
|
||||
AppliedMessage.create(:user_id => applied_school.user_id, :status => 1, :viewed => true, :applied_id => applied_school.id, :applied_type => "ApplyAddSchools", :name => applied_school.name )
|
||||
AppliedMessage.create(:user_id => applied_school.user_id, :status => 1, :viewed => 0, :applied_id => applied_school.id, :applied_type => "ApplyAddSchools", :name => applied_school.name )
|
||||
# School.create(:user_id => applied_school.user_id, :status => 1, :viewed => true, :applied_id => applied_school.id, :applied_type => "ApplyAddSchools", :name => applied_school.name )
|
||||
respond_to do |format|
|
||||
format.html{ redirect_to unapplied_schools_url }
|
||||
|
@ -663,8 +668,8 @@ class AdminController < ApplicationController
|
|||
end
|
||||
|
||||
# 单位审核:更改
|
||||
# REDO: 修改该字段
|
||||
# REDO: 同步修改使用了改名称的用户单位
|
||||
# 修改该字段
|
||||
# 同步修改使用了改名称的用户单位
|
||||
def edit_applied_schools
|
||||
aas = ApplyAddSchools.find(params[:applied_id])
|
||||
# aas.update_attribute(:name, params[:name])
|
||||
|
@ -672,11 +677,9 @@ class AdminController < ApplicationController
|
|||
school = School.find params[:school_id]
|
||||
begin
|
||||
aas.update_attribute(:status, 2)
|
||||
AppliedMessage.create(:user_id => aas.user_id, :status => 2, :viewed => true, :applied_id => aas.id, :applied_type => "ApplyAddSchools", :name => school[0].name )
|
||||
AppliedMessage.create(:user_id => aas.user_id, :status => 2, :viewed => 0, :applied_id => aas.id, :applied_type => "ApplyAddSchools", :name => school[0].name )
|
||||
users = UserExtensions.where("school_id = #{aas.school_id}")
|
||||
users.each do |user|
|
||||
user.update_column("school_id", school[0].id)
|
||||
end
|
||||
users.update_all(:school_id => school[0].id)
|
||||
if aas.school_id != school[0].id.to_i
|
||||
aas.school.destroy
|
||||
end
|
||||
|
@ -709,28 +712,19 @@ class AdminController < ApplicationController
|
|||
end
|
||||
|
||||
# 单位审核:删除
|
||||
# REDO: destroy关联删除
|
||||
# REDO: 删除确认提示,是否删除
|
||||
# REDO: 给申请人发送消息
|
||||
def delete_applied_schools
|
||||
applied_school = ApplyAddSchools.find(params[:id])
|
||||
applied_school.update_attribute(:status, 3)
|
||||
# 未审批删除
|
||||
if params[:tip] == "unapplied"
|
||||
AppliedMessage.create(:user_id => applied_school.user_id, :status => 3, :viewed => true, :applied_id => applied_school.id, :applied_type => "ApplyAddSchools", :name => applied_school.name )
|
||||
# 删除学校的用户
|
||||
users = UserExtensions.where("school_id = #{applied_school.school_id}")
|
||||
users.each do |user|
|
||||
user.update_column("school_id", nil)
|
||||
end
|
||||
AppliedMessage.create(:user_id => applied_school.user_id, :status => 3, :viewed => 0, :applied_id => applied_school.id, :applied_type => "ApplyAddSchools", :name => applied_school.name )
|
||||
# 删除学校的用户
|
||||
users = UserExtensions.where("school_id = #{applied_school.school_id}")
|
||||
users.update_all(:school_id => nil)
|
||||
applied_school.school.destroy
|
||||
redirect_to unapplied_schools_url
|
||||
# 已审批删除
|
||||
elsif params[:tip] == "applied"
|
||||
users = UserExtensions.where("school_id = #{applied_school.school_id}")
|
||||
users.each do |user|
|
||||
user.update_column("school_id", nil)
|
||||
end
|
||||
applied_school.destroy
|
||||
redirect_to applied_schools_url
|
||||
end
|
||||
|
|
|
@ -108,6 +108,12 @@ class MyController < ApplicationController
|
|||
|
||||
# Edit user's account
|
||||
def account
|
||||
# 更新消息状态
|
||||
if params[:flag]
|
||||
applied_message = AppliedMessage.where(:id => params[:applied_message_id]).first
|
||||
applied_message.update_attribute(:viewed, true)
|
||||
end
|
||||
|
||||
@user = User.current
|
||||
|
||||
lg=@user.login
|
||||
|
|
|
@ -188,11 +188,12 @@ class SchoolController < ApplicationController
|
|||
user_extention.school_id = school.id
|
||||
user_extention.save!
|
||||
|
||||
# status=4 向管理员发送信息
|
||||
# 向管理员发送信息
|
||||
users = User.where(:admin => 1)
|
||||
users.each do |user|
|
||||
AppliedMessage.create(:user_id => user.id, :status => 0, :applied_user_id => User.current.id, :viewed => true, :applied_id => school.id, :applied_type => "ApplyAddSchools", :name => school.name )
|
||||
AppliedMessage.create(:user_id => user.id, :status => 0, :applied_user_id => User.current.id, :viewed => 0, :applied_id => school.id, :applied_type => "ApplyAddSchools", :name => school.name )
|
||||
end
|
||||
|
||||
else
|
||||
data[:result] = 3
|
||||
end
|
||||
|
|
|
@ -105,6 +105,22 @@ module UsersHelper
|
|||
end
|
||||
end
|
||||
|
||||
# 单位申请消息:通过用户的状态判断
|
||||
# status(0:申请消息;1,2,3:系统消息)
|
||||
def applied_school_users applied_message
|
||||
user = User.find(applied_message.applied_user_id)
|
||||
end
|
||||
|
||||
# 单位申请消息通过状态判断tip描述
|
||||
def applied_school_tip applied_message
|
||||
case applied_message.status
|
||||
when 1,2,3
|
||||
"您添加新的单位:"
|
||||
when 0
|
||||
"申请了单位:"
|
||||
end
|
||||
end
|
||||
|
||||
def applied_project_tip_header applied_message
|
||||
case applied_message.status
|
||||
when 4
|
||||
|
@ -117,6 +133,7 @@ module UsersHelper
|
|||
end
|
||||
|
||||
|
||||
|
||||
def get_resource_origin attach
|
||||
type = attach.container_type
|
||||
content = attach.container
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<%#= hidden_field_tag(:send_id, edit_id) %>
|
||||
<div class="courseReferContainer">
|
||||
<% if !schools.empty? %>
|
||||
<% if !schools.empty? && !@search.nil? %>
|
||||
<% schools.each do |school| %>
|
||||
<ul class="courseSend">
|
||||
<li class="" style="display:inline-block">
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% if params[:search].nil? %>
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'admin/all_schools', :locals => {:schools => @schools, :edit_id => @edit_id}) %>');
|
||||
showModal('ajax-modal', '452px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
||||
$('#ajax-modal').parent().css("top","50%").css("left","50%");
|
||||
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
|
||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
||||
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'admin/all_schools', :locals => {:schools => @schools, :edit_id => @edit_id}) %>');
|
||||
showModal('ajax-modal', '452px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
||||
$('#ajax-modal').parent().css("top","50%").css("left","50%");
|
||||
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
|
||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
||||
<% else %>
|
||||
$("#schools_list").html("<%= escape_javascript(render :partial => 'admin/update_school_form', :locals => {:schools => @schools, :edit_id => @edit_id}) %>");
|
||||
$("#schools_list").html("<%= escape_javascript(render :partial => 'admin/update_school_form', :locals => {:schools => @schools, :edit_id => @edit_id}) %>");
|
||||
<% end %>
|
|
@ -11,7 +11,7 @@
|
|||
</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '输入单位名称进行搜索' %>
|
||||
<%= submit_tag l(:button_apply ), :class => "small", :name => nil %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'applied_shcools'}, :class => 'icon icon-reload' %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'applied_schools'}, :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
<td class="center">
|
||||
<% user = User.where("id=?", apply.user_id).first %>
|
||||
<% unless user.nil? %>
|
||||
<%=link_to user.show_name, user_path(user),:target => '_blank' %>
|
||||
<%=link_to user.show_name, user_path(user),:target => '_blank', :class => "application-default-link" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="center">
|
||||
|
@ -132,7 +132,7 @@
|
|||
<td>
|
||||
|
||||
</td>
|
||||
<td style="text-align: left;" colspan="6">
|
||||
<td style="text-align: left;" colspan="7">
|
||||
<%= apply.remarks %>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</label>
|
||||
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '输入单位名称进行搜索' %>
|
||||
<%= submit_tag l(:button_apply ), :class => "small", :name => nil %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'applied_shcools'}, :class => 'icon icon-reload' %>
|
||||
<%= link_to l(:button_clear), {:controller => 'admin', :action => 'has_applied_schools'}, :class => 'icon icon-reload' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
<table class="list" style="width: 100%;table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 20px;">
|
||||
<th style="width: 25px;">
|
||||
序号
|
||||
</th>
|
||||
<th style="width: 80px;">
|
||||
|
|
|
@ -73,9 +73,9 @@
|
|||
</div>
|
||||
|
||||
<div class="navHomepageNews" id="user_messages">
|
||||
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon", :target =>"_Blank", :title => "您的所有消息" %>
|
||||
<% if User.current.count_new_message.to_i >0 %>
|
||||
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive", :target =>"_Blank" %></div>
|
||||
<%= link_to "", user_message_path(User.current), :class => "homepageNewsIcon", :target => "_Blank", :title => "您的所有消息" %>
|
||||
<% if User.current.count_new_message.to_i > 0 %>
|
||||
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive", :target => "_Blank" %></div>
|
||||
<% end %>
|
||||
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||
<div class="shadowbox_news undis" id="user_messages_list">
|
||||
|
|
|
@ -142,6 +142,28 @@
|
|||
<% content = '<span class="shadowbox_news_user">'+ma.author.show_name+' </span>提到了你:'+ma.subject.html_safe %>
|
||||
<li><%=link_to content.html_safe, ma.url, :title => ma.author.show_name+' 提到了你:'+ma.subject.html_safe, :target => '_blank' %></li>
|
||||
<% end %>
|
||||
<% elsif ma.class == AppliedMessage %>
|
||||
<% if ma.applied_type == "ApplyAddSchools" && ma.status == 0 %>
|
||||
<li>
|
||||
<% content = '<span class="shadowbox_news_user">'+User.where("id=?", ma.applied_user_id).first.show_name+' </span>提交了申请:添加新的单位:'+"“"+ma.name+"”" %>
|
||||
<%= link_to content.html_safe, unapplied_schools_path(:flag => 1, :applied_message_id => ma.id), :title => "#{User.where("id=?", ma.applied_user_id).first.show_name}提交了申请:添加新的单位“#{ma.name}”", :target => '_blank' %>
|
||||
</li>
|
||||
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 1 %>
|
||||
<li>
|
||||
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,已通过审核。谢谢!" %>
|
||||
<%= link_to content.html_safe, { :controller=> "my",:action => "account",:flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,已通过审核。谢谢!", :target => '_blank'%>
|
||||
</li>
|
||||
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 2 %>
|
||||
<li>
|
||||
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.applied.name}”的申请,因名称不符合规范,系统已将其更改为“#{ma.name}”。谢谢!" %>
|
||||
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.applied.name}”的申请,因名称不符合规范,系统已将其更改为“#{ma.name}”。谢谢!", :target => '_blank'%>
|
||||
</li>
|
||||
<% elsif ma.applied_type == "ApplyAddSchools" && ma.status == 3 %>
|
||||
<li>
|
||||
<% content = "<span class='shadowbox_news_user'>系统提示:</span>“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!" %>
|
||||
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" placeholder="--请搜索您所在的高校(单位)--" >
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="" placeholder=" --请选择您所属的单位--"/>
|
||||
<p class="fl ml10">
|
||||
<span id="errortip" class="icons_warning fl mt5" style="display: none;"></span>
|
||||
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->
|
||||
<span id="hint" style="color: #7f7f7f;display: none">平台找到了<a id="school_num" href="javascript:void(0)" style="color: red" >0</a>个包含<a id="search_condition" href="javascript:void(0)">"国防"</a>的高校</span>
|
||||
</p>
|
||||
<!--<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>-->
|
||||
|
@ -88,7 +88,7 @@
|
|||
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" placeholder="--请搜索您所在的高校(单位)--" >
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
|
||||
<p class="fl ml10">
|
||||
<span id="errortip" class="icons_warning fl mt5" style="display: none;"></span>
|
||||
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->
|
||||
<span id="hint" style="color: #7f7f7f;display: none">平台找到了<a id="school_num" href="javascript:void(0)" style="color: red" >0</a>个包含<a id="search_condition" href="javascript:void(0)">"国防"</a>的高校</span>
|
||||
</p>
|
||||
<!--<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>-->
|
||||
|
@ -96,7 +96,7 @@
|
|||
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" placeholder="--请搜索您所在的高校(单位)--" >
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" placeholder=" --请选择您所属的单位--" />
|
||||
<p class="fl ml10">
|
||||
<span id="errortip" class="icons_warning fl mt5" style="display: none;"></span>
|
||||
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->
|
||||
<span id="hint" style="color: #7f7f7f;display: none">平台找到了<a id="school_num" href="javascript:void(0)" style="color: red" >0</a>个包含<a id="search_condition" href="javascript:void(0)">"国防"</a>的高校</span>
|
||||
</p>
|
||||
<!--<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>-->
|
||||
|
@ -104,7 +104,7 @@
|
|||
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" value="<%= User.current.user_extensions.school %>" />
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" type="text" style="display: none;" class="w210" value="<%= User.current.user_extensions.school.id %>"/>
|
||||
<p class="fl ml10">
|
||||
<span id="errortip" class="icons_warning fl mt5" style="display: none;"></span>
|
||||
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->
|
||||
<span id="hint" style="color: #7f7f7f;display: none">平台找到了<a id="school_num" href="javascript:void(0)" style="color: red" >0</a>个包含<a id="search_condition" href="javascript:void(0)">"国防"</a>的高校</span>
|
||||
</p>
|
||||
<!--<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" value="<%#= User.current.user_extensions.school.name %>" readonly="true" style="background-color: #E2E2E2;"/>-->
|
||||
|
@ -466,7 +466,7 @@
|
|||
}else{
|
||||
$("#search_school_result_list").html('');
|
||||
str = e.target.value.length > 4 ? e.target.value.substr(0, 4)+"..." : e.target.value;
|
||||
$("#hint").html('您输入的名称尚不存在,<a style="color:#64bdd9" onclick="apply_add_school();" href="javascript:void(0);">申请添加</a>');
|
||||
$("#hint").html('如果找不到自己的单位,您可以<a style="color:#64bdd9" onclick="apply_add_school();" href="javascript:void(0);">添加单位</a>');
|
||||
$("#hint").show();
|
||||
$("#errortip").show();
|
||||
}
|
||||
|
|
|
@ -1,51 +1,24 @@
|
|||
<% if ma.class == AppliedMessage %>
|
||||
<!--申请加入项目-->
|
||||
<% if ma.applied_type == "ApplyAddSchools" %>
|
||||
<% if ma.status == 1 || ma.status == 2 || ma.status == 3 || ma.status == 0 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<a href="javascript:void(0);">
|
||||
<% if ma.status == 1 || ma.status == 2 || ma.status == 3 %>
|
||||
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
|
||||
<% elsif ma.status == 0 %>
|
||||
<%= link_to image_tag(url_to_avatar(ma.user), :width => "30", :height => "30"), user_path(ma.user), :target => '_blank' %>
|
||||
<% if ma.status == 0 %>
|
||||
<%= link_to image_tag(url_to_avatar(ma.user), :width => "30", :height => "30"), user_path(ma.user), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
|
||||
<% end %>
|
||||
</a>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<% if ma.status == 1 %>
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您添加新的高校(单位):</span>
|
||||
<li class="homepageNewsContent fl">
|
||||
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="<%= ma.name %>的申请,已通过">“<%= ma.name %>”的申请,已通过</a>
|
||||
</li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
<% elsif ma.status == 2 %>
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您添加新的高校(单位):</span>
|
||||
<li class="homepageNewsContent fl">
|
||||
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="“<%= ma.applied.name %>”的申请,因名称不合法,系统已将其更改为“<%= ma.name %>”">“<%= ma.applied.name %>”的申请,因名称不合法,系统已将其更改为“<%= ma.name %>”</a>
|
||||
</li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
<% elsif ma.status == 3 %>
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">您添加新的高校(单位):</span>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to "“"+ma.name+"”" + "的申请,因名称不合法,已被拒绝,请重新编辑您的基本资料", { :controller=> "my",:action => "account" }, :title => "“#{ma.name}”的申请,因名称不合法,已被拒绝,请重新编辑您的基本资料", :target => '_blank'%>
|
||||
</li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
<% elsif ma.status == 0 %>
|
||||
<%=link_to User.where("id=?", ma.applied_user_id).first.show_name, user_path(ma.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"> 申请了单位:</span>
|
||||
<li class="homepageNewsContent fl">
|
||||
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank'>
|
||||
<%= link_to User.where("id=?", ma.applied_user_id).first.show_name + "提交了申请:添加新的单位“#{ma.name}”", unapplied_schools_path(), :title => "#{User.where("id=?", ma.applied_user_id).first.show_name}提交了申请:添加新的单位“#{ma.name}”" %></a>
|
||||
</li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
<% end %>
|
||||
<%= render :partial => "users/user_message_applied_schools", :locals =>{:ma => ma} %>
|
||||
<li class = "homepageNewsContent fl">
|
||||
<%= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
|
||||
</li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% elsif ma && ma.applied_type == "AppliedProject" %>
|
||||
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
|
||||
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<% if ma.status == 1 %>
|
||||
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="<%= ma.name %>的申请,已通过审核。谢谢!">
|
||||
“<%= ma.name %>”的申请,已通过审核。谢谢!
|
||||
</a>
|
||||
<% elsif ma.status == 2 %>
|
||||
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!">
|
||||
“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!
|
||||
</a>
|
||||
<% elsif ma.status == 3 %>
|
||||
<%= link_to "“"+ma.name+"”" + "的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", { :controller=> "my",:action => "account" }, :title => "“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
|
||||
<% elsif ma.status == 0 %>
|
||||
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank'>
|
||||
<%= link_to User.where("id=?", ma.applied_user_id).first.show_name + "提交了申请:添加新的单位“#{ma.name}”", unapplied_schools_path(), :title => "#{User.where("id=?", ma.applied_user_id).first.show_name}提交了申请:添加新的单位“#{ma.name}”" %>
|
||||
</a>
|
||||
<% end %>
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
<% if ma.status != 0 %>
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<% else %>
|
||||
<%=link_to User.where("id=?", ma.applied_user_id).first.show_name, user_path(ma.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% end %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= applied_school_tip(ma) %></span>
|
|
@ -1965,6 +1965,7 @@ function edit_school_name(url,id){
|
|||
url,
|
||||
{id: id ,name: $("#school_name_edit_"+id).val() },
|
||||
function (data) {
|
||||
$("#school_name_edit_"+id).val("");
|
||||
if(data.status == 0){
|
||||
$("#apply_title_"+data.id).show();
|
||||
$("#school_name_edit_"+data.id).hide();
|
||||
|
@ -1998,6 +1999,7 @@ function edit_school_address(url,id){
|
|||
url,
|
||||
{id: id ,address: $("#school_address_edit_"+id).val() },
|
||||
function (data) {
|
||||
$("#school_address_edit_"+data.id).val("");
|
||||
if(data.status == 0){
|
||||
$("#apply_address_"+data.id).show();
|
||||
$("#school_address_edit_"+data.id).hide();
|
||||
|
|
Loading…
Reference in New Issue