diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb index 3edda8285..2b41983cc 100644 --- a/app/controllers/org_subfields_controller.rb +++ b/app/controllers/org_subfields_controller.rb @@ -14,9 +14,10 @@ class OrgSubfieldsController < ApplicationController SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase) end end - @subfield.update_attributes(:field_type => params[:field_type]) + #默认类型为帖子 + @subfield.update_attributes(:field_type => params[:field_type]||"Post") # admin配置的类型 - update_status_by_type(@subfield, params[:field_type]) + update_status_by_type(@subfield, params[:field_type]||"Post") else @res = false end diff --git a/app/views/blog_comments/_simple_ke_reply_form.html.erb b/app/views/blog_comments/_simple_ke_reply_form.html.erb index ac953b254..8339ae5ad 100644 --- a/app/views/blog_comments/_simple_ke_reply_form.html.erb +++ b/app/views/blog_comments/_simple_ke_reply_form.html.erb @@ -1,20 +1,24 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
-
- <%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %> - - <% if course_id%> - - <% end %> - -
- - -
-

- <% end%> -
+ <% if User.current.logged? %> +
+ <%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %> + + <% if course_id%> + + <% end %> + +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/courses/syllabus.html.erb b/app/views/courses/syllabus.html.erb index 66bc8ff9a..f2d9cbdbd 100644 --- a/app/views/courses/syllabus.html.erb +++ b/app/views/courses/syllabus.html.erb @@ -184,20 +184,24 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@article.author_id), :alt => "用户头像" %>
-
- <%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%> - - - - - -
- - -
-

- <% end%> -
+ <% if User.current.logged? %> +
+ <%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%> + + + + + +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb index 88e535e72..bea3f3872 100644 --- a/app/views/forums/create.js.erb +++ b/app/views/forums/create.js.erb @@ -1,6 +1,7 @@ <%if @save_flag%> -$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); -$('#reorder_time').click(); +//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); +//$('#reorder_time').click(); + window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>" <%else%> -$("#error").html("<%= @forum.errors.full_messages[0]%>").show(); -<%end %> \ No newline at end of file + $("#error").html("<%= @forum.errors.full_messages[0]%>").show(); +<%end %> diff --git a/app/views/issues/_issue_replies.html.erb b/app/views/issues/_issue_replies.html.erb index 197cd9c02..7b5383c1e 100644 --- a/app/views/issues/_issue_replies.html.erb +++ b/app/views/issues/_issue_replies.html.erb @@ -62,23 +62,27 @@
-
- <%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %> - <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%> - - -
-
- -
-
- <%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %> -
- - -
- <% end %> -
+ <% if User.current.logged? %> +
+ <%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %> + <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%> + + +
+
+ +
+
+ <%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %> +
+ + +
+ <% end %> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/issues/_issue_reply_ke_form.html.erb b/app/views/issues/_issue_reply_ke_form.html.erb index a2975237b..7fbb0d191 100644 --- a/app/views/issues/_issue_reply_ke_form.html.erb +++ b/app/views/issues/_issue_reply_ke_form.html.erb @@ -5,21 +5,25 @@
-
- <%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%> - <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%> - - - -
-
- -
- - -
- <% end %> -
+ <% if User.current.logged? %> +
+ <%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%> + <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%> + + + +
+
+ +
+ + +
+ <% end %> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index ad5baac41..181eefb98 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -173,7 +173,7 @@
<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %> -
访问计数 <%= @course.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+
访问计数 <%= @course.visits.to_i %> (自2016年5月)
diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb index 114bb7219..9ba31bfe6 100644 --- a/app/views/layouts/base_org.html.erb +++ b/app/views/layouts/base_org.html.erb @@ -136,7 +136,7 @@ <%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
-
访问计数 <%= @organization.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+
访问计数 <%= @organization.visits.to_i %> (自2016年5月)
<%= render_flash_messages %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 52e42f1be..f7b04924d 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -146,7 +146,7 @@
-
访问计数 <%= @project.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+
访问计数 <%= @project.visits.to_i %> (自2016年5月)
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index a7d908212..8455d5693 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -284,7 +284,7 @@
-
访问计数 <%= @user.visits.to_i %> (自<%= Time.now.year %>年<%= Time.now.month %>月)
+
访问计数 <%= @user.visits.to_i %> (自2016年5月)
<%= yield %> diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index ca179f9fc..9b3e82447 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -119,19 +119,23 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
-
- <%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%> - <%= f.hidden_field :subject, :required => true, value: @memo.subject %> - <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> - <%= f.hidden_field :parent_id, :required => true, value: @memo.id %> - <%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %> -
- - -
-

- <% end%> -
+ <% if User.current.logged? %> +
+ <%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%> + <%= f.hidden_field :subject, :required => true, value: @memo.subject %> + <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> + <%= f.hidden_field :parent_id, :required => true, value: @memo.id %> + <%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %> +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/messages/_reply_message.html.erb b/app/views/messages/_reply_message.html.erb index faa0bd0ce..d4d9d77a0 100644 --- a/app/views/messages/_reply_message.html.erb +++ b/app/views/messages/_reply_message.html.erb @@ -2,17 +2,21 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
-
- <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %> - - -
- - -
-

- <% end%> -
+ <% if User.current.logged? %> +
+ <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %> + + +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/org_document_comments/_simple_ke_reply_form.html.erb b/app/views/org_document_comments/_simple_ke_reply_form.html.erb index 1813f5b5f..2494687b4 100644 --- a/app/views/org_document_comments/_simple_ke_reply_form.html.erb +++ b/app/views/org_document_comments/_simple_ke_reply_form.html.erb @@ -1,17 +1,21 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
-
- <%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %> - - -
- - -
-

- <% end%> -
+ <% if User.current.logged? %> +
+ <%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %> + + +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/org_subfields/create.js.erb b/app/views/org_subfields/create.js.erb index a7647b0ad..a65f53719 100644 --- a/app/views/org_subfields/create.js.erb +++ b/app/views/org_subfields/create.js.erb @@ -1,9 +1,11 @@ <% if @res %> -$("#org_subfield_list").html(""); -$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>"); -$("#sub_field_left_lists").html(""); -$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>"); -$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>"); + $("#org_subfield_list").html(""); + $("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>"); + $("#sub_field_left_lists").html(""); + $("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>"); + $("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>"); + //默认选中第一个 + $("input[name='field_type']").get(0).checked=true; <% end %> $("#subfield_name").val(""); $("#sub_dir").val(""); \ No newline at end of file diff --git a/app/views/organizations/_org_course_homework.html.erb b/app/views/organizations/_org_course_homework.html.erb index bcbeca778..e33787a09 100644 --- a/app/views/organizations/_org_course_homework.html.erb +++ b/app/views/organizations/_org_course_homework.html.erb @@ -387,17 +387,21 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%> - <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %> - <%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %> -
- - -
-

- <% end%> -
+ <% if User.current.logged? %> +
+ <%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%> + <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %> + <%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %> +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/organizations/_org_course_message.html.erb b/app/views/organizations/_org_course_message.html.erb index 03e986716..80125a03e 100644 --- a/app/views/organizations/_org_course_message.html.erb +++ b/app/views/organizations/_org_course_message.html.erb @@ -131,18 +131,22 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> - - -
- - + <% if User.current.logged? %> +
+ <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> + + +
+ + +
+

+ <% end%>
-

- <% end%> -
-
+
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/organizations/_org_course_news.html.erb b/app/views/organizations/_org_course_news.html.erb index 8c260c21c..24870b470 100644 --- a/app/views/organizations/_org_course_news.html.erb +++ b/app/views/organizations/_org_course_news.html.erb @@ -98,16 +98,20 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
-
- <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> - -
- - -
-

- <% end%> -
+ <% if User.current.logged? %> +
+ <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> + +
+ + +
+

+ <% end%> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/organizations/_org_custom_header.html.erb b/app/views/organizations/_org_custom_header.html.erb index c7aca1e6a..cf3fabb0e 100644 --- a/app/views/organizations/_org_custom_header.html.erb +++ b/app/views/organizations/_org_custom_header.html.erb @@ -1,11 +1,11 @@
- <%= image_tag(url_to_avatar(@organization), width:"67", height: "61", :id => 'nh_user_tx', :class => "por_logo fl ", :target => "_blank") %> + <%= image_tag(url_to_avatar(@organization), width:"51", height: "51", :id => 'nh_user_tx', :class => "por_logo fl mt1", :target => "_blank") %> <% if User.current.logged? %> diff --git a/app/views/organizations/_org_custom_left1.html.erb b/app/views/organizations/_org_custom_left1.html.erb index 4c1271ab8..ee88f3315 100644 --- a/app/views/organizations/_org_custom_left1.html.erb +++ b/app/views/organizations/_org_custom_left1.html.erb @@ -8,11 +8,11 @@
    <% if acts.count > 1 %> - <% acts[1..2].each do |activity| %> + <% acts[1..3].each do |activity| %> <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %> <% document = activity.org_act %>
  • - <%= link_to "热门推荐#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %> + <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>

    <%= time_from_now(document.created_at) %> <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -25,7 +25,7 @@ <% title = message.parent_id.nil? ? message.subject : message.parent.subject %> <% if message.board.org_subfield_id %>
  • - <%= link_to "热门推荐#{title}".html_safe, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> + <%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>

    <%= time_from_now(message.created_on) %> <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -33,7 +33,7 @@
  • <% else %>
  • - <%= link_to "热门推荐#{title}".html_safe, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> + <%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>

    <%= time_from_now(message.created_on) %> <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -44,7 +44,7 @@ <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %> <% news = activity.org_act %>
  • - <%= link_to "热门推荐#{news.title}".html_safe, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %> + <%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>

    <%= time_from_now(news.created_on) %> <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>

    @@ -54,54 +54,6 @@ <% end %> <% end %> <% end %> - - <% if acts.count > 3 %> - <% activity = acts[3] %> - <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %> - <% document = activity.org_act %> -
  • - <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %> -

    <%= time_from_now(document.created_at) %> - <%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% else activity.container_type == 'OrgSubfield' %> - <% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %> - <% message = activity.org_act %> - <% content = message.parent_id.nil? ? message.content : message.parent.content %> - <% title = message.parent_id.nil? ? message.subject : message.parent.subject %> - <% if message.board.org_subfield_id %> -
  • - <%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> -

    <%= time_from_now(message.created_on) %> - <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% else %> -
  • - <%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %> -

    <%= time_from_now(message.created_on) %> - <%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% end %> - <% end %> - <% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %> - <% news = activity.org_act %> -
  • - <%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %> -

    <%= time_from_now(news.created_on) %> - <%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %> -

    - <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %> -
  • - <% end %> - <% end %> - <% end %> -
<%# if acts.count > 3 %> @@ -114,9 +66,11 @@ <% else %> <%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %> <% end %> - <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %> -

<%= time_from_now(document.created_at) %><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>

- <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %> +
+ <%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %> +

<%= time_from_now(document.created_at) %><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>

+ <%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %> +
<% else activity.container_type == 'OrgSubfield' %> diff --git a/app/views/organizations/_org_custom_left3.html.erb b/app/views/organizations/_org_custom_left3.html.erb index 3d5d01dee..fb2b83dd2 100644 --- a/app/views/organizations/_org_custom_left3.html.erb +++ b/app/views/organizations/_org_custom_left3.html.erb @@ -71,8 +71,8 @@ <% end %> <% end %>
- <% unless acts[1..5].nil? %> - <% acts[1..5].each do |activity| %> + <% unless acts[1..4].nil? %> + <% acts[1..4].each do |activity| %> <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %> <% document = activity.org_act %>
    @@ -110,10 +110,10 @@ <% end %> <% end %>
- <% unless acts[6..19].nil? %> + <% unless acts[5..16].nil? %>
    - <% acts[6..19].each do |activity| %> + <% acts[6..16].each do |activity| %> <% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %> <% document = activity.org_act %>
  • <%= link_to "#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %>
  • diff --git a/app/views/organizations/_org_custom_right3.html.erb b/app/views/organizations/_org_custom_right3.html.erb index a461a38dc..a7f819ca2 100644 --- a/app/views/organizations/_org_custom_right3.html.erb +++ b/app/views/organizations/_org_custom_right3.html.erb @@ -33,9 +33,6 @@
  • 名师风采
  • -
  • - 学生英雄榜 -
@@ -65,29 +62,6 @@ <% end %>
-
-
    - <% excellent_students.each do |student| %> -
  • - <%= link_to image_tag(url_to_avatar(student), :width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(student), :alt => "用户头像", :target => '_blank', :class => "fl" %> -
    - <%=link_to student.try(:realname) ? student.try(:realname) :student.try(:login), user_path(student), :class => "por_teachers_name link-black fl", :target => '_blank' %> -

    <%= student.my_workplace %>

    -
    -

    - <% unless student.my_blogs_count == 0 %> - 博客 <%= student.my_blogs_count %> - <% end %> - <% unless student.courses.count == 0 %> - 课程 <%= student.courses.count %> - <% end %> -

    -
    -
    -
  • - <% end %> -
-