From 326730f6b1c96f21070958bde9467f3f0a626730 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 28 Mar 2016 10:39:09 +0800 Subject: [PATCH 001/122] =?UTF-8?q?=E5=8C=97=E6=96=97=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 9 +- app/views/layouts/base_org_newstyle.html.erb | 208 +++++++++++++++++++ 2 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 app/views/layouts/base_org_newstyle.html.erb diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index da0eb8009..6cd55be39 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -28,11 +28,18 @@ class OrganizationsController < ApplicationController helper :project_score helper :issues include UsersHelper - before_filter :find_organization, :only => [:show, :members, :apply_subdomain] + before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout] layout 'base_org' def index end + + # 组织风格判定 + # style:为0的时候为老式风格,1 为新式风格 + def select_org_layout + @org.style == 0 ? 'base_org' : 'base_org_newstyle' + end + def new @organization = Organization.new render :layout => 'new_base' diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb new file mode 100644 index 000000000..0296d20b4 --- /dev/null +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -0,0 +1,208 @@ +<% @nav_dispaly_project_label = 1 + @nav_dispaly_forum_label = 1 %> +<%#@nav_dispaly_project_label = 1 %> + + + + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= javascript_heads %> + <%= heads_for_theme %> + <%= stylesheet_link_tag 'pleft','prettify','jquery/jquery-ui-1.9.2','header','new_user','repository','courses','org', 'share' %> + <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> + <%= javascript_include_tag 'attachments' %> + <%= call_hook :view_layouts_base_html_head %> + + <%= yield :header_tags -%> + + + + + + + + +
+
+ +
    + + <% if User.current.logged? %> + + + <% else %> + + + <% end %> +
+ +
+
+
+
+
+
+
+ + + + + +
+ <%= link_to truncate(@organization.name,:length => 26), organization_path(@organization.id), :class=>"pr_info_name c_dark fb break_word" %> + <% if User.current.logged? %> + <% if @organization.is_public? %> + <%= l(:label_public)%> + <% else %> + <%= l(:label_private)%> + <% end %> + <% end %> +
+ + <% if User.current.admin_of_org?(@organization) %> + 配置 + <% end %> + + + + + + + + + + +
+
+ <%= link_to '文章', organization_org_document_comments_path(@organization) %>  + <%# if User.current.logged? %> + ( + <%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %> + ) + <%# end %> + <% if User.current.logged? %> +  |  + <%= link_to '成员', members_organization_path(@organization.id) %>  + (<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>) + <% end %> +
+
+
+ <%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %> +
+
访问计数 <%= @organization.visits.to_i %>
+
+
+ <%= render_flash_messages %> + <%= yield %> + <%= call_hook :view_layouts_base_content %> +
+
+
+
+ + +
+ +
+ + + + + + + + From f4b4bf40ded56a0e892fbb4071328be7517530d4 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 28 Mar 2016 11:24:31 +0800 Subject: [PATCH 002/122] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=98=BE=E7=A4=BA=E6=A8=A1=E5=BC=8F=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E5=B9=B6=E4=B8=94=E5=9C=A8=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=92=8C=E9=85=8D=E7=BD=AE=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E4=B8=AD=E8=83=BD=E5=A4=9F=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 ++ app/views/organizations/new.html.erb | 7 +++++++ app/views/organizations/setting.html.erb | 14 ++++++++++++++ ...22312_add_coulumn_show_mode_to_organizations.rb | 5 +++++ ...160328022623_set_show_mode_for_organizations.rb | 12 ++++++++++++ 5 files changed, 40 insertions(+) create mode 100644 db/migrate/20160328022312_add_coulumn_show_mode_to_organizations.rb create mode 100644 db/migrate/20160328022623_set_show_mode_for_organizations.rb diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index da0eb8009..80f196ba5 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -56,6 +56,7 @@ class OrganizationsController < ApplicationController @organization.description = params[:organization][:description] @organization.is_public = params[:organization][:is_public] @organization.allow_guest_download = params[:organization][:allow_guest_download] == '1' ? 1 : 0 + @organization.show_mode = params[:show_mode] @organization.creator_id = User.current.id member = OrgMember.new(:user_id => User.current.id) @@ -120,6 +121,7 @@ class OrganizationsController < ApplicationController # @organization.domain = params[:organization][:domain] @organization.is_public = params[:organization][:is_public] == 'on' ? 1 : 0 @organization.allow_guest_download = params[:organization][:allow_guest_download] == 'on' ? 1 : 0 + @organization.show_mode = params[:show_mode] #@organization.name = params[:organization][:name] @organization.save respond_to do |format| diff --git a/app/views/organizations/new.html.erb b/app/views/organizations/new.html.erb index b0c961d82..efe481b77 100644 --- a/app/views/organizations/new.html.erb +++ b/app/views/organizations/new.html.erb @@ -28,6 +28,13 @@ value:"#{User.current.id.to_s + '_' +Time.now.to_s.gsub(' ','_').gsub(':','').gsub('+','')}" %>

+
  • + 显示模式    : + + + + +
  • diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index c0ca2cfe4..b11e5a780 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -72,6 +72,20 @@
    +
    + 显示模式 : + <% if @organization.show_mode == 0 %> + + + + + <% else %> + + + + + <% end %> +
    公开 : class="ml3" />
    diff --git a/db/migrate/20160328022312_add_coulumn_show_mode_to_organizations.rb b/db/migrate/20160328022312_add_coulumn_show_mode_to_organizations.rb new file mode 100644 index 000000000..11f3fa22e --- /dev/null +++ b/db/migrate/20160328022312_add_coulumn_show_mode_to_organizations.rb @@ -0,0 +1,5 @@ +class AddCoulumnShowModeToOrganizations < ActiveRecord::Migration + def change + add_column :organizations, :show_mode, :integer, :default => 0 + end +end diff --git a/db/migrate/20160328022623_set_show_mode_for_organizations.rb b/db/migrate/20160328022623_set_show_mode_for_organizations.rb new file mode 100644 index 000000000..719dfc1ff --- /dev/null +++ b/db/migrate/20160328022623_set_show_mode_for_organizations.rb @@ -0,0 +1,12 @@ +class SetShowModeForOrganizations < ActiveRecord::Migration + def up + Organization.transaction do + Organization.all.each do |org| + org.update_attribute(:show_mode, 0) + end + end + end + + def down + end +end From 67ff9fb6e2cde66514800aba2c1bdc106c7387e3 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 28 Mar 2016 13:03:13 +0800 Subject: [PATCH 003/122] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/setting.html.erb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index b11e5a780..39848d192 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -74,17 +74,10 @@
    显示模式 : - <% if @organization.show_mode == 0 %> - - - - - <% else %> - - - - - <% end %> + /> + + /> +
    公开 : class="ml3" /> From 4b6b5504cabd144adc9fed212c553c668173b645 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 28 Mar 2016 14:11:40 +0800 Subject: [PATCH 004/122] =?UTF-8?q?=E5=8C=97=E6=96=97=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=EF=BC=88=E6=9C=AA=E5=AE=8C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 +- app/views/layouts/base_org_newstyle.html.erb | 584 +++++++++++++----- public/images/org_new_style/bg.jpg | Bin 0 -> 55689 bytes public/images/org_new_style/bg2.jpg | Bin 0 -> 31668 bytes public/images/org_new_style/con-left1.jpg | Bin 0 -> 6345 bytes public/images/org_new_style/con-left2.jpg | Bin 0 -> 4417 bytes public/images/org_new_style/con-right.gif | Bin 0 -> 1894 bytes public/images/org_new_style/detailimg1.jpg | Bin 0 -> 50723 bytes public/images/org_new_style/detailimg2.jpg | Bin 0 -> 33550 bytes public/images/org_new_style/detailimg3.jpg | Bin 0 -> 22446 bytes public/images/org_new_style/detailimg4.jpg | Bin 0 -> 32803 bytes .../org_new_style/header-background.jpg | Bin 0 -> 134016 bytes public/images/org_new_style/icons.png | Bin 0 -> 39862 bytes public/images/org_new_style/img1.jpg | Bin 0 -> 27550 bytes public/images/org_new_style/img2.jpg | Bin 0 -> 25093 bytes public/images/org_new_style/logo.jpg | Bin 0 -> 16979 bytes public/images/org_new_style/pic1.jpg | Bin 0 -> 57968 bytes public/images/org_new_style/pic2.jpg | Bin 0 -> 54611 bytes public/images/org_new_style/pic3.jpg | Bin 0 -> 34750 bytes public/images/org_new_style/slide1.png | Bin 0 -> 235600 bytes public/images/org_new_style/slide2.png | Bin 0 -> 232903 bytes public/stylesheets/org_new_style.css | 182 ++++++ 22 files changed, 604 insertions(+), 164 deletions(-) create mode 100644 public/images/org_new_style/bg.jpg create mode 100644 public/images/org_new_style/bg2.jpg create mode 100644 public/images/org_new_style/con-left1.jpg create mode 100644 public/images/org_new_style/con-left2.jpg create mode 100644 public/images/org_new_style/con-right.gif create mode 100644 public/images/org_new_style/detailimg1.jpg create mode 100644 public/images/org_new_style/detailimg2.jpg create mode 100644 public/images/org_new_style/detailimg3.jpg create mode 100644 public/images/org_new_style/detailimg4.jpg create mode 100644 public/images/org_new_style/header-background.jpg create mode 100644 public/images/org_new_style/icons.png create mode 100644 public/images/org_new_style/img1.jpg create mode 100644 public/images/org_new_style/img2.jpg create mode 100644 public/images/org_new_style/logo.jpg create mode 100644 public/images/org_new_style/pic1.jpg create mode 100644 public/images/org_new_style/pic2.jpg create mode 100644 public/images/org_new_style/pic3.jpg create mode 100644 public/images/org_new_style/slide1.png create mode 100644 public/images/org_new_style/slide2.png create mode 100644 public/stylesheets/org_new_style.css diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 6cd55be39..68bcd2b22 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -29,7 +29,7 @@ class OrganizationsController < ApplicationController helper :issues include UsersHelper before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout] - layout 'base_org' + layout 'base_org_newstyle' def index end diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 0296d20b4..bdfec084f 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -1,6 +1,3 @@ -<% @nav_dispaly_project_label = 1 - @nav_dispaly_forum_label = 1 %> -<%#@nav_dispaly_project_label = 1 %> @@ -12,8 +9,8 @@ <%= favicon %> <%= javascript_heads %> <%= heads_for_theme %> - <%= stylesheet_link_tag 'pleft','prettify','jquery/jquery-ui-1.9.2','header','new_user','repository','courses','org', 'share' %> - <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> + <%= stylesheet_link_tag 'org_new_style' %> + <%= javascript_include_tag 'org'%> <%= javascript_include_tag 'attachments' %> <%= call_hook :view_layouts_base_html_head %> @@ -29,138 +26,434 @@ showMathMenuMSIE: false, tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} }); - + + + -
    -
    - -
      - - <% if User.current.logged? %> - - - <% else %> - - - <% end %> -
    - -
    -
    -
    -
    -
    -
    - - - - - -
    - <%= link_to truncate(@organization.name,:length => 26), organization_path(@organization.id), :class=>"pr_info_name c_dark fb break_word" %> - <% if User.current.logged? %> - <% if @organization.is_public? %> - <%= l(:label_public)%> - <% else %> - <%= l(:label_private)%> - <% end %> - <% end %> -
    - - <% if User.current.admin_of_org?(@organization) %> - 配置 - <% end %> - - - - - - - - - - -
    -
    - <%= link_to '文章', organization_org_document_comments_path(@organization) %>  - <%# if User.current.logged? %> - ( - <%= link_to OrgDocumentComment.where("organization_id =? and parent_id is null", @organization.id).count, organization_org_document_comments_path(@organization), :class => "linkBlue" %> - ) - <%# end %> - <% if User.current.logged? %> -  |  - <%= link_to '成员', members_organization_path(@organization.id) %>  - (<%= link_to @organization.org_members.count, members_organization_path(@organization.id), :id => 'org_members_count_id', :class => "linkBlue" %>) - <% end %> -
    -
    -
    - <%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %> -
    -
    访问计数 <%= @organization.visits.to_i %>
    -
    -
    - <%= render_flash_messages %> - <%= yield %> - <%= call_hook :view_layouts_base_content %> -
    -
    -
    -
    - - -
    -
  • -
  • - 显示模式    : - - - - -
  • + + + + + + +
  • diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index 39848d192..2676105d3 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -72,13 +72,13 @@
    -
    - 显示模式 : - /> - - /> - -
    + + + + + + +
    公开 : class="ml3" />
    From 0b0f484a5b1f623cf4443a345eb9fd7d777760e2 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Mar 2016 09:50:37 +0800 Subject: [PATCH 014/122] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=B4=E6=96=87?= =?UTF-8?q?=E6=A4=8D=E7=9A=84=E5=88=86=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...29014316_update_one_student_teacher_score.rb | 17 +++++++++++++++++ db/schema.rb | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20160329014316_update_one_student_teacher_score.rb diff --git a/db/migrate/20160329014316_update_one_student_teacher_score.rb b/db/migrate/20160329014316_update_one_student_teacher_score.rb new file mode 100644 index 000000000..cf56db220 --- /dev/null +++ b/db/migrate/20160329014316_update_one_student_teacher_score.rb @@ -0,0 +1,17 @@ +class UpdateOneStudentTeacherScore < ActiveRecord::Migration + def up + work = StudentWork.find 49774 + score = StudentWorksScore.new + score.score = 100 + score.user_id = 7318 + score.student_work_id = work.id + score.reviewer_role = 1 + if score.save + work.teacher_score = score.score + end + work.save + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index aeabe0ae0..28931468b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20160325030423) do +ActiveRecord::Schema.define(:version => 20160329014316) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false From 90fd52970bff03449fcf179cfde7d77afeff85c3 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Tue, 29 Mar 2016 10:15:18 +0800 Subject: [PATCH 015/122] =?UTF-8?q?fix=20bugger=20on=20=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 7 + .../users/_resource_share_for_orgs.html.erb | 2 +- ..._resource_share_for_project_popup.html.erb | 108 ++++++------ .../users/_resource_share_popup.html.erb | 112 ++++++------ app/views/users/_resources_list.html.erb | 164 ++++++++++++++++++ app/views/users/_user_resource_info.html.erb | 163 ----------------- .../users/add_exist_file_to_course.js.erb | 1 + app/views/users/add_exist_file_to_org.js.erb | 1 + .../users/add_exist_file_to_project.js.erb | 1 + app/views/users/search_user_course.js.erb | 2 +- app/views/users/search_user_org.js.erb | 28 +-- app/views/users/search_user_project.js.erb | 32 ++-- app/views/users/user_resource_create.js.erb | 1 - app/views/users/user_resource_delete.js.erb | 26 +-- 14 files changed, 329 insertions(+), 319 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 1cf4534bb..efe968d3b 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1679,6 +1679,7 @@ class UsersController < ApplicationController end @status = params[:status] @type = params[:type] + @path = user_resource_user_path(User.current, :type => @type) @limit = 25 @is_remote = true @atta_count = @attachments.count @@ -1703,6 +1704,7 @@ class UsersController < ApplicationController .select { |course| @user.allowed_to?(:as_teacher,course) and course.is_delete == 0 } end @search = params[:search] + @type = params[:type] #这里仅仅是传递需要发送的资源id @send_id = params[:send_id] @send_ids = params[:checkbox1] || params[:send_ids] @@ -1721,6 +1723,7 @@ class UsersController < ApplicationController @projects = @user.projects.visible end @search = params[:search] + @type = params[:type] #这里仅仅是传递需要发送的资源id @send_id = params[:send_id] @send_ids = params[:checkbox1] || params[:send_ids] #搜索的时候 和 直接 用表格提交的时候的send_ids @@ -1822,6 +1825,7 @@ class UsersController < ApplicationController "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))").order("created_on desc") @type = params[:type] @limit = 25 + @path = user_resource_user_path(User.current, :type => @type) @user = User.current @is_remote = true @atta_count = @attachments.count @@ -1933,6 +1937,7 @@ class UsersController < ApplicationController "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))").order("created_on desc") @type = params[:type] @limit = 25 + @path = user_resource_user_path(User.current, :type => @type) @user = User.current @is_remote = true @atta_count = @attachments.count @@ -2031,6 +2036,7 @@ class UsersController < ApplicationController "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))").order("created_on desc") @type = params[:type] @limit = 25 + @path = user_resource_user_path(User.current, :type => @type) @user = User.current @is_remote = true @atta_count = @attachments.count @@ -2723,6 +2729,7 @@ class UsersController < ApplicationController name = "%"+name+"%" @orgs = User.current.organizations.where("name like ?", name) @user = User.current + @type = params[:type] respond_to do |format| format.html {render :layout => 'static_base'} format.js diff --git a/app/views/users/_resource_share_for_orgs.html.erb b/app/views/users/_resource_share_for_orgs.html.erb index 792db7546..166d0f82b 100644 --- a/app/views/users/_resource_share_for_orgs.html.erb +++ b/app/views/users/_resource_share_for_orgs.html.erb @@ -18,7 +18,7 @@ <% end %>
    -<%= form_tag add_exist_file_to_org_user_path(user),:remote=>true,:id=>'orgs_list_form' do %> +<%= form_tag add_exist_file_to_org_user_path(user, :type => type),:remote=>true,:id=>'orgs_list_form' do %> <%= hidden_field_tag(:send_id, send_id) %> <%= hidden_field_tag(:send_ids, send_ids) %>
    diff --git a/app/views/users/_resource_share_for_project_popup.html.erb b/app/views/users/_resource_share_for_project_popup.html.erb index 33fa03061..aa42b22cc 100644 --- a/app/views/users/_resource_share_for_project_popup.html.erb +++ b/app/views/users/_resource_share_for_project_popup.html.erb @@ -1,54 +1,54 @@ -
    -
    -
    发送到
    -
    - -
    -
    -
    - -
    - <%= form_tag search_user_project_user_path(user),:method => 'get', - :remote=>true,:id=>'search_user_project_form',:class=>'resourcesSearchBox' do %> - <%= hidden_field_tag(:send_id, send_id) %> - <%= hidden_field_tag(:send_ids, send_ids) %> - - - - <%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %> - <% end %> -
    - <%= form_tag add_exist_file_to_project_user_path(user), :remote => true, :id=>'projects_list_form' %> -
    - - <%= hidden_field_tag(:send_id, send_id) %> - <%= hidden_field_tag(:send_ids, send_ids) %> -
    - <% if !projects.empty? %> - <% projects.each do |project| %> -
      -
    • - -
    • -
    • <%= project.name%>
    • -
    - <% end %> -
    -
    -
    -
    - - <%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %> -
    - -
    -
    - <% end %> -
    - +
    +
    +
    发送到
    +
    + +
    +
    +
    + +
    + <%= form_tag search_user_project_user_path(user),:method => 'get', + :remote=>true,:id=>'search_user_project_form',:class=>'resourcesSearchBox' do %> + <%= hidden_field_tag(:send_id, send_id) %> + <%= hidden_field_tag(:send_ids, send_ids) %> + + + + <%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %> + <% end %> +
    + <%= form_tag add_exist_file_to_project_user_path(user, :type => type), :remote => true, :id=>'projects_list_form' %> +
    + + <%= hidden_field_tag(:send_id, send_id) %> + <%= hidden_field_tag(:send_ids, send_ids) %> +
    + <% if !projects.empty? %> + <% projects.each do |project| %> +
      +
    • + +
    • +
    • <%= project.name%>
    • +
    + <% end %> +
    +
    +
    +
    + + <%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %> +
    + +
    +
    + <% end %> +
    + diff --git a/app/views/users/_resource_share_popup.html.erb b/app/views/users/_resource_share_popup.html.erb index 74265cabb..ba0eeb21e 100644 --- a/app/views/users/_resource_share_popup.html.erb +++ b/app/views/users/_resource_share_popup.html.erb @@ -1,56 +1,56 @@ - - -
    -
    -
    发送到
    -
    - -
    -
    -
    - -
    - <%= form_tag search_user_course_user_path(user),:method => 'get', - :remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %> - <%= hidden_field_tag(:send_id, send_id) %> - <%= hidden_field_tag(:send_ids, send_ids) %> - - - - <%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %> - <% end %> -
    - <%= form_tag add_exist_file_to_course_user_path(user),:remote=>true,:id=>'course_list_form' %> -
    - - <%= hidden_field_tag(:send_id, send_id) %> - <%= hidden_field_tag(:send_ids, send_ids) %> -
    - <% if !courses.empty? %> - <% courses.each do |course| %> -
      -
    • - -
    • -
    • <%= truncate(course.name,:lendght=>25) + '['+course.time.to_s+course.term + ']'%>
    • -
    - <% end %> -
    -
    -
    -
    - - <%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %> -
    - -
    -
    - <% end %> -
    - + + +
    +
    +
    发送到
    +
    + +
    +
    +
    + +
    + <%= form_tag search_user_course_user_path(user),:method => 'get', + :remote=>true,:id=>'search_user_course_form',:class=>'resourcesSearchBox' do %> + <%= hidden_field_tag(:send_id, send_id) %> + <%= hidden_field_tag(:send_ids, send_ids) %> + + + + <%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %> + <% end %> +
    + <%= form_tag add_exist_file_to_course_user_path(user, :type => type),:remote=>true,:id=>'course_list_form' %> +
    + + <%= hidden_field_tag(:send_id, send_id) %> + <%= hidden_field_tag(:send_ids, send_ids) %> +
    + <% if !courses.empty? %> + <% courses.each do |course| %> +
      +
    • + +
    • +
    • <%= truncate(course.name,:lendght=>25) + '['+course.time.to_s+course.term + ']'%>
    • +
    + <% end %> +
    +
    +
    +
    + + <%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();' %> +
    + +
    +
    + <% end %> +
    + diff --git a/app/views/users/_resources_list.html.erb b/app/views/users/_resources_list.html.erb index 69b512653..b8551f7c5 100644 --- a/app/views/users/_resources_list.html.erb +++ b/app/views/users/_resources_list.html.erb @@ -28,4 +28,168 @@ diff --git a/app/views/users/_user_resource_info.html.erb b/app/views/users/_user_resource_info.html.erb index 0a3f94bb3..a3bc45481 100644 --- a/app/views/users/_user_resource_info.html.erb +++ b/app/views/users/_user_resource_info.html.erb @@ -207,93 +207,6 @@ $("#res_count").html(0); } } - - function show_upload(){ - $("#ajax-modal").html('<%= escape_javascript( render :partial => 'upload_resource' ,:locals => {:user=>User.current.id,:type=>@type,:status=>@status})%>'); - showModal('ajax-modal', '452px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before(""); - $('#ajax-modal').parent().css("top","50%").css("left","50%").css("position","absolute"); - $('#ajax-modal').parent().addClass("resourceUploadPopup"); - $('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); - } - //批量删除 - function batch_delete(){ - var data = $("#resources_list_form").serialize(); - if($("input[type=checkbox][data-has-history=Y]:checked").length != 0){ - alert("您只能删除没有历史记录的资源,请重新选择后再删除。"); - return; - } - if($("input[type=checkbox][data-deleteble=N]:checked").length != 0){ - alert("您只能删除自己上传的资源,请重新选择后再删除。"); - return; - } - - if(data != "" && confirm('确认要删除这些资源吗?')) { - $.post( - '<%= user_resource_delete_user_path(User.current.id,:type=>@type,:status=>@status)%>', - $("#resources_list_form").serialize(),//只会对选中的控件进行序列化提交 - function (data) { - - } - ); - } - } - - - - function show_send(){ - $("#contextMenu").hide(); - document.oncontextmenu = function() {return true;} - line.children().css("background-color",'white'); - id = line.children().last().html(); - if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 - $.ajax({ - type: 'get', - url: '<%= search_user_project_user_path(User.current.id)%>' + '?send_id=' + id, - data:{send_type:'file'} - }); - }else{ - $.ajax({ - type: 'get', - url: '<%= search_user_course_user_path(User.current.id)%>' + '?send_id=' + id, - data:{send_type:'file'} - }); - } - } - - function batch_send(){ - if($("#resources_list_form").serialize() == ""){ - alert('暂时不支持多页选择,您当前页没有选择任何资源'); - return ; - } - if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 - $.ajax({ - type: 'get', - url: '<%= search_user_project_user_path(User.current.id)%>' + '?' + $("#resources_list_form").serialize(), - data:{send_type:'file'} - }); - }else{ - $.ajax({ - type: 'get', - url: '<%= search_user_course_user_path(User.current.id)%>' + '?'+ $("#resources_list_form").serialize(), - data:{send_type:'file'} - }); - - } - } - - function preview(){ - $("#contextMenu").hide(); - document.oncontextmenu = function() {return true;} - line.children().css("background-color",'white'); - id = line.children().last().html(); - $.ajax({ - type:'get', - url:'<%= resource_preview_user_path(User.current.id)%>'+"?resource_id="+id - }); - } - function rename(){ $("#contextMenu").hide(); document.oncontextmenu = function() {return true;} @@ -315,80 +228,4 @@ alert('您无法修改此资源!') } } - String.prototype.trim = function() { - var str = this, - str = str.replace(/^\s\s*/, ''), - ws = /\s/, - i = str.length; - while (ws.test(str.charAt(--i))); - return str.slice(0, i + 1); - } - - - - //恢复编辑状态到链接状态 - //如果当前是编辑状态,任何的不在输入框里的单击右键事件都需要将编辑状态变回链接状态 - //如果是编辑状态,且做了修改,那么久要进行修改,并且将修改值经过处理替换到页面显示 - function restore(){ - //上一行不为空 且链接不为空 - if( last_line != null && res_link != null && res_link != '') { - name = $("#res_name").lenght != 0 && $("#res_name").val() != undefined ? $("#res_name").val().trim() : undefined ; - if (name == undefined || name === 'undefined' ){ //只要res_name没有值,那么就不是编辑状态 - return; - } - if( name && name != res_name.trim()){ - - if(confirm('确定修改为 '+name)){ - $.ajax({ - url: '<%=rename_resource_user_path(User.current.id) %>'+ "?res_name="+$('#res_name').val() + "&res_id=" + $("#res_id").val(), - type:'get', - success:function (data) - { - if (data != 'fail' && name != undefined && name != 'undefined') {//修改成功,那么将链接恢复,并且将链接的显示内容改变。链接可以不变 - last_line.children().eq(1).html(res_link); - last_line.children().eq(1).children().attr('title', name); - last_line.children().eq(1).children().attr('href', data); - last_line.children().eq(1).children().html(name.length > 17 ? name.substring(0, 17) + '...' : name); - } else { - last_line.children().eq(1).html(res_link); - res_link = null; //如果修改失败,恢复之后将res_link置空 - } - } - } ); - }else{ - last_line.children().eq(1).html(res_link); - res_link = null; //如果没有做修改,恢复之后将res_link置空 - } - }else { - last_line.children().eq(1).html(res_link); - res_link = null;//如果没有做修改,恢复之后将res_link置空 - } - - - } - } - - function delete_file() { - $("#contextMenu").hide(); - document.oncontextmenu = function () { - return true; - } - line.children().css("background-color", 'white'); - id = line.children().last().html(); - user_id = line.children().eq(5).html(); - if(line.children().first().children().data('hasHistory') == 'Y'){ - alert('该资源存在历史版本,不能删除'); - return; - } - if(user_id === '<%= User.current.id%>') { - if (confirm('确定要删除资源"' + line.children().eq(1).children().attr('title').trim() + '"么?')) { - $.ajax({ - type: 'post', - url: '<%= user_resource_delete_user_path(User.current.id)%>' + '?resource_id=' + id + '&type=<%=@type %>&status=<%=@status %>' - }); - } - }else{ - alert('您无法删除此资源!') - } - } \ No newline at end of file diff --git a/app/views/users/add_exist_file_to_course.js.erb b/app/views/users/add_exist_file_to_course.js.erb index c05a2ebd0..8db83aefc 100644 --- a/app/views/users/add_exist_file_to_course.js.erb +++ b/app/views/users/add_exist_file_to_course.js.erb @@ -1,6 +1,7 @@ <% if @flag == true%> $("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>'); $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); +$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>'); $("#res_count").html(0); $("#checkboxAll").attr('checked',false); $("#res_all_count").html(<%= @atta_count%>); diff --git a/app/views/users/add_exist_file_to_org.js.erb b/app/views/users/add_exist_file_to_org.js.erb index 9bfe1230a..c6e7f4011 100644 --- a/app/views/users/add_exist_file_to_org.js.erb +++ b/app/views/users/add_exist_file_to_org.js.erb @@ -1,6 +1,7 @@ <% if @flag == true%> $("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>'); $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); +$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>'); $("#res_count").html(0); $("#checkboxAll").attr('checked',false); $("#res_all_count").html(<%= @atta_count%>); diff --git a/app/views/users/add_exist_file_to_project.js.erb b/app/views/users/add_exist_file_to_project.js.erb index ed38fa066..4c24f4932 100644 --- a/app/views/users/add_exist_file_to_project.js.erb +++ b/app/views/users/add_exist_file_to_project.js.erb @@ -1,6 +1,7 @@ <% if @flag == true%> $("#search_div").html('<%= escape_javascript( render :partial => 'resource_search_form',:locals => {:user=>@user,:type=>@type} ) %>'); $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); +$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>'); $("#res_count").html(0); $("#checkboxAll").attr('checked',false); $("#res_all_count").html(<%= @atta_count%>); diff --git a/app/views/users/search_user_course.js.erb b/app/views/users/search_user_course.js.erb index f4509987f..5556d3c92 100644 --- a/app/views/users/search_user_course.js.erb +++ b/app/views/users/search_user_course.js.erb @@ -12,7 +12,7 @@ <% if params[:send_type].present? && params[:send_type] == 'news' %> $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_course' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); <% elsif params[:send_type] == 'file' %> -$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_popup' , :locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids, :type => @type}) %>'); <% elsif params[:send_type] == 'message' %> $("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_course' ,:locals => {:courses => @course, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); <% end %> diff --git a/app/views/users/search_user_org.js.erb b/app/views/users/search_user_org.js.erb index ee12e9439..7461dbfda 100644 --- a/app/views/users/search_user_org.js.erb +++ b/app/views/users/search_user_org.js.erb @@ -1,15 +1,15 @@ -<% if params[:send_type].present? && params[:send_type] == 'news' %> -$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); -<% elsif params[:send_type] == 'file' %> -$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_orgs' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); -<% elsif params[:send_type] == 'message' %> -$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); -<% end %> -showModal('ajax-modal', '452px'); -$('#ajax-modal').siblings().remove(); -$('#ajax-modal').before(""); -$('#ajax-modal').parent().css("top","50%").css("left","50%"); -$('#ajax-modal').parent().addClass("popbox").addClass("shareDP"); -$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); -var val = $("#search_org_input").val(); +<% if params[:send_type].present? && params[:send_type] == 'news' %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); +<% elsif params[:send_type] == 'file' %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_orgs' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids, :type => @type})%>'); +<% elsif params[:send_type] == 'message' %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_org' ,:locals => {:orgs=>@orgs,:user=>@user,:send_id=>@send_id,:send_ids=>@send_ids})%>'); +<% end %> +showModal('ajax-modal', '452px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before(""); +$('#ajax-modal').parent().css("top","50%").css("left","50%"); +$('#ajax-modal').parent().addClass("popbox").addClass("shareDP"); +$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); +var val = $("#search_org_input").val(); $("#search_org_input").val("").focus().val(val); \ No newline at end of file diff --git a/app/views/users/search_user_project.js.erb b/app/views/users/search_user_project.js.erb index d58c56ca9..50a194814 100644 --- a/app/views/users/search_user_project.js.erb +++ b/app/views/users/search_user_project.js.erb @@ -1,16 +1,16 @@ -<% if params[:send_type].present? && params[:send_type] == 'news' %> -$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); -<% elsif params[:send_type] == 'file' %> -$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_project_popup', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); -<% elsif params[:send_type] == 'message' %> -$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); -<% end %> -showModal('ajax-modal', '452px'); -$('#ajax-modal').siblings().remove(); -$('#ajax-modal').before(""); -$('#ajax-modal').parent().css("top","50%").css("left","50%"); -$('#ajax-modal').parent().addClass("resourceUploadPopup").addClass("popbox") -$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); -//$("#search_project_input").focus(); -var val = $("#search_project_input").val(); -$("#search_project_input").val("").focus().val(val); +<% if params[:send_type].present? && params[:send_type] == 'news' %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_news_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); +<% elsif params[:send_type] == 'file' %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/resource_share_for_project_popup', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids, :type => @type}) %>'); +<% elsif params[:send_type] == 'message' %> +$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/share_message_to_project', :locals => {:projects => @projects, :user => @user, :send_id => @send_id, :send_ids => @send_ids}) %>'); +<% end %> +showModal('ajax-modal', '452px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before(""); +$('#ajax-modal').parent().css("top","50%").css("left","50%"); +$('#ajax-modal').parent().addClass("resourceUploadPopup").addClass("popbox") +$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px"); +//$("#search_project_input").focus(); +var val = $("#search_project_input").val(); +$("#search_project_input").val("").focus().val(val); diff --git a/app/views/users/user_resource_create.js.erb b/app/views/users/user_resource_create.js.erb index cc7e543c8..d28898e0a 100644 --- a/app/views/users/user_resource_create.js.erb +++ b/app/views/users/user_resource_create.js.erb @@ -1,7 +1,6 @@ closeModal(); $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); $("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>'); -debugger $("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>'); $("#res_all_count").html(<%= @atta_count%>); $("#res_count").html(0); diff --git a/app/views/users/user_resource_delete.js.erb b/app/views/users/user_resource_delete.js.erb index 9583274c6..ffb056e28 100644 --- a/app/views/users/user_resource_delete.js.erb +++ b/app/views/users/user_resource_delete.js.erb @@ -1,14 +1,14 @@ -$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); -$("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>'); -$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); -$("#res_all_count").html(<%= @atta_count%>); -$("#res_count").html(0); -$("#checkboxAll").attr('checked',false); -//更新状态 -$("#public_resource_list").attr('href','<%= user_resource_user_path(@user, :type => '6') %>'); -$("#my_resource_list").attr('href','<%= user_resource_user_path(@user, :type => '1') %>'); -$("#resource_type_all").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 1, :search => @switch_search) %>'); -$("#resource_type_course").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 2, :search => @switch_search) %>'); -$("#resource_type_project").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 3, :search => @switch_search) %>'); -$("#resource_type_user").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 5, :search => @switch_search) %>'); +$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); +$("#resource_tip_list").html('<%= escape_javascript( render :partial => 'users/user_resource_tip_list', :locals => {:user => @user, :type => @type, :status => @status}) %>'); +$("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true, :path => @path %>'); +$("#res_all_count").html(<%= @atta_count%>); +$("#res_count").html(0); +$("#checkboxAll").attr('checked',false); +//更新状态 +$("#public_resource_list").attr('href','<%= user_resource_user_path(@user, :type => '6') %>'); +$("#my_resource_list").attr('href','<%= user_resource_user_path(@user, :type => '1') %>'); +$("#resource_type_all").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 1, :search => @switch_search) %>'); +$("#resource_type_course").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 2, :search => @switch_search) %>'); +$("#resource_type_project").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 3, :search => @switch_search) %>'); +$("#resource_type_user").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 5, :search => @switch_search) %>'); $("#resource_type_file").attr('href','<%= resource_search_user_path(@user,:type => @type, :status => 4, :search => @switch_search) %>'); \ No newline at end of file From 1daf620ed1da9bf3d662249fd31fea121df0ff2f Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Mar 2016 10:39:44 +0800 Subject: [PATCH 016/122] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E7=82=B9=E5=8F=96=E6=B6=88=E6=97=B6=E8=B7=B3=E5=88=B0=E6=88=91?= =?UTF-8?q?=E7=9A=84=E4=BD=9C=E4=B8=9A=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index ae33ccb07..43918ed10 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -581,7 +581,7 @@ class StudentWorkController < ApplicationController end end end - redirect_to user_homeworks_user_path(User.current.id) + redirect_to student_homeworks_user_path(User.current.id) end def retry_work From b80bc98fcb47b69f2546566ef73590bca659bb22 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 29 Mar 2016 11:31:58 +0800 Subject: [PATCH 017/122] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 111 +++++++----- app/views/layouts/base_org_newstyle.html.erb | 162 ++++++------------ .../_org_new_course_create.html.erb | 5 + .../_org_new_course_homework.html.erb | 5 + .../_org_new_course_message.html.erb | 18 ++ .../_org_new_course_news.html.erb | 5 + .../_org_new_course_poll.html.erb | 5 + .../_org_new_project_create.html.erb | 3 + .../_org_new_project_issues.html.erb | 4 + .../_org_new_project_message.html.erb | 15 ++ public/stylesheets/org_new_style.css | 2 +- 11 files changed, 185 insertions(+), 150 deletions(-) create mode 100644 app/views/organizations/_org_new_course_create.html.erb create mode 100644 app/views/organizations/_org_new_course_homework.html.erb create mode 100644 app/views/organizations/_org_new_course_message.html.erb create mode 100644 app/views/organizations/_org_new_course_news.html.erb create mode 100644 app/views/organizations/_org_new_course_poll.html.erb create mode 100644 app/views/organizations/_org_new_project_create.html.erb create mode 100644 app/views/organizations/_org_new_project_issues.html.erb create mode 100644 app/views/organizations/_org_new_project_message.html.erb diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 858952f0d..e649dffb5 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -75,51 +75,76 @@ class OrganizationsController < ApplicationController end def show - @subfield_content = @organization.org_subfields.order("priority") if @organization.show_mode == 1 - if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) - @organization = Organization.find(params[:id]) - # 统计访问量 - @organization.update_attribute(:visits, @organization.visits.to_i + 1) - if params[:org_subfield_id] - @org_subfield = OrgSubfield.find(params[:org_subfield_id]) - @org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0 - @org_activities = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{@org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{@org_subfield.id})").order('updated_at desc').page(params[:page] || 1).per(10) - else - shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id) - shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id) - project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0 - course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0 - course_types = "('Message','News','HomeworkCommon','Poll','Course')" - case params[:type] - when nil - @org_activities = OrgActivity.where("(container_id =? and container_type =?) " + - "or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+ - "or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))", - @organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) - when 'project_issue' - @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'project_message' - @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Message' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'org' - @org_activities = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_homework' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'HomeworkCommon' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_news' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'News' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_message' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Message' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - when 'course_poll' - @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) - end - end - @page = params[:page] ? params[:page].to_i : 1 - respond_to do |format| - format.html - format.js - end + # 组织新类型 show_mode:判断标准 1为新类型,0为旧 + if @organization.show_mode == 1 + @subfield_content = @organization.org_subfields.order("priority") + @project_acts = get_project_activities_org @organization + @course_acts_homework = get_course_homework_activities_org @organization + @course_acts_message = get_course_message_activities_org @organization + else - render_403 + if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) + @organization = Organization.find(params[:id]) + # 统计访问量 + @organization.update_attribute(:visits, @organization.visits.to_i + 1) + if params[:org_subfield_id] + @org_subfield = OrgSubfield.find(params[:org_subfield_id]) + @org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0 + @org_activities = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{@org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{@org_subfield.id})").order('updated_at desc').page(params[:page] || 1).per(10) + else + shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id) + shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id) + project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0 + course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0 + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + case params[:type] + when nil + @org_activities = OrgActivity.where("(container_id =? and container_type =?) " + + "or (container_type ='Project' and org_act_type in ('Issue','Message','ProjectCreateInfo') and container_id in (#{project_ids.join(',')})) "+ + "or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))", + @organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) + when 'project_issue' + @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Issue' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'project_message' + @org_activities = OrgActivity.where("container_type = 'Project' and org_act_type = 'Message' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'org' + @org_activities = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_homework' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'HomeworkCommon' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_news' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'News' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_message' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Message' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + when 'course_poll' + @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) + end + end + @page = params[:page] ? params[:page].to_i : 1 + respond_to do |format| + format.html + format.js + end + else + render_403 + end end + + end + + def get_project_activities_org org + project_ids = org.projects.map{|project| project.id}.join(",") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' order by updated_at desc limit 3;") + end + + def get_course_homework_activities_org org + course_ids = org.courses.map{|course| course.id}.join(",") + #project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' order by updated_at desc limit 5;") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'HomeworkCommon' order by updated_at desc limit 4;") + end + + def get_course_message_activities_org org + course_ids = org.courses.map{|course| course.id}.join(",") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'Message' order by updated_at desc limit 4;") end def update diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index e52238503..1c30bc192 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -110,7 +110,7 @@
    @@ -132,7 +132,7 @@ <% else %> <% if field.field_type == "Post" %> <%= link_to field.name, organization_path(@organization), :class => "fl" %> - <% else %> + <% elsif field.field_type == "Resource" %> <%= link_to field.name, organization_path(@organization), :class => "fl" %> <% end %> <% end %> @@ -153,7 +153,7 @@
    -

    课程动态
    GNSS

    +

    <%= @organization.name %>

    course activities

    More @@ -162,7 +162,7 @@

    -

    中国北斗开源社区
    GNSS

    +

    <%= @organization.name %>

    open laboratory of simulation and testing

    More @@ -172,7 +172,7 @@

    -

    中国北斗开源社区
    GNSS

    +

    <%= @organization.name %>

    open laboratory of simulation and testing

    More @@ -186,36 +186,50 @@

    + +<% @subfield_content.each do |field| %>
    -

    课程动态

    open laboratory

    +

    课程动态

    course activities

    - - 2016-03-22 -

    首届卫星导航仿真与测试专题研讨会在...首届卫星导航仿真与测试专题研讨会在...

    -
    10月15日,由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...
    -
    - - 2016-03-22 -

    首届卫星导航仿真与测试专题研讨会在...首届卫星导航仿真与测试专题研讨会在...

    -
    10月15日,由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...
    -
    + <% @course_acts_homework.each do |act| %> + <% if act.container_type == 'Course' %> + <% case act.org_act_type.to_s %> + <% when 'HomeworkCommon' %> + <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %> + <% when 'News' %> + <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %> + <% when 'Message'%> + <%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %> + <% when 'Poll' %> + <%= render :partial => 'org_new_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %> + <% when 'Course'%> + <%= render :partial => 'org_new_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %> + <% end %> + <% end %> + <% end %> More
    - - 2016-03-22 -

    首届卫星导航仿真与测试专题研讨会在...首届卫星导航仿真与测试专题研讨会在...

    -
    10月15日,由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...
    -
    - - 2016-03-22 -

    首届卫星导航仿真与测试专题研讨会在...首届卫星导航仿真与测试专题研讨会在...

    -
    10月15日,由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...
    -
    + <% @course_acts_message.each do |act| %> + <% if act.container_type == 'Course' %> + <% case act.org_act_type.to_s %> + <% when 'HomeworkCommon' %> + <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %> + <% when 'News' %> + <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %> + <% when 'Message'%> + <%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %> + <% when 'Poll' %> + <%= render :partial => 'org_new_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %> + <% when 'Course'%> + <%= render :partial => 'org_new_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %> + <% end %> + <% end %> + <% end %> More
    @@ -252,9 +266,18 @@
    -

    2016.01.30环球网卫星导航仿真与测试开放实验室落户泉州

    -

    卫星导航仿真与测试开放实验室是国内首个GNSS仿真与测试开放共享平台,北斗泉州实验室由国防科技大学泉州工业技术研究中心、福建省福信富通网络科技股份有限公司与开放实验室合作共建,计划于2016年3月建成并投用,将承建国内首个北斗海上数据应用中心,利用开放实验室优势资源承担相关专业人才培训,联合所属区域高校和企业开展船载导航终端北斗导航定位数据的采集、分析和应用,服务于全国北斗终端测试检定和相关应用研究。 - 据介绍,实验室建成后,将为泉州以及周边县(市、区)的北斗产业应用发展提供相应支撑,并依托泉州的地理和政策优势,推动北斗向海上丝绸之路经济带沿线国家的推广应用。

    + <% @project_acts.each do |act| %> + <% if act.container_type == 'Project' %> + <% case act.org_act_type.to_s %> + <% when 'Issue' %> + <%= render :partial => 'organizations/org_new_project_issues', :locals => {:activity => Issue.find(act.org_act_id)} %> + <% when 'Message' %> + <%= render :partial => 'organizations/org_new_project_message', :locals => {:activity => Message.find(act.org_act_id)} %> + <% when 'ProjectCreateInfo'%> + <%= render :partial => 'organizations/org_new_project_create', :locals => {:activity => act} %> + <% end %> + <% end %> + <% end %>
    @@ -297,7 +320,7 @@
    - +<% if field.field_type == "Post" %>

    社区规则

    open source

    @@ -336,82 +359,7 @@
    - - -
    -
    -
    -

    北斗社区规则

    community rules

    -

    欢迎大家加入北斗社区,卫星导航仿真与测试开放实验室是国内首个GNSS仿真与测试开放共享平台

    -
    - -
    -
    +<% end %>
    @@ -450,6 +398,8 @@
    +<% end %> + +
    diff --git a/app/views/users/_send_homework_to_course.html.erb b/app/views/users/_send_homework_to_course.html.erb index b19fbd1a8..67fd36c3c 100644 --- a/app/views/users/_send_homework_to_course.html.erb +++ b/app/views/users/_send_homework_to_course.html.erb @@ -1,4 +1,4 @@ -
    +
    发送到
    @@ -8,33 +8,9 @@
    - <%= form_tag send_homework_to_course_user_path(user),:remote=>true,:id=>'choose_course_list_form' %> -
    - <%= hidden_field_tag(:send_id, send_id) %> -
    - <% if !courses.empty? %> - <% courses.each do |course| %> -
      -
    • - -
    • -
    • <%= truncate(course.name,:lendght=>25) + '['+current_time_and_term(course) + ']'%>
    • -
    - <% end %> -
    +
    + <%= render :partial => "users/send_homework_to_course_form", :locals => {:user => user, :courses => courses, :send_id => send_id} %>
    -
    - -
    -
    - 确定 -
    -
    - 取消 -
    -
    -
    - <% end %>
    -
    +
    +
    + + <%# 登录 %> + <% if User.current.logged? %> + + + <%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %> + <%#= link_to User.current, user_url_in_org(User.current.id),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %> + <%#= link_to "退出",logout_url_without_domain, :class =>"menuGrey", :method => 'post', :rel => "nofollow" %> + + + <% else %> + + + <% end %> + +
    +
    +
    + + + + + + + + +
    <%= image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_user_tx') %> diff --git a/public/images/org_new_style/banner.jpg b/public/images/org_new_style/banner.jpg new file mode 100644 index 0000000000000000000000000000000000000000..385b24c9e781128f2cc1efb89d1773568e61c031 GIT binary patch literal 48752 zcmeFZcR*7~+c2pyy(h=3ZJKmbWXs5X+&o3sE@)Px{}-a*9`R8XQwN9>{$AyTC& zibzM@T@?fbm1=L`TCj5G1Vk*mzy03t-uuVB@4=iieV&Z%n*hT*4{59G9_Kz70e8YiBN|?RL=;n zV?;E>f&hVNM9_mEo)d^~@SQ+@?E`h^1kcwn!U*&SKYR$D*|L1|$AVD&HWmbK{#cNR zxi*N%xwd&nXPSd7z!%KQ%y+tf`Z*-R9mNK!ErghU0f}*A5HlVwH$4dLf{ z1O-JTgoT79FbhOP7GPwgq%cxaG7=)(XZAA_`SFbq6&4m16BQQ|6Gw}QiJ{?_7<#6P z#J_1^x(SjHfE1t;JP1VyDS_aTKuq5SgA|%>MXUi(q7d8%01Q7o5CX}I;^P+(6cPpq z@O>r%Lh^jg6o(MJ2p%La62;FafZ`F+0htm!yb6*86xo3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z1y{%Z%dh*d?Ee7IJc(oxOZH#pe%JSzNoEn2T^IY#o%&!cDV$vo+w0%>Vi*;9Iu4)g z^1#3`y>IQ0_mlmfT(B|>TTtu!AM?wm5%Fe&9e=J#ir(j@SPAhXimb(2IIFQ$xK*_3K7Fw%Rk-_OuhZ88qO`xZ zzi+SXb^0=*+ZI8p{{Xyy@$>%xJ$htEHp9t>pS9mCEn!i9!*%QQ;Be4O|eF6 zf8D3|-9O#G@vbphB-%b@-FWMi+ zrWH|>t}IH?)L}v@@1p#%N(u2o^u<*^{0iB{R^e4MimW)Rjwo7jRgKdXP&iPq;Z}|+ n)+*7(R$_-@t4=D`D%J&Y!mVIeVyzri*sDhsYZZ1X>{b8SX_3b? literal 0 HcmV?d00001 diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css index 4833e8966..e23d3f28d 100644 --- a/public/stylesheets/org_new_style.css +++ b/public/stylesheets/org_new_style.css @@ -1,6 +1,5 @@ @charset "utf-8"; /* CSS Document */ - body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5; background:#fff;} div,img,tr,td,table{ border:0;} @@ -18,15 +17,16 @@ a:hover{color:#29156f;} .mb70{ margin-bottom:70px;} /** header **/ -.header{ width:100%; height:72px; background:#29146f; padding:38px 0 40px;} +.header{ width:100%; height:60px; background:#29146f; padding:5px 0 0px; } .header-con{ width:1200px; margin:0 auto;} +.logo,.logo img{ display:block; height:52px; } a.login{ background:url(../images/org_new_style/icons.png) -7px -11px no-repeat; width:146px; height:55px; margin-right:40px; margin-top:11px;} a:hover.login{ background:url(../images/org_new_style/icons.png) -7px -88px no-repeat; } a.register{ background:url(../images/org_new_style/icons.png) -190px -11px no-repeat; width:158px; height:55px; ;margin-top:11px;} a:hover.register{ background:url(../images/org_new_style/icons.png) -190px -88px no-repeat; } /** nav **/ -.nav-box{ width:1200px; height:79px; margin:0 auto;} -.nav a{ display:block; padding:25px 10px; font-size:18px; color:#000; margin-right:20px; } +.nav-box{ width:1200px; height:60px; margin:0 auto;} +.nav a{ display:block; padding:15px 10px; font-size:18px; color:#000; margin-right:20px; } .navact{border-bottom:3px solid #ffbd18;} .nav a:hover{border-bottom:3px solid #ffbd18;} .searchbox{ width:338px; height:57px; border:1px solid #ccc; -moz-border-radius: 35px; -webkit-border-radius: 35px; margin:10px 0px 0 0;} @@ -37,40 +37,10 @@ a:hover.search-icon{ background:url(../images/org_new_style/icons.png) -387px -8 .searchbox:hover{ background:#999999; color:#fff;} /* Header text */ -.header-content { background: url(../images/org_new_style/header-background.jpg) no-repeat 50% 0px #070317;margin: 0;padding: 0;float: left;width: 100%;line-height: 22px;position: relative;z-index: 1;} -.header-content.home {height: 609px;} -.home .header-content { background: #070317 ; } -.header-content img {float: left; margin: 0 0 0 15px;} -.header-content .text {width:800px; text-align:center; margin-top:20%; } -.header-content .copy {font-size: 24px; line-height: 70px; } -.header-content .button { margin:0 auto;} -.header-content .dimmed { background: rgba(255, 255, 255, 0.4);} -.header-content .dimmed:hover { background: rgba(255, 255, 255, 1); } -.header-content .align-bottom {position: absolute; bottom: 0px;} -/* => SLIDE PREV AND NEXT ARROWS <= */ -.slider-prev, -.slider-next {text-indent:-9999px; width:60px;height:60px;background:url("../images/org_new_style/icons.png") -306px -264px no-repeat; position:absolute;top:50%; margin-top:-19px; z-index:999; opacity:.5; --webkit-transition: all 0.3s ease-out; /* Saf3.2+, Chrome */-moz-transition: all 0.3s ease-out; /* FF4+ */ -ms-transition: all 0.3s ease-out; /* IE10? */ -o-transition: all 0.3s ease-out; /* Opera 10.5+ */ transition: all 0.3s ease-out;display: none} -.slider-prev{ left:50px; } -.slider-next { right:50px;background-position:-382px -264px;} -.slider-prev:hover,.slider-next:hover{opacity:1;} -/* => SLIDER NAV o o o <= */ -.slider-nav {position:absolute;bottom:5px;left:50%;list-style:none; overflow:hidden; padding:2px; z-index:10;margin: 0; } -.slider-nav li{ float:left; } -.slider-nav li a{ display:block;width:13px;height:13px;overflow:hidden; padding:0px; margin:5px; background:url("../images/org_new_style/icons.png") no-repeat -419px -219px; text-decoration:none; text-indent:-999px;} -.slider-nav li a:hover,.slider-nav li a.selected{background-position:-402px -219px;} -/* => HOLY SLIDES <= */ -.slider section {display: none;} -.slider section.first {display: block;} -.slider-sections, .slider-sections section {width: 806px; height: 600px; } -.slider-sections {margin: 0 auto; position: relative;} -.slider-sections section {position: absolute; top: 0; left: 0px; } -.header-content h2 {font:400 62px/1.2 "microsoft yahei", Tahoma, arial, sans-serif;color: #fff;margin: 0 0 26px; } -.header-content p {margin: 0 0 30px; font-size:28px; color:#fff;} -.header-content .centered-content{padding-top: 30px;padding-bottom: 10px;} -.button {float: left;width:800px;list-style: none; } -.button a { font-size: 15px;line-height: 18px; text-decoration: none;color:#FFF; padding: 12px 56px;display: block;width: auto;z-index: 2;border: none; -moz-border-radius: 25px;border-radius: 25px;cursor: pointer; margin:0 auto; width:35px;} -.button a:hover{color:#29156f;} +.banner{ width:100%; height:234px; background:#070317 url(../images/org_new_style/banner.jpg) 0 0 no-repeat; color:#fff; text-align:center; padding-top:80px; line-height:2.4;} +.banner h2{ font-size:42px; } +.banner p{ font-size:18px;} +.banner span{ font-size:16px;} /** box1 **/ .box1{ width:100%; padding:70px 0;} @@ -176,6 +146,13 @@ a.download-btn{ display:block; border:1px solid #ccc; margin-top:10px; font-siz a:hover.download-btn{ background:#29146f; color:#fff; border:none;} .user-img img{ border:2px solid #e6473b; margin-right:10px; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:40px; height:40px;} .ml60{ margin-left:60px;} +/*用户图像*/ +.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;} +.topnav_login_list a{color:#269ac9;} +.topnav_login_list li{ } +.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;} +.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;} +.none {display: none;} From 961a264e053ce6ce146975d4fbf1095eee5714cb Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 29 Mar 2016 19:04:51 +0800 Subject: [PATCH 032/122] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=BB=9F=E4=B8=80date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_org_newstyle.html.erb | 153 +----------------- .../_org_logined_header.html.erb | 46 ++++++ .../_org_new_course_create.html.erb | 2 +- .../_org_new_course_homework.html.erb | 2 +- .../_org_new_course_message.html.erb | 2 +- .../_org_new_course_news.html.erb | 2 +- .../_org_new_course_poll.html.erb | 2 +- .../_org_new_project_issues.html.erb | 2 +- .../_org_new_project_message.html.erb | 2 +- .../organizations/_org_new_resource.html.erb | 2 +- public/stylesheets/org_new_style.css | 2 +- 11 files changed, 62 insertions(+), 155 deletions(-) create mode 100644 app/views/organizations/_org_logined_header.html.erb diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 1c2939071..60653b301 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -28,23 +28,7 @@ }); - @@ -54,91 +38,7 @@
    <%# 登录 %> - <% if User.current.logged? %> - - - <%#= link_to image_tag(url_to_avatar(User.current)), user_url_in_org(User.current.id), :alt => '用户头像', :target => '_blank', :class => "fr user-img" %> - <%#= link_to User.current, user_url_in_org(User.current.id),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %> - <%#= link_to "退出",logout_url_without_domain, :class =>"menuGrey", :method => 'post', :rel => "nofollow" %> - - - <% else %> - - - <% end %> - -
    -
    -
    - - - - - - - - - -
    -
    - <%= image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_user_tx') %> - <% if User.current.logged? %> - - - <% else %> - - - <% end %> + <%= render :partial => 'organizations/org_logined_header' %>
    @@ -164,52 +64,13 @@ <% end %> <% end %>
    -
    - - - - -
    -
    -
    -
    -
    -
    -
    -
    -

    <%= @organization.name %>

    -

    course activities

    -

    - More -

    -
    -
    -
    -
    -

    <%= @organization.name %>

    -

    open laboratory of simulation and testing

    -

    - More -

    -
    -
    + -
    -
    -

    <%= @organization.name %>

    -

    open laboratory of simulation and testing

    -

    - More -

    -
    -
    -
    -
    - ? ? -
    -
    @@ -246,7 +107,7 @@ <% @course_acts_message.each do |act| %> <% if act.container_type == 'Course' %> <% case act.org_act_type.to_s %> - <% when 'HomeworkCommon' %> + <% when 'HomeworkCommon' %> <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %> <% when 'News' %> <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %> @@ -360,7 +221,7 @@

    <%=link_to message.title %>

    - <%= format_time(message.updated_at) %> + <%= format_date(message.updated_at) %>
    <%= message.content.html_safe %>
    diff --git a/app/views/organizations/_org_logined_header.html.erb b/app/views/organizations/_org_logined_header.html.erb new file mode 100644 index 000000000..d2cf5d753 --- /dev/null +++ b/app/views/organizations/_org_logined_header.html.erb @@ -0,0 +1,46 @@ +<% if User.current.logged? %> + +<% else %> + + +<% end %> + + \ No newline at end of file diff --git a/app/views/organizations/_org_new_course_create.html.erb b/app/views/organizations/_org_new_course_create.html.erb index 29882a027..fb953d10f 100644 --- a/app/views/organizations/_org_new_course_create.html.erb +++ b/app/views/organizations/_org_new_course_create.html.erb @@ -1,5 +1,5 @@ - <%= format_time(activity.updated_at) %> + <%= format_date(activity.updated_at) %>

    <%= activity.title %>

    <%= activity.description %>
    \ No newline at end of file diff --git a/app/views/organizations/_org_new_course_homework.html.erb b/app/views/organizations/_org_new_course_homework.html.erb index 3f93300ed..ef1a73fa7 100644 --- a/app/views/organizations/_org_new_course_homework.html.erb +++ b/app/views/organizations/_org_new_course_homework.html.erb @@ -1,5 +1,5 @@ - <%= format_time activity.updated_at %> + <%= format_date activity.updated_at %>

    <%= activity.name %>

    <%= activity.description.html_safe %>
    \ No newline at end of file diff --git a/app/views/organizations/_org_new_course_message.html.erb b/app/views/organizations/_org_new_course_message.html.erb index fb2ddf197..134dc4961 100644 --- a/app/views/organizations/_org_new_course_message.html.erb +++ b/app/views/organizations/_org_new_course_message.html.erb @@ -1,5 +1,5 @@ - <%= format_time activity.updated_on %> + <%= format_date activity.updated_on %>

    <% if activity.parent_id.nil? %> <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :class=> "postGrey" %> diff --git a/app/views/organizations/_org_new_course_news.html.erb b/app/views/organizations/_org_new_course_news.html.erb index fe6c4507f..eb2ee08f7 100644 --- a/app/views/organizations/_org_new_course_news.html.erb +++ b/app/views/organizations/_org_new_course_news.html.erb @@ -1,5 +1,5 @@ - <%= format_time activity.updated_at %> + <%= format_date activity.updated_at %>

    首届卫星导航仿真与测试专题研讨会在...首届卫星导航仿真与测试专题研讨会在...

    10月15日,由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...
    \ No newline at end of file diff --git a/app/views/organizations/_org_new_course_poll.html.erb b/app/views/organizations/_org_new_course_poll.html.erb index fe6c4507f..eb2ee08f7 100644 --- a/app/views/organizations/_org_new_course_poll.html.erb +++ b/app/views/organizations/_org_new_course_poll.html.erb @@ -1,5 +1,5 @@ - <%= format_time activity.updated_at %> + <%= format_date activity.updated_at %>

    首届卫星导航仿真与测试专题研讨会在...首届卫星导航仿真与测试专题研讨会在...

    10月15日,由卫星导航仿真与测试开放实验室联盟主办的首次专题研讨会在西安国家民用航天产业基地隆重召开...
    \ No newline at end of file diff --git a/app/views/organizations/_org_new_project_issues.html.erb b/app/views/organizations/_org_new_project_issues.html.erb index dd438a1f4..00075d9e6 100644 --- a/app/views/organizations/_org_new_project_issues.html.erb +++ b/app/views/organizations/_org_new_project_issues.html.erb @@ -1,4 +1,4 @@ -

    <%= format_time(activity.updated_on) %>项目社区 +

    <%= format_date(activity.updated_on) %>项目社区 <%= link_to activity.subject.to_s, issue_url_in_org(activity.id) %>

    <%= activity.description.html_safe %>

    \ No newline at end of file diff --git a/app/views/organizations/_org_new_project_message.html.erb b/app/views/organizations/_org_new_project_message.html.erb index 08338aca8..207c6cbd4 100644 --- a/app/views/organizations/_org_new_project_message.html.erb +++ b/app/views/organizations/_org_new_project_message.html.erb @@ -1,4 +1,4 @@ -

    <%= format_time(activity.updated_on) %>项目社区 +

    <%= format_date(activity.updated_on) %>项目社区 <% if activity.parent_id.nil? %> <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board.id,activity.id) %> <% else %> diff --git a/app/views/organizations/_org_new_resource.html.erb b/app/views/organizations/_org_new_resource.html.erb index 08d1f8b78..8ae583722 100644 --- a/app/views/organizations/_org_new_resource.html.erb +++ b/app/views/organizations/_org_new_resource.html.erb @@ -6,7 +6,7 @@ <%= link_to truncate(attach.filename,length: 35, omission: '...'), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename+"\n"+attach.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :class => "fl ziyuan-title" %> -

    上传时间:<%= format_time attach.created_on %>类型:软件 上传者:尹刚 下载次数:40

    +

    上传时间:<%= format_date attach.created_on %>类型:软件 上传者:尹刚 下载次数:40

    下载
    diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css index e23d3f28d..c7c3c81a8 100644 --- a/public/stylesheets/org_new_style.css +++ b/public/stylesheets/org_new_style.css @@ -93,7 +93,7 @@ ul.callbacks_tabs.callbacks1_tabs {position:absolute;bottom: 7.3%;z-index: 999;l /** 开源 **/ .box2{ height:569px; padding:70px 0; width:100%; background:url(../images/org_new_style/bg.jpg) no-repeat; } .row-box3{ width:370px;} -.row-title3{ width:290px; font-size:18px;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:bold; } +.row-title3{ width:288px; font-size:18px;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:bold; } .box3{height:540px; width:100%; padding:70px 0; background:url(../images/org_new_style/bg2.jpg) no-repeat; } .box-title-p3{font-size:14px; color:#999999;} .row-img2{ margin-bottom:10px; width:380px; height:310px; display:block;} From 8a6a1b94ee83c50b90c716ca6eca77c932c10242 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 29 Mar 2016 20:09:47 +0800 Subject: [PATCH 033/122] =?UTF-8?q?=E7=BB=84=E7=BB=87=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=9A=84=E7=BB=9F=E8=AE=A1=E4=B8=8E=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/organizations_helper.rb | 8 ++++++++ app/views/layouts/base_org_newstyle.html.erb | 2 +- app/views/organizations/_org_new_resource.html.erb | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 89a21ba0e..4834cdb9b 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -1,6 +1,7 @@ # encoding: utf-8 module OrganizationsHelper include ApplicationHelper + include FilesHelper def find_user_not_in_current_org_by_name org @@ -36,4 +37,11 @@ module OrganizationsHelper Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;") end + def get_attach_org2(field) + org_attachments = field.attachments + attachments = User.current.admin? ? org_attachments : visable_attachemnts(org_attachments) + return attachments.sort_by{|x| x.created_on}.reverse.first(6) + # Attachment.find_by_sql("SELECT * FROM `attachments` where container_id =#{field_id} and container_type = 'OrgSubfield' and is_public =1 order by created_on limit 6;") + end + end diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 60653b301..4a9dec200 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -233,7 +233,7 @@
    <% elsif field.field_type == "Resource" %> - <% org_attachs = get_attach_org(field.id) %> + <% org_attachs = get_attach_org2(field) %>

    <%= field.name %>

    resource dwonload

    diff --git a/app/views/organizations/_org_new_resource.html.erb b/app/views/organizations/_org_new_resource.html.erb index 8ae583722..61e6f44fb 100644 --- a/app/views/organizations/_org_new_resource.html.erb +++ b/app/views/organizations/_org_new_resource.html.erb @@ -6,9 +6,9 @@ <%= link_to truncate(attach.filename,length: 35, omission: '...'), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename+"\n"+attach.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :class => "fl ziyuan-title" %> -

    上传时间:<%= format_date attach.created_on %>类型:软件 上传者:尹刚 下载次数:40

    +

    上传时间:<%= format_date attach.created_on %>类型:<%= attach.tag_list[0] %> 下载次数:<%= attach.downloads%> 引用:<%= attach.quotes.nil? ? 0:attach.quotes %>

    - 下载 + <%= link_to "下载", download_named_attachment_path(attach.id, attach.filename), :class => "download-btn fl" %>
    <% end %> \ No newline at end of file From a26cf19b8662437b4ee965a17d251b0f8697b985 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 29 Mar 2016 20:14:07 +0800 Subject: [PATCH 034/122] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/setting.html.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index 2676105d3..39848d192 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -72,13 +72,13 @@
    - - - - - - - +
    + 显示模式 : + /> + + /> + +
    公开 : class="ml3" />
    From f2106d00455864fe4f29fd95e9950130672cdfdf Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 29 Mar 2016 20:33:16 +0800 Subject: [PATCH 035/122] =?UTF-8?q?more=E9=93=BE=E6=8E=A5=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=EF=BC=8C=E5=8C=BA=E5=88=86=E4=B8=A4=E7=A7=8D=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 3 +-- app/views/layouts/base_org_newstyle.html.erb | 17 +++-------------- app/views/organizations/_org_new_forum.html.erb | 12 ++++++++++++ 3 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 app/views/organizations/_org_new_forum.html.erb diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 0978e38d8..bc1a6a003 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -70,13 +70,12 @@ class OrganizationsController < ApplicationController def show # 组织新类型 show_mode:判断标准 1为新类型,0为旧 - if @organization.show_mode == 1 + if @organization.show_mode == 1 && params[:org_subfield_id].nil? @subfield_content = @organization.org_subfields.order("priority") @project_acts = get_project_activities_org @organization @course_acts_homework = get_course_homework_activities_org @organization @course_acts_message = get_course_message_activities_org @organization render :layout => 'base_org_newstyle' - else if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) @organization = Organization.find(params[:id]) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 4a9dec200..315d53e9d 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -210,24 +210,13 @@
    <% end %> <% else %> - <% if field.field_type == "Post" %> + <% if field.field_type == "Post" %> <%# 讨论类型 %> <% message_ats = get_message_org(@organization.id, field.id) %>
    -

    <%= field.name %>

    activity zone

    +

    <%= field.name %>

    discussion zone

    - <% message_ats.each do |message| %> - - <% end %> + <%= render :partial => 'organizations/org_new_forum', :locals => {:message_ats => message_ats, :field => field, :organization => @organization} %>
    diff --git a/app/views/organizations/_org_new_forum.html.erb b/app/views/organizations/_org_new_forum.html.erb new file mode 100644 index 000000000..a7e8989e1 --- /dev/null +++ b/app/views/organizations/_org_new_forum.html.erb @@ -0,0 +1,12 @@ +<% message_ats.each do |message| %> +
    + + +

    <%=link_to message.title %>

    + <%= format_date(message.updated_at) %> +
    +
    <%= message.content.html_safe %>
    +
    + <%= link_to "More", organization_path(organization, :org_subfield_id => field.id), :class => "btn-more" %> +
    +<% end %> \ No newline at end of file From d98eb8748ec3214e0ca0f70d3828d7881b30151a Mon Sep 17 00:00:00 2001 From: linchun Date: Wed, 30 Mar 2016 14:17:12 +0800 Subject: [PATCH 036/122] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E7=95=8C=E9=9D=A2=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=E4=B8=BA=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=94=E6=8C=89=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F=E6=8E=92?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 3 ++- app/views/admin/homework.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index c7aa42b9e..e1e99447d 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -548,7 +548,8 @@ class AdminController < ApplicationController #作业 def homework - @homework = HomeworkCommon.order('end_time desc') + #@homework = HomeworkCommon.order('end_time desc') + @homework = HomeworkCommon.order( 'created_at desc ') @homework = paginateHelper @homework,30 @page = (params['page'] || 1).to_i - 1 respond_to do |format| diff --git a/app/views/admin/homework.html.erb b/app/views/admin/homework.html.erb index 7260d68ff..4188fecea 100644 --- a/app/views/admin/homework.html.erb +++ b/app/views/admin/homework.html.erb @@ -22,7 +22,7 @@ 提交作品数 - 提交截止日期 + 作业发布日期 @@ -51,7 +51,7 @@ <%=link_to(StudentWork.where('homework_common_id=?',homework.id).count, student_work_index_path(:homework => homework.id))%> - <%=format_date(homework.end_time) %> + <%=format_date( homework.created_at ) %> <% end %> From 1f0f7708c684c58ce85362777bdfcd4a3a0bbacf Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Wed, 30 Mar 2016 15:09:06 +0800 Subject: [PATCH 037/122] fix pagination bug --- lib/redmine/pagination.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb index 79855b966..9132f973c 100644 --- a/lib/redmine/pagination.rb +++ b/lib/redmine/pagination.rb @@ -168,7 +168,7 @@ module Redmine if block_given? yield text, parameters, options else - if args[2][:path].nil? + if args[2].nil? || args[2][:path].nil? link_to text, params.merge(parameters), options else page = "&page=" + parameters[:page].to_s unless parameters[:page].nil? From 7c55356ace49d1346c40b4a09ff75b6a2be3d769 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 30 Mar 2016 17:22:23 +0800 Subject: [PATCH 038/122] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=96=B0=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 27 +- app/helpers/organizations_helper.rb | 7 +- app/views/layouts/base_org_newstyle.html.erb | 399 +++++++++--------- .../_org_logined_header.html.erb | 6 +- .../_org_new_course_homework.html.erb | 16 +- .../_org_new_course_message.html.erb | 25 +- .../_org_new_course_news.html.erb | 16 +- .../organizations/_org_new_forum.html.erb | 16 +- .../_org_new_forum_reply.html.erb | 6 + .../_org_new_project_issues.html.erb | 19 +- .../_org_new_project_message.html.erb | 49 ++- public/images/org_new_style/bg.jpg | Bin 55689 -> 0 bytes public/images/org_new_style/bg2.jpg | Bin 31668 -> 0 bytes public/images/org_new_style/cd-top-arrow.svg | 7 + public/images/org_new_style/default-img.jpg | Bin 0 -> 4207 bytes public/images/org_new_style/default-img2.png | Bin 0 -> 19771 bytes public/images/org_new_style/detailimg1.jpg | Bin 50723 -> 0 bytes public/images/org_new_style/detailimg2.jpg | Bin 33550 -> 0 bytes public/images/org_new_style/detailimg3.jpg | Bin 22446 -> 0 bytes .../org_new_style/header-background.jpg | Bin 134016 -> 0 bytes public/images/org_new_style/icons.png | Bin 39862 -> 40092 bytes public/images/org_new_style/slide1.png | Bin 235600 -> 0 bytes public/images/org_new_style/slide2.png | Bin 232903 -> 0 bytes public/stylesheets/org_new_style.css | 150 ++++--- 24 files changed, 418 insertions(+), 325 deletions(-) create mode 100644 app/views/organizations/_org_new_forum_reply.html.erb delete mode 100644 public/images/org_new_style/bg.jpg delete mode 100644 public/images/org_new_style/bg2.jpg create mode 100644 public/images/org_new_style/cd-top-arrow.svg create mode 100644 public/images/org_new_style/default-img.jpg create mode 100644 public/images/org_new_style/default-img2.png delete mode 100644 public/images/org_new_style/detailimg1.jpg delete mode 100644 public/images/org_new_style/detailimg2.jpg delete mode 100644 public/images/org_new_style/detailimg3.jpg delete mode 100644 public/images/org_new_style/header-background.jpg delete mode 100644 public/images/org_new_style/slide1.png delete mode 100644 public/images/org_new_style/slide2.png diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index bc1a6a003..f7adb13dc 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -70,11 +70,16 @@ class OrganizationsController < ApplicationController def show # 组织新类型 show_mode:判断标准 1为新类型,0为旧 - if @organization.show_mode == 1 && params[:org_subfield_id].nil? + if @organization.show_mode == 1 && params[:org_subfield_id].nil? && params[:type] .nil? @subfield_content = @organization.org_subfields.order("priority") - @project_acts = get_project_activities_org @organization + # 项目两种动态 + @project_issue_acts = get_project_issue_activities_org @organization + @project_message_acts = get_project_message_activities_org @organization + # 磕碜动态 + #@project_acts_issues = get_project_activities_org @organization @course_acts_homework = get_course_homework_activities_org @organization @course_acts_message = get_course_message_activities_org @organization + @course_acts_news = get_course_news_activities_org @organization render :layout => 'base_org_newstyle' else if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) @@ -125,20 +130,30 @@ class OrganizationsController < ApplicationController end - def get_project_activities_org org + def get_project_message_activities_org org project_ids = org.projects.map{|project| project.id}.join(",") - project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' order by updated_at desc limit 3;") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' and org_act_type = 'Message' order by updated_at desc limit 2;") + end + + def get_project_issue_activities_org org + project_ids = org.projects.map{|project| project.id}.join(",") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' and org_act_type = 'issue' order by updated_at desc limit 4;") end def get_course_homework_activities_org org course_ids = org.courses.map{|course| course.id}.join(",") #project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' order by updated_at desc limit 5;") - project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'HomeworkCommon' order by updated_at desc limit 4;") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'HomeworkCommon' order by updated_at desc limit 1;") end def get_course_message_activities_org org course_ids = org.courses.map{|course| course.id}.join(",") - project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'Message' order by updated_at desc limit 4;") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'Message' order by updated_at desc limit 1;") + end + + def get_course_news_activities_org org + course_ids = org.courses.map{|course| course.id}.join(",") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' and org_act_type = 'News' order by updated_at desc limit 1;") end def update diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 4834cdb9b..19ae17015 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -30,7 +30,12 @@ module OrganizationsHelper end def get_message_org(org_id, field_id) - OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} order by updated_at desc limit 3;") + OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and org_subfield_id = #{field_id} and parent_id is null order by updated_at desc limit 2;") + end + + def get_message_reply_org(org_id, ids) + # OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id is not null order by updated_at desc limit 1;") + OrgDocumentComment.find_by_sql("SELECT * FROM org_document_comments where organization_id = #{org_id} and parent_id in (#{ids}) order by updated_at desc limit 1;") end def get_attach_org(field_id) diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index 315d53e9d..c796934df 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -27,242 +27,227 @@ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]} }); +
    -
    -
    - - <%# 登录 %> - <%= render :partial => 'organizations/org_logined_header' %> +
    +
    + + <%# 登录 %> + <%= render :partial => 'organizations/org_logined_header' %> +
    +
    +
    + + + + +
    -
    - - - - -
    - - -<% @subfield_content.each do |field| %> - <% if is_default_field?(field) %> - <% case field.name %> - <% when 'course' %> -
    -
    -

    课程动态

    course activities

    -
    -
    - - <% @course_acts_homework.each do |act| %> - <% if act.container_type == 'Course' %> - <% case act.org_act_type.to_s %> - <% when 'HomeworkCommon' %> - <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %> - <% when 'News' %> - <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %> - <% when 'Message'%> - <%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %> - <% when 'Poll' %> - <%= render :partial => 'org_new_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %> - <% when 'Course'%> - <%= render :partial => 'org_new_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %> - <% end %> + + <% @subfield_content.each do |field| %> + <% if is_default_field?(field) %> + <% case field.name %> + <% when 'course' %> +
    +
    +

    课程动态

    course activities

    +
    +
      +
    • + <% @course_acts_homework.each do |act| %> + <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id, :course_activity => 0} %> <% end %> - <% end %> - More -
    -
    - - <% @course_acts_message.each do |act| %> - <% if act.container_type == 'Course' %> - <% case act.org_act_type.to_s %> - <% when 'HomeworkCommon' %> - <%= render :partial => 'org_new_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %> - <% when 'News' %> - <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %> - <% when 'Message'%> - <%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %> - <% when 'Poll' %> - <%= render :partial => 'org_new_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %> - <% when 'Course'%> - <%= render :partial => 'org_new_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %> - <% end %> +
  • +
  • + <% @course_acts_message.each do |act| %> + <%= render :partial => 'org_new_course_message', :locals => {:activity => Message.find(act.org_act_id), :user_activity_id =>act.id} %> <% end %> - <% end %> - More - - -
    - - - - <% when 'project' %> -
    -
    -

    项目动态

    project activities

    - -
    -
    -
    -
    - <% @project_acts.each do |act| %> - <% if act.container_type == 'Project' %> - <% case act.org_act_type.to_s %> - <% when 'Issue' %> - <%= render :partial => 'organizations/org_new_project_issues', :locals => {:activity => Issue.find(act.org_act_id)} %> - <% when 'Message' %> - <%= render :partial => 'organizations/org_new_project_message', :locals => {:activity => Message.find(act.org_act_id)} %> - <% when 'ProjectCreateInfo'%> - <%= render :partial => 'organizations/org_new_project_create', :locals => {:activity => act} %> - <% end %> - <% end %> +
  • +
  • + <% @course_acts_news.each do |act| %> + <%= render :partial => 'org_new_course_news', :locals => {:activity => News.find(act.org_act_id), :user_activity_id =>act.id} %> <% end %> - -
    -
    -
    -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    -
    -
    -
    +
  • - - - + - - - - - <% end %> -<% else %> - <% if field.field_type == "Post" %> <%# 讨论类型 %> - <% message_ats = get_message_org(@organization.id, field.id) %> -
    -
    -

    <%= field.name %>

    discussion zone

    -
    - <%= render :partial => 'organizations/org_new_forum', :locals => {:message_ats => message_ats, :field => field, :organization => @organization} %> -
    -
    -
    -
    - <% elsif field.field_type == "Resource" %> - <% org_attachs = get_attach_org2(field) %> -
    -
    -

    <%= field.name %>

    resource dwonload

    -
    + +
    +
    + <% when 'project' %> +
    +
    +

    项目动态

    project activities

    +
    +
    + + +
    + + + +
    + + <% @project_message_acts.each do |act| %> + <%= render :partial => 'organizations/org_new_project_message', :locals => {:activity => Message.find(act.org_act_id)} %> + <% end %> + <%= link_to "More", organization_path(@organization, :type => 1), :class => "more-btn mt30 fr", :target => "_blank" %> +
    +
    + +
    + <% @project_issue_acts.each do |act| %> + <%= render :partial => 'organizations/org_new_project_issues', :locals => {:activity => Issue.find(act.org_act_id)} %> + <% end %> + <%= link_to "More", organization_path(@organization, :type => 1), :class => "more-btn mt30 fr", :target => "_blank" %> +
    +
    + +
    +
    +
    +
    + <% end %> + <% else %> + <% if field.field_type == "Post" %> <%# 讨论类型 %> + <% message_ats = get_message_org(@organization.id, field.id) %> + <% ids = field.org_document_comments.map{|o| o.id}.join(",") %> +
    +
    +

    <%= field.name %><%= field.id %>

    discussion zone

    +
    +
    + <% message_ats.each do |act| %> + <%= render :partial => 'organizations/org_new_forum', :locals => {:activity => act, :field => field, :organization => @organization} %> + <% end %> + <%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn mt30 fr", :target => "_blank" %> +
    +
    + <% unless ids.blank? %> + <% message_reply_ats = get_message_reply_org(@organization.id, ids) %> +
    + <% message_reply_ats.each do |act| %> + <%= render :partial => 'organizations/org_new_forum_reply', :locals => {:activity => act, :field => field, :organization => @organization} %> + <% end %> +
    +
    + + <% end %> +
    +
    +
    + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %> +
    +
    + <% elsif field.field_type == "Resource" %> + <% org_attachs = get_attach_org2(field) %> +
    +
    +

    <%= field.name %><%= field.id %>

    resource dwonload

    +
    <%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
    + +
    + <%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
    -
    - <% end %> - <% end %> -<% end %> + + <% end %> + <% end %> + <% end %> - + - -
    - + +
    + - + - + diff --git a/app/views/organizations/_org_logined_header.html.erb b/app/views/organizations/_org_logined_header.html.erb index d2cf5d753..fa4c228a1 100644 --- a/app/views/organizations/_org_logined_header.html.erb +++ b/app/views/organizations/_org_logined_header.html.erb @@ -23,8 +23,10 @@ <% else %> - - + <% end %> \ No newline at end of file diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb index 1d66c2955..5150a1dc3 100644 --- a/app/views/files/create.js.erb +++ b/app/views/files/create.js.erb @@ -1,71 +1,84 @@ <% if @addTag%> - <% if @obj_flag == '3'%> - $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', +<% if @obj_flag == '3'%> +$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); - //$('#put-tag-form-issue').hide(); - $('#name-issue').val(""); - <% elsif @obj_flag == '6'%> - $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); - $("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', +//$('#put-tag-form-issue').hide(); +$('#name-issue').val(""); +<% elsif @obj_flag == '6'%> +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); - $("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide(); - $("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val(""); - <% else %> - $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', +$("#put-tag-form- <%=@obj.class%>- <%=@obj.id%>").hide(); +$("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val(""); +<% else %> +$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); - $('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>'); - $('#put-tag-form #name').val(""); - //$('#put-tag-form').hide(); - <% end %> +$('#tags_show').html('<%=render_attachments_tag_save(@project, nil)%>'); +$('#put-tag-form #name').val(""); +//$('#put-tag-form').hide(); +<% end %> <% else %> $("#attachments_fields").children().remove(); $("#upload_file_count").text("未上传文件"); $('#upload_file_div').slideToggle('slow'); - <% if @project %> - hideModal(); - <% if @in_project_toolbar %> - window.location.href = '<%= project_files_path(@project) %>' - <% else %> +<% if @project %> +hideModal(); +<% if @in_project_toolbar %> +window.location.href = '<%= project_files_path(@project) %>' +<% else %> - $("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>'); - $("#project_files_count_info").html("<%= @all_attachments.count %>"); - $("#project_files_count_nav").html("(<%= @all_attachments.count %>)") - // 添加文件上传成功提示 - <% unless params[:attachments].nil? %> - var div = $('
    文件上传成功!
    '); - $("#course_list").prepend(div); - setTimeout( function(){div.remove();},3000) - <% end %> - <% end %> - <%elsif @course%> - hideModal(); - <%if @in_course_toolbar %> - window.location.href='<%= course_files_path(@course)%>' - <%else%> - $("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>'); - $("#courses_files_count_info").html("<%= @all_attachments.count%>"); - $("#courses_files_count_nav").html("(<%= @all_attachments.count%>)") - // 添加文件上传成功提示, - <% unless params[:attachments].nil? %> - var div = $('
    文件上传成功!
    '); - $("#course_list").prepend(div); - setTimeout( function(){div.remove();},3000) - <% end %> - <%end%> - <% elsif @org_subfield %> - <% if params[:in_org] %> - window.location.href = '<%= org_subfield_files_path @org_subfield %>'; - <%else %> - hideModal(); - $("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>'); - // 添加文件上传成功提示, - <% unless params[:attachments].nil? %> +$("#resource_list").html('<%= j(render partial:"project_file", locals: {project: @project}) %>'); +$("#project_files_count_info").html("<%= @all_attachments.count %>"); +$("#project_files_count_nav").html("(<%= @all_attachments.count %>)") +// 添加文件上传成功提示 +<% unless params[:attachments].nil? %> +var div = $('
    文件上传成功!
    '); +$("#course_list").prepend(div); +setTimeout( function(){div.remove();},3000) +<% end %> +<% end %> +<%elsif @course%> +hideModal(); +<%if @in_course_toolbar %> +window.location.href='<%= course_files_path(@course)%>' +<%else%> +$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>'); +$("#courses_files_count_info").html("<%= @all_attachments.count%>"); +$("#courses_files_count_nav").html("(<%= @all_attachments.count%>)") +// 添加文件上传成功提示, +<% unless params[:attachments].nil? %> +var div = $('
    文件上传成功!
    '); +$("#course_list").prepend(div); +setTimeout( function(){div.remove();},3000) +<% end %> +<%end%> +<% elsif @org_subfield %> +<% if params[:in_org] %> +window.location.href = '<%= org_subfield_files_path @org_subfield %>'; +<%else %> +hideModal(); +$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>'); +// 添加文件上传成功提示, +<% unless params[:attachments].nil? %> // var div = $('
    文件上传成功!
    '); // $("#org_subfield_list").prepend(div); // setTimeout( function(){div.remove();},3000); - <% end %> - <% end %> - <% end %> +<% end %> +<% end %> +<% elsif @organization %> //组织单独处理 +<% if params[:in_org] %> +window.location.href = '<%= organization_files_path @organization %>'; +<%else %> +hideModal(); +$("#resource_list").html('<%= j(render partial: "subfield_files" ,locals: {org_subfield: @org_subfield}) %>'); +// 添加文件上传成功提示, +<% unless params[:attachments].nil? %> +// var div = $('
    文件上传成功!
    '); +// $("#org_subfield_list").prepend(div); +// setTimeout( function(){div.remove();},3000); +<% end %> +<% end %> +<% end %> <% end %> $(document).ready(img_thumbnails); diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index b1656cf37..697113081 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -9,8 +9,8 @@ <%= favicon %> <%= javascript_heads %> <%= heads_for_theme %> - <%= stylesheet_link_tag 'org_new_style' %> - <%= javascript_include_tag 'org' %> + <%= stylesheet_link_tag 'org_new_style','jquery/jquery-ui-1.9.2' %> + <%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%> <%= javascript_include_tag 'attachments' %> <%= call_hook :view_layouts_base_html_head %> @@ -59,13 +59,25 @@ + +
    - + <%# 登录 %> <%= render :partial => 'organizations/org_logined_header' %>
    diff --git a/config/routes.rb b/config/routes.rb index 56194bd20..c6b3d9da3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -46,6 +46,14 @@ RedmineApp::Application.routes.draw do end end resources :organizations do + resource :files do + member do + + end + collection do + + end + end resources :org_document_comments do member do From 4cca29059268e976487474b6e0c55e0b4ceb8643 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 09:33:50 +0800 Subject: [PATCH 069/122] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=BC=96=E8=BE=91500?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8500?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 7 ++++++- app/views/admin/homework.html.erb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 1ea109ff1..81e4d7bfb 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -41,7 +41,12 @@ class OrganizationsController < ApplicationController end def edit - @organization = Organization.find(params[:id]) + # @organization = Organization.find(params[:id]) + begin + @organization = Organization.where("id =?", params[:id]) + ensure + render_404 + end end def destroy diff --git a/app/views/admin/homework.html.erb b/app/views/admin/homework.html.erb index 7260d68ff..e21307485 100644 --- a/app/views/admin/homework.html.erb +++ b/app/views/admin/homework.html.erb @@ -35,7 +35,7 @@ <%=@count %> - <%=link_to(homework.name, student_work_index_path(:homework => homework.id))%> + <%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%> <%= link_to(homework.course.name, course_path(homework.course.id)) %> From 92a08dc606960674104bc199adb2ee910ab2231b Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 09:37:31 +0800 Subject: [PATCH 070/122] =?UTF-8?q?=E4=BD=9C=E4=B8=9A500=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20admin=E7=BB=84=E7=BB=87=E7=BC=96=E8=BE=91500=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 7 ++++++- app/views/admin/homework.html.erb | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 280957449..920b9f2c4 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -41,7 +41,12 @@ class OrganizationsController < ApplicationController end def edit - @organization = Organization.find(params[:id]) + # @organization = Organization.find(params[:id]) + begin + @organization = Organization.where("id =?", params[:id]) + ensure + render_404 + end end def destroy diff --git a/app/views/admin/homework.html.erb b/app/views/admin/homework.html.erb index 4188fecea..09f42bb84 100644 --- a/app/views/admin/homework.html.erb +++ b/app/views/admin/homework.html.erb @@ -35,7 +35,7 @@ <%=@count %> - <%=link_to(homework.name, student_work_index_path(:homework => homework.id))%> + <%=link_to(homework.try(:name), student_work_index_path(:homework => homework.id))%> <%= link_to(homework.course.name, course_path(homework.course.id)) %> From 8f4ff2bf910e6095ecf17f04df4b9669705a7630 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 10:20:31 +0800 Subject: [PATCH 071/122] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_org_new_course_act_list.html.erb | 14 +++++++------- .../organizations/_org_new_forum_list.html.erb | 4 ++-- .../_org_new_project_act_list.html.erb | 14 +++++++------- public/stylesheets/org_new_style.css | 7 +++++++ 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app/views/organizations/_org_new_course_act_list.html.erb b/app/views/organizations/_org_new_course_act_list.html.erb index 56202ee86..81f1b6410 100644 --- a/app/views/organizations/_org_new_course_act_list.html.erb +++ b/app/views/organizations/_org_new_course_act_list.html.erb @@ -4,8 +4,8 @@
    <%= link_to image_tag(url_to_avatar(activity.user),:width => "40", :height => "40"), user_path(activity.user), :class => "fl user-img" %> -
    - <%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> +
    + <%= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %> <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>

    发布时间:<%= format_date activity.updated_at %> 作者:<%= activity.try(:user).try(:realname).nil? ? activity.try(:user).try(:login) : activity.try(:user).try(:realname) %> @@ -18,11 +18,11 @@

    <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %> -
    +
    <% if activity.parent_id.nil? %> - <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl ziyuan-title" %> + <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %> <% else %> - <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl ziyuan-title" %> + <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %> <% end %> <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>

    发布时间:<%= format_date activity.updated_on %> @@ -36,8 +36,8 @@

    <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %> -
    - <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> +
    + <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>

    发布时间:<%= format_date activity.created_on %> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> <%= activity.comments.count %>

    diff --git a/app/views/organizations/_org_new_forum_list.html.erb b/app/views/organizations/_org_new_forum_list.html.erb index b0346b9f7..bcd79c35f 100644 --- a/app/views/organizations/_org_new_forum_list.html.erb +++ b/app/views/organizations/_org_new_forum_list.html.erb @@ -2,8 +2,8 @@
    <%= link_to image_tag(url_to_avatar(activity.creator),:width => "40", :height => "40"), user_path(activity.creator), :class => "fl user-img" %> -
    - <%= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank', :class => "fl ziyuan-title" %> +
    + <%= link_to activity.title.to_s, organization_path(@organization, :org_subfield_id => field.id), :target => '_blank', :class => "fl note-title" %> <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>

    发布时间:<%= format_date activity.updated_at %> 作者:<%= activity.try(:creator).try(:realname).nil? ? activity.try(:creator).try(:login) : activity.try(:creator).try(:realname) %> diff --git a/app/views/organizations/_org_new_project_act_list.html.erb b/app/views/organizations/_org_new_project_act_list.html.erb index 407c8fa97..278972b1a 100644 --- a/app/views/organizations/_org_new_project_act_list.html.erb +++ b/app/views/organizations/_org_new_project_act_list.html.erb @@ -4,8 +4,8 @@

    <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %> -
    - <%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> +
    + <%= link_to activity.subject.to_s, issue_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %> <%#= link_to activity.name.to_s, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>

    发布时间:<%= format_date activity.updated_on %> @@ -19,11 +19,11 @@

    <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %> -
    +
    <% if activity.parent_id.nil? %> - <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl ziyuan-title" %> + <%= link_to activity.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %> <% else %> - <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl ziyuan-title" %> + <%= link_to activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "fl note-title" %> <% end %> <%#= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %>

    发布时间:<%= format_date activity.updated_on %> @@ -37,8 +37,8 @@

    <%= link_to image_tag(url_to_avatar(activity.author),:width => "40", :height => "40"), user_path(activity.author), :class => "fl user-img" %> -
    - <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl ziyuan-title" %> +
    + <%= link_to activity.title.to_s, news_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %>

    发布时间:<%= format_date activity.created_on %> 作者:<%= activity.try(:author).try(:realname).nil? ? activity.try(:author).try(:login) : activity.try(:author).try(:realname) %> <%= activity.comments.count %>

    diff --git a/public/stylesheets/org_new_style.css b/public/stylesheets/org_new_style.css index ad0170ec1..442ca9ce3 100644 --- a/public/stylesheets/org_new_style.css +++ b/public/stylesheets/org_new_style.css @@ -185,6 +185,13 @@ a:hover.more-btn-center{ background:#29146f; color:#fff;} .nocontent{ font-size:30px; color:#888; margin:150px auto; text-align:center;} +/** 帖子列表模式 **/ +.note-box{ width:515px; } +.note-box span{ margin-right:5px;} +.note-title{ display:block; width:515px; font-size:16px;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;} +.note-box p{display:block; width:515px; color:#888; font-size:12px; line-height:2.5;} +.right-info2{background:url(../images/org_new_style/icons.png) no-repeat -41px -540px ; width:15px; line-height:1.9; height:16px; padding-left:20px; color:#888; margin-top:5px;} + From 638280a07e32b0931a1e9ad7b64763c76ea4784d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 10:31:16 +0800 Subject: [PATCH 072/122] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organizations/_subfield_list.html.erb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/views/organizations/_subfield_list.html.erb b/app/views/organizations/_subfield_list.html.erb index 4fbeb971f..2c679eb3d 100644 --- a/app/views/organizations/_subfield_list.html.erb +++ b/app/views/organizations/_subfield_list.html.erb @@ -23,14 +23,19 @@
  • <%= name %>
  • 默认
  • - <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %> -
    - -
    - <%= select( :name,:group_id, subfield_status_option, - { :include_blank => false,:selected => field.status}, - {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %> + <% if field.name == "activity" %> + 默认 + <% else %> + <%= form_tag({:controller => 'org_subfields', :action => 'update_status', :id => field.id,},:remote=>'true', :method => 'post', :id=>"update_status_form_#{field.id}", :class => 'query_form') do %> +
    + +
    + <%= select( :name,:group_id, subfield_status_option, + { :include_blank => false,:selected => field.status}, + {:onchange=>"update_status('#update_status_form_#{field.id}');", :id =>"field_status_id", :name => "status",:class=>"undis class-edit fl", :style => "width:56px;"}) %> + <% end %> <% end %> +
  • 默认
  • <%= field.hide==0?"隐藏":"可见" %> From 25da9254970d8be5358157b2b1692245712f299a Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 11:38:20 +0800 Subject: [PATCH 073/122] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=86=85=E5=AE=B9=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 3 +- .../_org_new_course_act_list.html.erb | 32 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 920b9f2c4..2af1f1d9e 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -176,7 +176,8 @@ class OrganizationsController < ApplicationController def get_course_activities_org org course_ids = org.courses.map{|course| course.id}.join(",") unless course_ids.blank? - project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' order by updated_at desc limit 8;") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' + and org_act_type in ('HomeworkCommon', 'Poll', 'Message', 'News', 'Course') order by updated_at desc limit 8;") else project_acts = nil end diff --git a/app/views/organizations/_org_new_course_act_list.html.erb b/app/views/organizations/_org_new_course_act_list.html.erb index 81f1b6410..8dceeb6cb 100644 --- a/app/views/organizations/_org_new_course_act_list.html.erb +++ b/app/views/organizations/_org_new_course_act_list.html.erb @@ -43,6 +43,38 @@ <%= activity.comments.count %>

    + <% elsif act.org_act_type == "Poll" %> + <% activity = Poll.find(act.org_act_id) %> + <% has_commit = has_commit_poll?(activity.id ,User.current)%> + <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%> + <% if ( activity.polls_status==2) %> +
    + <%= link_to image_tag(url_to_avatar(activity.user),:width => "40", :height => "40"), user_path(activity.user), :class => "fl user-img" %> + +
    + <% if has_commit %> + <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "fl note-title" %> + <% else %> + <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s, :target => '_blank', :class => "fl note-title" %> + <% end %> +

    发布时间:<%= format_date activity.published_at %> + 作者:<%= activity.try(:user).try(:realname).nil? ? activity.try(:user) : activity.try(:user).try(:realname) %> + 0

    +
    +
    + <% end %> + <% elsif act.org_act_type == "Course" %> + <% activity = Course.find(act.org_act_id) %> +
    + <%= link_to image_tag(url_to_avatar(activity.teacher),:width => "40", :height => "40"), user_path(activity.teacher), :class => "fl user-img" %> + +
    + <%= link_to activity.name.to_s, course_url_in_org(activity.id), :target => '_blank', :class => "fl note-title" %> +

    发布时间:<%= format_date activity.created_at %> + 作者:<%= activity.try(:teacher).try(:realname).nil? ? activity.try(:teacher) : activity.try(:teacher).try(:realname) %> + 0

    +
    +
    <% end %> <% end %> \ No newline at end of file From aee695e94d79f455b173e27893916e814e393e31 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 11:48:13 +0800 Subject: [PATCH 074/122] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0poll=E3=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_org_new_course_pic.html.erb | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/app/views/organizations/_org_new_course_pic.html.erb b/app/views/organizations/_org_new_course_pic.html.erb index 26a5762bb..15a9c4582 100644 --- a/app/views/organizations/_org_new_course_pic.html.erb +++ b/app/views/organizations/_org_new_course_pic.html.erb @@ -71,7 +71,36 @@
    - + <% elsif act.org_act_type == "Poll" %> + <% activity = Poll.find(act.org_act_id) %> + <% has_commit = has_commit_poll?(activity.id ,User.current)%> + <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%> + <% if ( activity.polls_status==2) %> +
  • + +
    + <% iamge_path = get_image_path_from_content(activity.polls_description) %> + <% if iamge_path.nil? %> + <%= link_to image_tag("/images/org_new_style/default-img.jpg", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> + <% else %> + <%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), news_url_in_org(activity.id), :target => "_blank" %> + <% end %> +
    +
    + <% if has_commit %> + <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank' %> + <% else %> + <%= link_to poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s, :target => '_blank' %> + <% end %> +
    +
    + +
  • + <% end %> <% end %> <% end %> From a9412b959e2b2279be969d268db0ca48758ca30f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 11:54:58 +0800 Subject: [PATCH 075/122] =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 2af1f1d9e..2c43eec77 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -165,7 +165,8 @@ class OrganizationsController < ApplicationController def get_project_activities_org org project_ids = org.projects.map{|project| project.id}.join(",") unless project_ids.blank? - project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' order by updated_at desc limit 8;") + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' + and org_act_type in ('Message', 'Issue') order by updated_at desc limit 8;") else project_acts = nil end From c1c19f6d609dc58a70e20ad46a4104191f652ad0 Mon Sep 17 00:00:00 2001 From: linchun Date: Fri, 1 Apr 2016 15:54:59 +0800 Subject: [PATCH 076/122] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E7=95=8C=E9=9D=A2=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8A=A5500=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/homework.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/admin/homework.html.erb b/app/views/admin/homework.html.erb index 4188fecea..e81936886 100644 --- a/app/views/admin/homework.html.erb +++ b/app/views/admin/homework.html.erb @@ -37,9 +37,11 @@ <%=link_to(homework.name, student_work_index_path(:homework => homework.id))%> + <% if homework.course %> <%= link_to(homework.course.name, course_path(homework.course.id)) %> + <% end %> <%= homework.try(:user)%><% else %><%=homework.try(:user).try(:realname) %><% end %>'> <% if homework.try(:user).try(:realname) == ' '%> <%= link_to(homework.try(:user), user_path(homework.user_id)) %> From 02ebaf23d195f615df3aa66eb81774a0a74c40b1 Mon Sep 17 00:00:00 2001 From: linchun Date: Fri, 1 Apr 2016 16:17:26 +0800 Subject: [PATCH 077/122] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E7=95=8C=E9=9D=A2=E7=BB=84=E7=BB=87=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=80=BB=E7=BB=84=E7=BB=87=E7=9A=84=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/organization.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/admin/organization.html.erb b/app/views/admin/organization.html.erb index 02b897f80..6fde09ede 100644 --- a/app/views/admin/organization.html.erb +++ b/app/views/admin/organization.html.erb @@ -24,7 +24,8 @@ "> - <%= link_to org.name,home_path(:organization => org.id) %> + <%#= link_to org.name,home_path(:organization => org.id) %> + <%= link_to org.name, organization_path(org) %> From 9e7c595e559604e56afe935a82d613dd9531db25 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 1 Apr 2016 17:23:15 +0800 Subject: [PATCH 078/122] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 51 +++++-- app/views/layouts/base_org_newstyle.html.erb | 23 +-- .../_org_new_forum_list.html.erb | 79 ++++++++-- .../organizations/_org_new_forum_pic.html.erb | 140 +++++++++++++++--- 4 files changed, 238 insertions(+), 55 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 2c43eec77..fb7b59742 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -79,16 +79,39 @@ class OrganizationsController < ApplicationController if @organization.show_mode == 1 && params[:org_subfield_id].nil? && params[:list] .nil? if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) @subfield_content = @organization.org_subfields.order("priority") + @organization = Organization.find(params[:id]) + # 统计访问量 + @organization.update_column(:visits, @organization.visits.to_i + 1) + + # @org_subfield = OrgSubfield.find(params[:org_subfield_id]) + # @org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0 + # @org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{@org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{@org_subfield.id})").order('updated_at desc').page(params[:page] || 1).per(10) + + shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id) + shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id) + project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0 + course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0 + course_types = "('Message','News','HomeworkCommon','Poll','Course')" + @project_acts = get_project_activities_org @organization, project_ids + @course_acts = get_course_activities_org @organization, course_ids + #@org_acts = OrgActivity.where("container_id =? and container_type =?",@organization.id, 'Organization').order('updated_at desc') + #@project_acts = OrgActivity.where("(container_id =? and container_type =?) " + + # "or (container_type ='Project' and org_act_type in ('Issue','Message') and container_id in (#{project_ids.join(',')})) ", + # @organization.id, 'Organization').order('updated_at desc').limit(8) + + #@course_acts = OrgActivity.where("(container_id =? and container_type =?) " + + # "or (container_type ='Course' and org_act_type in #{course_types} and container_id in (#{course_ids.join(',')}))", + # @organization.id, 'Organization').order('updated_at desc').limit(8) + + + # 项目两种动态 - @project_acts = get_project_activities_org @organization - @project_issue_acts = get_project_issue_activities_org @organization - @project_message_acts = get_project_message_activities_org @organization - # 磕碜动态 + #@project_acts = get_project_activities_org @organization + + # 课程动态 #@project_acts_issues = get_project_activities_org @organization - @course_acts = get_course_activities_org @organization - @course_acts_homework = get_course_homework_activities_org @organization - @course_acts_message = get_course_message_activities_org @organization - @course_acts_news = get_course_news_activities_org @organization + #@course_acts = get_course_activities_org @organization + render :layout => 'base_org_newstyle' else render_403 @@ -97,7 +120,7 @@ class OrganizationsController < ApplicationController if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) @organization = Organization.find(params[:id]) # 统计访问量 - @organization.update_attribute(:visits, @organization.visits.to_i + 1) + @organization.update_column(:visits, @organization.visits.to_i + 1) if params[:org_subfield_id] @org_subfield = OrgSubfield.find(params[:org_subfield_id]) @org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0 @@ -162,10 +185,9 @@ class OrganizationsController < ApplicationController end # 获取整过项目的动态 - def get_project_activities_org org - project_ids = org.projects.map{|project| project.id}.join(",") + def get_project_activities_org org, project_ids unless project_ids.blank? - project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids}) and container_type = 'project' + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{project_ids.join(',')}) and container_type = 'project' and org_act_type in ('Message', 'Issue') order by updated_at desc limit 8;") else project_acts = nil @@ -174,10 +196,9 @@ class OrganizationsController < ApplicationController end # 获取整过课程的动态 - def get_course_activities_org org - course_ids = org.courses.map{|course| course.id}.join(",") + def get_course_activities_org org, course_ids unless course_ids.blank? - project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids}) and container_type = 'course' + project_acts = OrgActivity.find_by_sql("SELECT * FROM org_activities where container_id in (#{course_ids.join(',')}) and container_type = 'course' and org_act_type in ('HomeworkCommon', 'Poll', 'Message', 'News', 'Course') order by updated_at desc limit 8;") else project_acts = nil diff --git a/app/views/layouts/base_org_newstyle.html.erb b/app/views/layouts/base_org_newstyle.html.erb index b1656cf37..2bb3975cf 100644 --- a/app/views/layouts/base_org_newstyle.html.erb +++ b/app/views/layouts/base_org_newstyle.html.erb @@ -113,7 +113,7 @@ <% if field.status == 0 %>

    课程动态

    - <% if @course_acts.nil? %> + <% if @course_acts.blank? %>
    <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> @@ -134,7 +134,7 @@ <% else %>

    课程动态

    - <% if @course_acts.nil? %> + <% if @course_acts.blank? %>
    <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> @@ -158,7 +158,7 @@ <% if field.status == 0 %>

    项目动态

    - <% if @project_acts.nil? %> + <% if @project_acts.blank? %>
    <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> @@ -180,7 +180,7 @@ <% else %>

    项目动态

    - <% if @project_acts.nil? %> + <% if @project_acts.blank? %>
    <%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %> @@ -201,13 +201,16 @@ <% end %> <% else %> <% if field.field_type == "Post" %> <%# 讨论类型 %> - <% message_ats = get_message_org(@organization.id, field.id) %> - <% ids = field.org_document_comments.map{|o| o.id}.join(",") %> + <% org_subfield = OrgSubfield.find(field.id) %> + <% org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0 %> + <% org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc') %> + <%# message_ats = get_message_org(@organization.id, field.id) %> + <%# ids = field.org_document_comments.map{|o| o.id}.join(",") %>
    <% if field.status == 0 %>

    <%= field.name %>

    - <% if message_ats.blank? %> + <% if org_acts.blank? %>
    <% if !field.subfield_subdomain_dir.nil? %> @@ -226,7 +229,7 @@
    + <%# 更新访问数,刷新的时候更新访问次数 %> + <% update_visiti_count @course %> + <%# over %> +
    + + <%# 更新访问数,刷新的时候更新访问次数 %> + <% update_visiti_count @user %> + <%# over %> +

    From ef28266225ce1c210160fa703948e6892b9a82a3 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 14 Apr 2016 10:37:38 +0800 Subject: [PATCH 114/122] =?UTF-8?q?=E6=9B=B2=E7=BA=BF=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/stats.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index ac19310f6..9567f6a69 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -54,7 +54,7 @@ }, series: [{ name: '改动或增加', - color: 'red', + // data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] data: <%= @static_total_per_user.map{|c| c.add.to_i} %> }, From c87611dfec82c68e94ef27249010f8c302f24dd9 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 14 Apr 2016 11:18:17 +0800 Subject: [PATCH 115/122] =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=89=88=E6=9C=AC=E5=BA=93=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- app/views/projects/_rep_static.html.erb | 111 ++++++++++++++++++++++++ app/views/projects/show.html.erb | 2 +- app/views/repositories/stats.html.erb | 2 +- 4 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 app/views/projects/_rep_static.html.erb diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e3d089312..5c8d194b9 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -321,7 +321,7 @@ class ProjectsController < ApplicationController end g = Gitlab.client unless @project.gpid.nil? - @static_total_per_user = g.rep_stats(@project.gpid).map {|p| p.changes} + @static_total_per_user = g.rep_stats(@project.gpid) end # 根据对应的请求,返回对应的数据 respond_to do |format| diff --git a/app/views/projects/_rep_static.html.erb b/app/views/projects/_rep_static.html.erb new file mode 100644 index 000000000..0522fd34e --- /dev/null +++ b/app/views/projects/_rep_static.html.erb @@ -0,0 +1,111 @@ +<%= javascript_include_tag 'highcharts','highcharts-more' %> +

    +
    +
    +
    + \ No newline at end of file diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 2adca9a41..63d7d583f 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -31,7 +31,7 @@
    -

    <%= @static_total_per_user %>



    + <%= render :partial => "rep_static" %>
    diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index 9567f6a69..4a8bd9217 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -54,7 +54,7 @@ }, series: [{ name: '改动或增加', - + // data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] data: <%= @static_total_per_user.map{|c| c.add.to_i} %> }, From 19861ba8c6564e5b4e7f8876025896761ade4875 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 14 Apr 2016 12:30:33 +0800 Subject: [PATCH 116/122] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E7=9A=84=E7=BB=84=E7=BB=87=E5=8F=AF=E5=85=B3=E8=81=94?= =?UTF-8?q?=E6=89=80=E6=9C=89=E5=85=AC=E5=BC=80=E8=AF=BE=E7=A8=8B=E5=92=8C?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 16 +++++++++++++--- .../organizations/_join_course_menu.html.erb | 2 +- .../organizations/_join_project_menu.html.erb | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 4fa7659c9..457b3bfa1 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -352,8 +352,13 @@ class OrganizationsController < ApplicationController if !params[:name].nil? condition = "%#{params[:name].strip}%".gsub(" ","") end - sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.is_public = 1 and courses.name like '#{condition}'"+ - "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id}) and courses.is_delete=0" + if User.current.admin? + sql = "select courses.* from courses where courses.is_public = 1 and courses.name like '#{condition}'"+ + "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id}) and courses.is_delete=0" + else + sql = "select courses.* from courses inner join members on courses.id = members.course_id where members.user_id = #{User.current.id} and courses.is_public = 1 and courses.name like '#{condition}'"+ + "and courses.id not in (select distinct org_courses.course_id from org_courses where org_courses.organization_id = #{@organization.id}) and courses.is_delete=0" + end #user_courses = Course.find_by_sql(sql) @courses = Course.find_by_sql(sql) # @added_course_ids = @organization.courses.map(&:id) @@ -396,8 +401,13 @@ class OrganizationsController < ApplicationController if !params[:name].nil? condition = "%#{params[:name].strip}%".gsub(" ","") end - sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.is_public = 1 and projects.name like '#{condition}'" + + if User.current.admin? + sql = "select projects.* from projects where projects.status != 9 and projects.is_public = 1 and projects.name like '#{condition}'" + " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id}) and status=1" + else + sql = "select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.is_public = 1 and projects.name like '#{condition}'" + + " and projects.id not in (select org_projects.project_id from org_projects where organization_id = #{@organization.id}) and status=1" + end #user_projects = Course.find_by_sql(sql) @projects = Course.find_by_sql(sql) # @added_course_ids = @organization.projects.map(&:id) diff --git a/app/views/organizations/_join_course_menu.html.erb b/app/views/organizations/_join_course_menu.html.erb index c480e851c..b21e52d2f 100644 --- a/app/views/organizations/_join_course_menu.html.erb +++ b/app/views/organizations/_join_course_menu.html.erb @@ -29,7 +29,7 @@
    <%=form_tag url_for(:controller => 'organizations', :action => 'join_courses', :organization_id => organization_id),:method => 'post', :id => 'join_courses_form', :remote => true,:class=>"resourcesSearchBox" do %> -
    +
    diff --git a/app/views/organizations/_join_project_menu.html.erb b/app/views/organizations/_join_project_menu.html.erb index 6040408bb..c9bd48610 100644 --- a/app/views/organizations/_join_project_menu.html.erb +++ b/app/views/organizations/_join_project_menu.html.erb @@ -29,7 +29,7 @@
    <%=form_tag url_for(:controller => 'organizations', :action => 'join_projects', :organization_id => organization_id),:method => 'post', :id => 'join_projects_form', :remote => true,:class=>"resourcesSearchBox" do %> -
    +
    From d91d2bfa171e483433e9af444a277e4481d914f5 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 14 Apr 2016 14:45:42 +0800 Subject: [PATCH 117/122] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E5=85=A8=E9=83=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index e52b8434b..49e6ec290 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -18,10 +18,10 @@ class HomeworkCommonController < ApplicationController @is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) if @is_teacher @homeworks = @course.homework_commons.order("updated_at desc").limit(10).offset(@page * 10) - @homework_commons = @course.homework_commons.order("created_at desc").limit(10).offset(@page * 10) + @homework_commons = @course.homework_commons.order("created_at desc") else @homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("updated_at desc").limit(10).offset(@page * 10) - @homework_commons = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at desc").limit(10).offset(@page * 10) + @homework_commons = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at desc") end @is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher)) @is_new = params[:is_new] From 37bd547d873948d9903c6064afda04be23cc9719 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 14 Apr 2016 14:50:16 +0800 Subject: [PATCH 118/122] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 9a1497fa7..e4b63a536 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -44,7 +44,7 @@
    From 2d4f724e33fd582a5c3e878cd8e1e4cc9d28163d Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 14 Apr 2016 15:01:18 +0800 Subject: [PATCH 120/122] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=9A=84=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E5=88=97=E8=A1=A8=E4=BD=9C=E5=93=81=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E6=8C=89=E4=BD=9C=E4=B8=9A=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=8D=87=E5=BA=8F=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index af02829e0..af793ca31 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -334,7 +334,7 @@ class CoursesController < ApplicationController def export_course_member_excel @all_members = student_homework_score(0,0,0,"desc") - @homeworks = @course.homework_commons.order("created_at desc") + @homeworks = @course.homework_commons.order("created_at asc") filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}"; respond_to do |format| From 96accf1e7a6a0dd57134a4fae234915d2fed9bc4 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 14 Apr 2016 15:35:27 +0800 Subject: [PATCH 121/122] =?UTF-8?q?=E6=9C=AA=E5=8F=91=E5=B8=83=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=B8=8D=E5=BA=94=E8=BF=9B=E8=A1=8C=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E7=9A=84=E7=A7=AF=E5=88=86=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/member.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/member.rb b/app/models/member.rb index e19e1f0df..cc227cf31 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -145,7 +145,7 @@ class Member < ActiveRecord::Base #当前课程的作业列表 def homework_common_list - HomeworkCommon.where(:course_id => self.course_id) + HomeworkCommon.where("course_id = ? and publish_time is not null and publish_time <= '#{Date.today}'", self.course_id) end #当前学生在指定作业内的得分 From 143f3f8f9aab4fe70dbfc4c96e5ef6a7f2a8f114 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 15 Apr 2016 11:26:56 +0800 Subject: [PATCH 122/122] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=A2=9E=E5=8A=A0=E7=B2=BE=E5=93=81=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 27 +++++++ app/views/admin/_course_detail_tr.html.erb | 32 +++++++++ app/views/admin/_tab_excellent_courses.erb | 7 ++ app/views/admin/courses.html.erb | 4 +- .../admin/excellent_all_courses.html.erb | 71 +++++++++++++++++++ app/views/admin/excellent_courses.html.erb | 6 ++ app/views/admin/set_excellent_course.js.erb | 1 + config/routes.rb | 4 +- 8 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 app/views/admin/_course_detail_tr.html.erb create mode 100644 app/views/admin/_tab_excellent_courses.erb create mode 100644 app/views/admin/excellent_all_courses.html.erb create mode 100644 app/views/admin/set_excellent_course.js.erb diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e1e99447d..81407d95d 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -63,6 +63,33 @@ class AdminController < ApplicationController end end + #精品课程下的全部课程 + def excellent_all_courses + @name = params[:name] + @courses = Course.like(@name).order('created_at desc') + @courses = paginateHelper @courses,30 + @page = (params['page'] || 1).to_i - 1 + respond_to do |format| + format.html + end + end + + #设为精品 + def set_excellent_course + @course = Course.find params[:id] + unless @course.nil? + if @course.is_excellent == 1 || @course.excellent_option == 1 + @course.update_column('is_excellent', 0) + @course.update_column('excellent_option', 0) + else + @course.update_column('is_excellent', 1) + end + respond_to do |format| + format.js + end + end + end + #管理员界面课程资源列表 def course_resource_list diff --git a/app/views/admin/_course_detail_tr.html.erb b/app/views/admin/_course_detail_tr.html.erb new file mode 100644 index 000000000..ca15a6696 --- /dev/null +++ b/app/views/admin/_course_detail_tr.html.erb @@ -0,0 +1,32 @@ + + <%= course.id %> + + + + <%= link_to(course.name, course_path(course.id)) %> + + + + <%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %> + + + <%= studentCount(course) %> + + + <%= course.homework_commons.count%> + + + <%= student_works_num(course) %> + + + <%= visable_attachemnts_incourse(course).count%> + + + <%= course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", course.boards.first.id, nil).count %> + + + <%= course.course_activities.count%> + + + <%= link_to( course.is_excellent == 1 || course.excellent_option == 1 ? "取消精品" : "设为精品", { :controller => 'admin', :action => 'set_excellent_course', :id => course.id },:remote=>true, :class => 'icon-del') %> + diff --git a/app/views/admin/_tab_excellent_courses.erb b/app/views/admin/_tab_excellent_courses.erb new file mode 100644 index 000000000..844648c0b --- /dev/null +++ b/app/views/admin/_tab_excellent_courses.erb @@ -0,0 +1,7 @@ +
    +
      +
    • <%= link_to '精品课程', {:action => 'excellent_courses'}, class: "#{current_page?(excellent_courses_path)? 'selected' : nil }" %>
    • +
    • <%= link_to '全部课程', {:action => 'excellent_all_courses'}, class: "#{current_page?(excellent_all_courses_path)? 'selected' : nil }" %>
    • + +
    +
    \ No newline at end of file diff --git a/app/views/admin/courses.html.erb b/app/views/admin/courses.html.erb index 2505b3d06..8e2f146a0 100644 --- a/app/views/admin/courses.html.erb +++ b/app/views/admin/courses.html.erb @@ -13,9 +13,7 @@ <%= text_field_tag 'name', params[:name], :size => 30, :placeholder => '课程名称' %> <%= submit_tag l(:button_apply), :class => "small", :name => nil %> - - <%= l(:button_clear)%> - + <%= link_to l(:button_clear), {:controller => 'admin', :action => 'courses'},:remote => true, :class => 'icon icon-reload' %> <% end %>   diff --git a/app/views/admin/excellent_all_courses.html.erb b/app/views/admin/excellent_all_courses.html.erb new file mode 100644 index 000000000..7554885a9 --- /dev/null +++ b/app/views/admin/excellent_all_courses.html.erb @@ -0,0 +1,71 @@ +<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %> +

    + 精品课程列表 +

    +<%= render 'tab_excellent_courses' %> + +

    + 全部课程列表 +

    + +<%= form_tag({}, :method => :get) do %> +
    + + <%= 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 => 'excellent_all_courses'}, :class => 'icon icon-reload' %> +
    +<% end %> +  + +
    + + + + + + + + + + + + + + + + + <% @courses.each do |course| %> + " id="tr_<%= course.id %>"> + <%= render :partial => 'course_detail_tr', :locals => {:course => course} %> + + <% end %> + +
    + 序号 + + 课程名 + + 主讲老师 + + 学生数 + + 作业数 + + 作品数 + + 资源数 + + 帖子数 + + 动态数 + +
    +
    + + +<% html_title(l(:label_excellent_courses_list)) -%> \ No newline at end of file diff --git a/app/views/admin/excellent_courses.html.erb b/app/views/admin/excellent_courses.html.erb index 59426455a..fef6da84d 100644 --- a/app/views/admin/excellent_courses.html.erb +++ b/app/views/admin/excellent_courses.html.erb @@ -1,3 +1,9 @@ +<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', :media => 'all' %> +

    + <%=l(:label_excellent_courses_list)%> +

    +<%= render 'tab_excellent_courses' %> +

    <%=l(:label_excellent_courses_list)%>

    diff --git a/app/views/admin/set_excellent_course.js.erb b/app/views/admin/set_excellent_course.js.erb new file mode 100644 index 000000000..7b3ade139 --- /dev/null +++ b/app/views/admin/set_excellent_course.js.erb @@ -0,0 +1 @@ +$("#tr_<%=@course.id %>").html("<%=escape_javascript(render :partial => 'course_detail_tr', :locals => {:course => @course}) %>"); \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index ea89bb57e..9cfb3126d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -950,7 +950,9 @@ RedmineApp::Application.routes.draw do match 'admin', :to => 'admin#index', :via => :get match 'admin/projects', :via => :get get 'admin/courses' - get 'admin/excellent_courses' + get 'admin/excellent_courses', as: :excellent_courses + get 'admin/excellent_all_courses', as: :excellent_all_courses + match 'admin/set_excellent_course/:id', :to => 'admin#set_excellent_course' get 'admin/course_resource_list' get 'admin/project_resource_list' match 'admin/users', :via => :get