项目动态添加at
This commit is contained in:
parent
4f57e48b92
commit
8d797c5c0b
|
@ -6,7 +6,8 @@ class AtController < ApplicationController
|
||||||
def show
|
def show
|
||||||
@logger = Logger.new(Rails.root.join('log', 'at.log').to_s)
|
@logger = Logger.new(Rails.root.join('log', 'at.log').to_s)
|
||||||
users = find_at_users(params[:type], params[:id])
|
users = find_at_users(params[:type], params[:id])
|
||||||
@users = users.uniq { |u| u.id }.delete_if { |u| u.id == User.current.id }
|
@users = users
|
||||||
|
@users = users.uniq { |u| u.id }.delete_if { |u| u.id == User.current.id } if users
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -25,6 +26,8 @@ class AtController < ApplicationController
|
||||||
find_attachment(id)
|
find_attachment(id)
|
||||||
when 'Message'
|
when 'Message'
|
||||||
find_message(id)
|
find_message(id)
|
||||||
|
when 'HomeworkCommon'
|
||||||
|
find_homework(id)
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor", '/assets/kindeditor/pasteimg', "init_activity_KindEditor" %>
|
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
/*回复框*/
|
/*回复框*/
|
||||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
init_activity_KindEditor_data(<%= activity.id%>, null, "87%");
|
init_activity_KindEditor_data(<%= activity.id%>, null, "87%", "<%= activity.class.to_s %>");
|
||||||
showNormalImage('activity_description_<%= activity.id %>');
|
showNormalImage('activity_description_<%= activity.id %>');
|
||||||
if ($("#intro_content_<%= activity.id %>").height() > 360) {
|
if ($("#intro_content_<%= activity.id %>").height() > 360) {
|
||||||
$("#intro_content_show_<%= activity.id %>").show();
|
$("#intro_content_show_<%= activity.id %>").show();
|
||||||
|
|
Loading…
Reference in New Issue