Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
Conflicts: app/views/users/user_organizations.html.erb
This commit is contained in:
commit
64d4789150
|
@ -4,4 +4,5 @@
|
||||||
$("#org_member_list").html('<%= escape_javascript( render :partial=>"organizations/org_member_list",:locals=> {:members=>@org.org_members}) %>');
|
$("#org_member_list").html('<%= escape_javascript( render :partial=>"organizations/org_member_list",:locals=> {:members=>@org.org_members}) %>');
|
||||||
$("#principals_for_new_member").html('');
|
$("#principals_for_new_member").html('');
|
||||||
$("#org_members_count_id").html("<%= @org.org_members.count %>");
|
$("#org_members_count_id").html("<%= @org.org_members.count %>");
|
||||||
|
$("#not_org_member_search").val("");
|
||||||
<% end %>
|
<% end %>
|
|
@ -56,7 +56,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if org_act_count == 10 %>
|
<% if org_act_count == 10 %>
|
||||||
<div id="show_more_activities" class="loadMore mt10 f_grey">展开更多<%=link_to "", organization_path(org,:page => page.to_i + 1),:id => "more_org_activities_link",:remote => "true",:class => "none" %></div>
|
<div id="show_more_activities" class="loadMore mt10 f_grey">展开更多<%=link_to "", organization_path(org,:page => page.to_i + 1, :type => params[:type]),:id => "more_org_activities_link",:remote => "true",:class => "none" %></div>
|
||||||
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
<div class="homepagePostReplyPortrait mr15">
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= act.id %>">
|
||||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_path(User.current) %>
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_path(User.current) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyInputContainer">
|
<div class="homepagePostReplyInputContainer">
|
||||||
|
|
|
@ -62,10 +62,13 @@
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function popupRegex(){
|
function popupRegex(){
|
||||||
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
|
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||||
showModal('ajax-modal', '500px');
|
{
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
|
||||||
$('#ajax-modal').parent().css("top","").css("left","");
|
showModal('ajax-modal', '500px');
|
||||||
$('#ajax-modal').parent().addClass("anonymos");
|
$('#ajax-modal').siblings().remove();
|
||||||
|
$('#ajax-modal').parent().css("top","").css("left","");
|
||||||
|
$('#ajax-modal').parent().addClass("anonymos");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -121,10 +121,13 @@
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function popupRegex(){
|
function popupRegex(){
|
||||||
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
|
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||||
showModal('ajax-modal', '500px');
|
{
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
|
||||||
$('#ajax-modal').parent().css("top","").css("left","");
|
showModal('ajax-modal', '500px');
|
||||||
$('#ajax-modal').parent().addClass("anonymos");
|
$('#ajax-modal').siblings().remove();
|
||||||
|
$('#ajax-modal').parent().css("top","").css("left","");
|
||||||
|
$('#ajax-modal').parent().addClass("anonymos");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -9,9 +9,9 @@
|
||||||
<%#= form_tag url_for(:controller => 'users', :action => 'search_user_orgs', :id => User.current.id), :method => 'get', :id => "search_org_form", :class=>"resourcesSearchloadBox", :style=>"float:right; margin-top:-5px;" do %>
|
<%#= form_tag url_for(:controller => 'users', :action => 'search_user_orgs', :id => User.current.id), :method => 'get', :id => "search_org_form", :class=>"resourcesSearchloadBox", :style=>"float:right; margin-top:-5px;" do %>
|
||||||
<!--<input type="text" name="search_orgs" placeholder="输入关键词进行搜索" class="searchResource" />-->
|
<!--<input type="text" name="search_orgs" placeholder="输入关键词进行搜索" class="searchResource" />-->
|
||||||
|
|
||||||
<!--<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#search_org_form').submit();"></a>-->
|
<!--<!–<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#search_org_form').submit();"></a>–>-->
|
||||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#search_org_form').submit();"></a>
|
<!--<a href="javascript:void(0);" class="problem_search_btn fl" onclick="$('#search_org_form').submit();">搜索</a>-->
|
||||||
<% end %>
|
<!--<%# end %>-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="org_list">
|
<div id="org_list">
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
class DeleteUselessOrgActivities < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
OrgActivity.all.each do |act|
|
||||||
|
if act.container_type == 'Course'
|
||||||
|
if CourseActivity.where("course_act_type=? and course_act_id =? and course_id =?", act.org_act_type, act.org_act_id, act.container_id).count == 0
|
||||||
|
puts "course"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if act.container_type == 'Project' and ForgeActivity.where("forge_act_type=? and forge_act_id =? and project_id =?", act.org_act_type, act.org_act_id, act.container_id).count == 0
|
||||||
|
act.destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue