Merge branch 'szzh' into develop

This commit is contained in:
huang 2015-11-13 20:25:56 +08:00
commit 84f290af67
8 changed files with 28 additions and 23 deletions

View File

@ -27,8 +27,9 @@ class OrganizationsController < ApplicationController
def show
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
@organization = Organization.find(params[:id])
@activities = OrgActivity.where('(org_act_id = ? and org_act_type = ?) || (container_id =? and org_act_type =? and org_act_id !=?)',
@organization.id, 'CreateOrganization ', @organization.id, 'OrgDocumentComment', @organization.home_id).order('updated_at desc')
@activities = OrgActivity.where('container_id =? and container_type =? ',
@organization.id, 'Organization ').order('updated_at desc')
@activities = paginateHelper @activities, 10
else
render_403

View File

@ -581,7 +581,10 @@
}
});
//查询学校
$("input[name='province']").on('input', function (e) {
throttle(shcool_search_fn,window,e);
});
function throttle(method,context,e){
clearTimeout(method.tId);
@ -603,10 +606,7 @@
type: 'post',
success: function (data) {
schoolsResult = data.schools;
count = data.count; //查询学校
$("input[name='province']").on('input', function (e) {
throttle(shcool_search_fn,window,e);
});
count = data.count;
maxPage = Math.ceil(count/100) //最大页码值
if(schoolsResult.length != undefined && schoolsResult.length != 0) {
var i = 0;

View File

@ -20,8 +20,8 @@
init_activity_KindEditor_data(<%= document.id%>, null, "87%");
});
</script>
<div id="organization_document_<%= document.id %>">
<p id="organization_document_<%= document.id %>">
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document} %>
</div>
</p>
<% end %>
<% end %>

View File

@ -1,11 +1,11 @@
<%= stylesheet_link_tag 'courses' %>
<div class="resources">
<div class="resources mt10">
<div class="project_r_h" style="width: 720px;">
<h2 class="project_h2"> 组织成员</h2>
</div>
<div class="st_list" style="width: 720px;">
<div class="st_box">
<span class="fr fb fontGrey3">加入时间</span>
<!--<span class="fr fb fontGrey3">加入时间</span>-->
<div class="cl"></div><!--st_box_top end-->
<% members.each do |member| %>

View File

@ -31,7 +31,7 @@
<li class=" mb5 ml80">
<label >公开&nbsp;&nbsp;</label>
<input id="organization_is_public" name="organization[is_public]" type="checkbox" value="1" checked="checked">
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。)</span>
<span class="c_grey">(打钩为公开,不打钩则不公开,若不公开,仅组织成员可见该组织。)</span>
<div class="cl"></div>
</li>
<li class=" ml90" >

View File

@ -30,9 +30,9 @@
init_activity_KindEditor_data(<%= @organization.home_id%>, null, "87%");
});
</script>
<div id="organization_document_<%= @organization.home_id %>">
<p id="organization_document_<%= @organization.home_id %>">
<%= render :partial => 'show_org_document', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id} %>
</div>
</p>
<% end %>
<% unless @activities.nil? %>
@ -58,9 +58,9 @@
init_activity_KindEditor_data(<%= act.org_act.id%>, null, "87%");
});
</script>
<div id="organization_document_<%= act.org_act.id %>">
<p id="organization_document_<%= act.org_act.id %>" style="mt10">
<%= render :partial => 'show_org_document', :locals => {:document => act.org_act} %>
</div>
</p>
<% end %>
<% end %>
<ul class="wlist" style=" border:none; padding-top: 15px;">

View File

@ -17,12 +17,16 @@
<div class=" mt10">
<%= link_to("导入作业", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fl mr10",:remote => true) unless edit_mode%>
<label class="fl c_grey f14" style="margin-top: 4px;">截止日期:</label>
<div class="calendar_div fl">
<% if edit_mode %>
<label class="fl c_grey f14" style="margin-top: 4px;">截止日期:</label>
<% end %>
<div class="calendar_div fl mr10">
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>
</div>
<label class="fl c_grey f14 ml10" style="margin-top: 4px;">发布日期(可选)</label>
<% if edit_mode %>
<label class="fl c_grey f14" style="margin-top: 4px;">发布日期(可选)</label>
<% end %>
<div class="calendar_div fl">
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" placeholder="发布日期(可选)" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.publish_time%>" >
<%= calendar_for('homework_publish_time')%>

View File

@ -6,10 +6,10 @@
<div class="postBanner" style="padding-bottom:5px;">
<span class="linkGrey2 f16">组织列表</span>
<form class="resourcesSearchloadBox" style="float:right; margin-top:-5px;">
<input type="text" name="serach" placeholder="输入关键词进行搜索" class="searchResource"/>
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
</form>
<!--<form class="resourcesSearchloadBox" style="float:right; margin-top:-5px;">-->
<!--<input type="text" name="serach" placeholder="输入关键词进行搜索" class="searchResource"/>-->
<!--<a href="javascript:void(0);" class="homepageSearchIcon"></a>-->
<!--</form>-->
<div class="cl"></div>
</div>
<% @orgs.each do |org| %>