diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 70bce9566..988768414 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -325,7 +325,7 @@ class FilesController < ApplicationController @containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)] show_attachments @containers - get_attachment_for_tip(@all_attachments) + # get_attachment_for_tip(@all_attachments) @tag_list = attachment_tag_list @all_attachments @@ -378,7 +378,7 @@ class FilesController < ApplicationController @containers = [ Course.includes(:attachments).reorder(sort).find(@course.id)] show_attachments @containers - get_attachment_for_tip(@all_attachments) + # get_attachment_for_tip(@all_attachments) @tag_list = attachment_tag_list @all_attachments diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index d661350c6..97222f0bd 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -229,7 +229,7 @@ class MembersController < ApplicationController user_ids.each do |user_id| member = Member.new(:role_ids => params[:membership][:role_ids], :user_id => user_id) - role_ids = attrs.delete(:role_ids) + role_ids = params[:membership][:role_ids] #role = Role.find(params[:membership][:role_ids]) # 这里的判断只能通过角色名,可以弄成常量 if role_ids && role_ids.include?("10") diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2d6e84762..1ff7fc2d9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2524,7 +2524,7 @@ module ApplicationHelper def footer_logo(ul_class=nil, li_class=nil) logos = [] logos.push(link_to image_tag('/images/footer_logo/nudt.png',:alt=>"nudt"),"http://www.nudt.edu.cn/special.asp?classid=12" ) - logos.push(link_to image_tag('/images/footer_logo/peking_eecs.png', :alt=>"peking_eecs"), "http://eecs.pku.edu.cn" ) + logos.push(link_to image_tag('/images/footer_logo/peking_eecs.png', :alt=>"peking_eecs"), "http://www.sei.pku.edu.cn/" ) logos.push(link_to image_tag('/images/footer_logo/buaa_scse.png', :alt=>"buaa_scse"), "http://scse.buaa.edu.cn/" ) logos.push(link_to image_tag('/images/footer_logo/iscas.png', :alt=>"iscas"), "http://www.iscas.ac.cn" ) logos.push(link_to image_tag('/images/footer_logo/inforbus.png', :alt=>"inforbus"), "http://www.inforbus.com" ) diff --git a/app/helpers/org_member_helper.rb b/app/helpers/org_member_helper.rb index e16051eaf..8e7d1e2ef 100644 --- a/app/helpers/org_member_helper.rb +++ b/app/helpers/org_member_helper.rb @@ -7,7 +7,7 @@ module OrgMemberHelper scope = [] end principals = paginateHelper scope,10 - s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals') + s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals') links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options| link_to text, host_with_protocol + "/org_member/org_member_autocomplete?" + parameters.merge(:q => params[:q],:flag => true,:org=> org, :format => 'js').to_query, :remote => true } diff --git a/app/models/member.rb b/app/models/member.rb index cb15e067b..bb336e936 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -52,6 +52,9 @@ class Member < ActiveRecord::Base ids += member_roles.select {|mr| !mr.inherited_from.nil?}.collect(&:role_id) new_role_ids = ids - role_ids + if (new_role_ids.include?(7) || new_role_ids.include?(9)) && role_ids.include?(10) + member_roles.where("role_id = 10").first.update_column('is_current', 0) + end # Add new roles if new_role_ids.include?(7) && new_role_ids.include?(10) member_roles << MemberRole.new(:role_id => 7) diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 5291c2d06..b5a15bc1f 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -115,21 +115,22 @@
-

- <%= render :partial => "files/tip_attachment_count" %> + + + +

共有 <%= @all_attachments.count%> 个资源

+

+ <%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %>

-

- <%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %> -

-
- - -

私有资源:
仅对本班级成员可见

-

公共资源:
对所有用户可见

-
+ + + + + +
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %> diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb index ebda40e6e..7504fbecb 100644 --- a/app/views/files/_project_file.html.erb +++ b/app/views/files/_project_file.html.erb @@ -85,9 +85,10 @@
-

- <%= render :partial => "files/tip_attachment_count" %> -

+ + + +

共有 <%= @all_attachments.count%> 个资源

<% if @order == "asc" %> 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /  @@ -102,14 +103,14 @@

- <% if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %> -
- - -

私有资源:
仅对本项目成员可见

-

公共资源:
对所有用户可见

-
- <% end %> + <%# if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %> + + + + + + + <%# end %>
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %> diff --git a/app/views/files/search_tag_attachment.js.erb b/app/views/files/search_tag_attachment.js.erb index 8aaff5aa5..11d4ad297 100644 --- a/app/views/files/search_tag_attachment.js.erb +++ b/app/views/files/search_tag_attachment.js.erb @@ -3,6 +3,6 @@ $("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>'); <% else %> $("#resource_list").html("<%= escape_javascript( render :partial => 'files/project_file',:locals => {project:@project, all_attachments:@all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments}) %>"); - $("#tip_attachment_count").html("<%= escape_javascript( render :partial => 'files/tip_attachment_count') %>"); +// $("#tip_attachment_count").html("<%#= escape_javascript( render :partial => 'files/tip_attachment_count') %>"); $("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>'); <% end %> diff --git a/app/views/issues/_issue_reply_banner.html.erb b/app/views/issues/_issue_reply_banner.html.erb new file mode 100644 index 000000000..d68b2e38b --- /dev/null +++ b/app/views/issues/_issue_reply_banner.html.erb @@ -0,0 +1,5 @@ +<% count = @issue.journals.count %> +回复<%= count>0 ? "(#{count})" : "" %> + + <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@issue, :user_activity_id=>@issue.id,:type=>"activity"}%> + \ No newline at end of file diff --git a/app/views/issues/_jounal_refresh.js.erb b/app/views/issues/_jounal_refresh.js.erb index 0945ba04d..df3d605f4 100644 --- a/app/views/issues/_jounal_refresh.js.erb +++ b/app/views/issues/_jounal_refresh.js.erb @@ -17,5 +17,5 @@ issue_desc_editor = KindEditor.create('#issue_description', "uploadJson":"/kindeditor/upload", "fileManagerJson":"/kindeditor/filemanager"}); // $("#issue_test_<%#= @issue.id %>").html("<%#= escape_javascript(render :partial => 'issues/edit', :locals => {:issue => Issue.find( @issue_id)}) %>"); -$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)'); +$(".homepagePostReplyBannerCount").html('<%= escape_javascript(render :partial => 'issues/issue_reply_banner') %>'); sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%= @issue.class.name %>"); \ No newline at end of file diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 13642c0ca..40728d451 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -36,7 +36,9 @@
-
回复(<%= @issue.journals.count %>)
+
+ <%=render :partial => 'issue_reply_banner' %> +
diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 7253af03d..bef18d7fc 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -26,7 +26,7 @@ <%= link_to image_tag('/images/footer_logo/nudt.png',:size=>'100x30',:alt=>l(:label_co_organizer_NUDT)),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank" %> - <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>l(:label_co_organizer_EECS)), "http://eecs.pku.edu.cn", :target => "_blank" %> + <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:size=>'100x30',:alt=>l(:label_co_organizer_EECS)), "http://www.sei.pku.edu.cn/", :target => "_blank" %> <%= link_to image_tag('/images/footer_logo/buaa_scse.png',:size=>'100x30',:alt=>l(:label_co_organizer_BHU)), "http://scse.buaa.edu.cn/", :target => "_blank" %> diff --git a/app/views/layouts/_base_footer_public.html.erb b/app/views/layouts/_base_footer_public.html.erb index 7c5ab571e..18152c745 100644 --- a/app/views/layouts/_base_footer_public.html.erb +++ b/app/views/layouts/_base_footer_public.html.erb @@ -24,7 +24,7 @@ <%= l(:label_sponsor)%>
  • - <%= l(:label_partners)%><%= l(:label_co_organizer_EECS)%> + <%= l(:label_partners)%><%= l(:label_co_organizer_EECS)%>
  • <%= l(:label_co_organizer_BHU)%> diff --git a/app/views/layouts/_course_base_info.html.erb b/app/views/layouts/_course_base_info.html.erb index 38b1c8a6f..c2fe181fe 100644 --- a/app/views/layouts/_course_base_info.html.erb +++ b/app/views/layouts/_course_base_info.html.erb @@ -2,7 +2,7 @@ <% teacher_num = TeacherAndAssistantCount(@course) %> <% student_num = studentCount(@course) %> <% course_file_num = visable_attachemnts_incourse(@course).count %> -

    +

    <%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cgrey') %>  >  <% if @course.syllabus %> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index a639e1203..1625241fa 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -22,7 +22,7 @@ <%= l(:label_partners)%>

  • - <%#= l(:label_co_organizer_EECS)%>北京大学 + <%#= l(:label_co_organizer_EECS)%>北京大学
  • <%#= l(:label_co_organizer_BHU)%>北京航空航天大学 diff --git a/app/views/layouts/_footer_show.html.erb b/app/views/layouts/_footer_show.html.erb index bb29956d3..19028ed8a 100644 --- a/app/views/layouts/_footer_show.html.erb +++ b/app/views/layouts/_footer_show.html.erb @@ -22,7 +22,7 @@ <%= l(:label_partners)%>
  • - <%#= l(:label_co_organizer_EECS)%>北京大学 + <%#= l(:label_co_organizer_EECS)%>北京大学
  • <%#= l(:label_co_organizer_BHU)%>北京航空航天大学 diff --git a/app/views/layouts/_new_footer.html.erb b/app/views/layouts/_new_footer.html.erb index 06f8c61e3..90b693053 100644 --- a/app/views/layouts/_new_footer.html.erb +++ b/app/views/layouts/_new_footer.html.erb @@ -13,7 +13,7 @@ <%= link_to image_tag('/images/footer_logo/nudt.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_NUDT)),"http://www.nudt.edu.cn/special.asp?classid=12", :target => "_blank"%>
  • - <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_EECS)), "http://eecs.pku.edu.cn", :target => "_blank"%> + <%= link_to image_tag('/images/footer_logo/peking_eecs.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_EECS)), "http://www.sei.pku.edu.cn/", :target => "_blank"%>
  • <%= link_to image_tag('/images/footer_logo/buaa_scse.png',:style => "width:90px;height:30px;",:alt=>l(:label_co_organizer_BHU)), "http://scse.buaa.edu.cn/", :target => "_blank"%> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index ed54fcdce..7401a9c92 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -1,6 +1,6 @@ <%# course_model %> -<%# course_file_num = visable_attachemnts_incourse(@course).count%> -<% course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> +<% course_file_num = visable_attachemnts_incourse(@course).count%> +<%# course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> <% homework_num = visable_course_homework @course %> @@ -131,10 +131,13 @@ <%= render :partial => 'courses/course_activity_users', :locals => {:course => @course} %> <%# 课程英雄榜 %> <%= render :partial => 'courses/course_heroes', :locals => {:course => @course} %> -
    +

    班级推荐

    <%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
    + <%# 更新访问数,刷新的时候更新访问次数 %> + <% update_visiti_count @course %> +
    访问计数 <%= @course.visits.to_i %> (自2016年5月)
    <%= yield %> diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index d1084c794..e60593387 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -110,8 +110,10 @@
  • <% else %> - <%=image_tag(url_to_avatar(@user),width:"74", height: "74")%> - <% end %> + + <%=image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_source_tx') %> + + <% end %> <% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %> <% end %> @@ -214,6 +216,8 @@
    + <%# 更新访问数,刷新的时候更新访问次数 %> + <% update_visiti_count @user %>
    访问计数 <%= @user.visits.to_i %> (自2016年5月)
    diff --git a/app/views/organizations/_org_member_list.html.erb b/app/views/organizations/_org_member_list.html.erb index 8af7986fc..ea715d513 100644 --- a/app/views/organizations/_org_member_list.html.erb +++ b/app/views/organizations/_org_member_list.html.erb @@ -32,8 +32,8 @@ <% end %> <% if ( (User.current.id == member.organization.creator_id || User.current.admin_of_org?(member.organization) ) && member.user_id != member.organization.creator_id )%> - 编辑 - 删除 + 编辑 + 删除 <%#= link_to '删除', Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %><% end %>
    diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index f1a8da8e4..6ba5b0a70 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -106,7 +106,7 @@ <%= render :partial=>"org_member_list",:locals=> {:members=>@organization.org_members} %>
    -
    +

    添加成员

    <%= form_tag url_for(:controller => 'org_member', :action => 'create', :org => @organization),:id=>'org_member_add_form',:remote=>true do |f|%> diff --git a/public/images/footer_logo/CVICSE.png b/public/images/footer_logo/CVICSE.png index c252e0f93..6fa4566f7 100644 Binary files a/public/images/footer_logo/CVICSE.png and b/public/images/footer_logo/CVICSE.png differ diff --git a/public/images/footer_logo/ISCAS_logo.png b/public/images/footer_logo/ISCAS_logo.png index 7c2eb9ff7..f682f6ee0 100644 Binary files a/public/images/footer_logo/ISCAS_logo.png and b/public/images/footer_logo/ISCAS_logo.png differ diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index fbce13354..c275aec90 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -398,7 +398,7 @@ a:hover.c_grey{ color:#333;} .fontGrey2 {color:#888888;} .fontGrey3 {color:#484848;} .fontGrey4{color:#999999;} -.fontGrey5 {color:#a1a1a1;} +.fontGrey5 {color:#ddd;} .fontGrey6 {color:#7a7a7a;} .fontGrey7 {color:#555;} .fontBlue {color:#3498db;} diff --git a/public/stylesheets/css/org.css b/public/stylesheets/css/org.css index 3677c8bd8..3ce1eca33 100644 --- a/public/stylesheets/css/org.css +++ b/public/stylesheets/css/org.css @@ -17,14 +17,14 @@ .orgUrlInput {width:200px; outline:none; border:1px solid #eaeaea; height:22px;} a.saveBtn {padding:2px 10px; background-color:#269ac9; color:#ffffff;} a.saveBtn:hover {background-color:#297fb8;} -.orgMemberList {width:420px; float:left;} +.orgMemberList {width:300px; float:left;} .orgColumnList {width:688px; float:left;} .orgListUser {width:110px; float:left;padding-right: 10px;} -.orgListRole {width:180px; float:left;} +.orgListRole {width:100px; float:left;} .orgOrder {width:70px; float:left; text-align:center;} .orgSubNum {width:30px; float:left; text-align:center;} .subNumBlock {cursor:pointer;background-color:#fffce6;color: #0d90c3; width:30px; height:17px; line-height:17px; margin:7px 0; vertical-align:middle;} -.orgMemContainer {width:268px;} +.orgMemContainer {width:378px;} .orgMemberAdd {float:right;} .orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;} diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 1d2c106e2..729bf2f4a 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -199,7 +199,7 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostBrief {width:720px; margin:0px auto; position:relative;} .homepagePostPortrait {float:left; width:50px;} .homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;} -.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;} +.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px; margin-right: 20px;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;} .homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}