+
共有 <%= all_attachments.count%> 个资源
+
+ <% if order == "asc" %>
+ 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
+ <%= link_to "下载次数",params.merge(:sort=>"downloads:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
+ <%= link_to "引用次数",params.merge(:sort=>"quotes:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
+ <% else %>
+ 按 <%= link_to "时间",params.merge(:sort=>"created_on:asc"),:class => "f_b c_grey" ,:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"created_on"} %> /
+ <%= link_to "下载次数",params.merge(:sort=>"downloads:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"downloads"} %> /
+ <%= link_to "引用次数",params.merge(:sort=>"quotes:asc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'arrow_show',locals: { sort: sort,order:order,current:"quotes"} %> 排序
+ <% end %>
+
+
+
+ <% project_attachments.each do |file| %>
+
+
+ <%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
+ <% if User.current.logged? %>
+ <% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %>
+ <%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
+
+ <% if manage_allowed && file.container_id == project.id && file.container_type == "Project" %>
+
+ <%= link_to (file.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"f_l re_open",:method => :post %>
+
+ <% else %>
+
+ <% end %>
+ <% else %>
+ <%= link_to(l(:label_slected_to_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
+ <% end %>
+ <% else %>
+ <% end %>
+
+
+
+
文件大小:<%= number_to_human_size(file.filesize) %>
+ <%= link_to( l(:button_delete), attachment_path(file),
+ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if manage_allowed && file.container_id == project.id && file.container_type == "Project"%>
+
<%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用<%= file.quotes.nil? ? 0:file.quotes %>
+
+
+
+ <%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "10"} %>
+ <%= render :partial => 'tags/tag_add', :locals => {:obj => file, :object_flag => "10"} %>
+
+
+
+ <% end %>
+
+
- <% if @curse_attachments != nil %>
- <% @curse_attachments.each do |file| %>
+ <% if @obj_attachments != nil %>
+ <% @obj_attachments.each do |file| %>
<%if file.is_public == 0 && !User.current.member_of?(@project)%>
<%next%>
<%end%>
diff --git a/app/views/files/_show_quote_resource_project.html.erb b/app/views/files/_show_quote_resource_project.html.erb
new file mode 100644
index 000000000..7df1dc2f3
--- /dev/null
+++ b/app/views/files/_show_quote_resource_project.html.erb
@@ -0,0 +1,31 @@
+
+
+
将此课件引入我的资源库
+ <% if error == '403' %>
+
+ <% else %>
+
+
+ <%= form_tag attach_relations_path,
+ method: :post,
+ remote: true,
+ id: "relation_file_form" do %>
+ <%= hidden_field_tag(:file_id, file.id) %>
+ <%= content_tag('div', projects_check_box_tags('projects[project][]', User.current.projects,project,file), :id => 'projects')%>
+
引 用取 消
+ <% end -%>
+
+ <% end %>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/files/_upload_show_project.html.erb b/app/views/files/_upload_show_project.html.erb
new file mode 100644
index 000000000..25a03b347
--- /dev/null
+++ b/app/views/files/_upload_show_project.html.erb
@@ -0,0 +1,29 @@
+
+
+
+
<%= l(:label_upload_files)%>
+
+ <%= error_messages_for 'attachment' %>
+
<%= l(:label_file_upload_error_messages)%>
+
+ <%= form_tag(project_files_path(project), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
+
+ <%= render :partial => 'attachement_list',:locals => {:project => project} %>
+
+
<%= l(:button_cancel)%>
+
<%= l(:button_confirm)%>
+ <% end %>
+
+
+
+ <% content_for :header_tags do %>
+ <%= javascript_include_tag 'attachments' %>
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/app/views/files/create.js.erb b/app/views/files/create.js.erb
index 69ea896c9..b00ae3612 100644
--- a/app/views/files/create.js.erb
+++ b/app/views/files/create.js.erb
@@ -1,35 +1,33 @@
-<%if @addTag%>
-<% if @obj_flag == '3'%>
-
-$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
+<% if @addTag%>
+ <% 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 %>
-<%else%>
+ $('#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%>
-$("#all_browse_div").html('<%= j(render partial: "show_all_attachment")%>');
-<%elsif @course%>
-$("#all_browse_div").html('<%= j(render partial: "course_show_all_attachment")%>');
-closeModal();
-$("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
-<%end%>
+ <% if @project%>
+ closeModal();
+ $("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
+ <%elsif @course%>
+ closeModal();
+ $("#resource_list").html('<%= j(render partial: "course_file" ,locals: {course: @course}) %>');
+ <% end %>
<% end %>
$(document).ready(img_thumbnails);
diff --git a/app/views/files/quote_resource_show_project.js.erb b/app/views/files/quote_resource_show_project.js.erb
new file mode 100644
index 000000000..440004357
--- /dev/null
+++ b/app/views/files/quote_resource_show_project.js.erb
@@ -0,0 +1,11 @@
+<% if @can_quote %>
+ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource_project',:locals => {:project => @project,:file => @file,:error => ''}) %>');
+<% else %>
+ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_resource_project',:locals => {:project => @project,:file => @file,:error => '403'}) %>');
+<% end %>
+
+showModal('ajax-modal', '513px');
+$('#ajax-modal').siblings().remove();
+$('#ajax-modal').before("
");
+$('#ajax-modal').parent().css("top","").css("left","");
+$('#ajax-modal').parent().addClass("popbox_polls");
\ No newline at end of file
diff --git a/app/views/files/search_project.js.erb b/app/views/files/search_project.js.erb
new file mode 100644
index 000000000..f64b8beeb
--- /dev/null
+++ b/app/views/files/search_project.js.erb
@@ -0,0 +1 @@
+$("#course_list").html("<%= escape_javascript(render :partial => 'project_file_list',:locals => {project: @project,all_attachments: @result,sort:@sort,order:@order,project_attachments:@searched_attach,:manage_allowed => User.current.allowed_to?(:manage_files, @project)})%>");
\ No newline at end of file
diff --git a/app/views/homework_attach/_homework.html.erb b/app/views/homework_attach/_homework.html.erb
index 2b5c48cd4..a7d803f86 100644
--- a/app/views/homework_attach/_homework.html.erb
+++ b/app/views/homework_attach/_homework.html.erb
@@ -1,114 +1,114 @@
-<% bid = homework.bid%>
-
- <% if is_student_batch_homework %>
-
- <%= image_tag(url_to_avatar("匿名"), :width => "40", :height => "40")%>
- 匿名
- <% else %>
- <%= link_to image_tag(url_to_avatar(homework.user), :width => "40", :height => "40"), user_path(homework.user) %>
-
- <% user_realname = homework.user.lastname.to_s + homework.user.firstname.to_s %>
- <% user_name = is_teacher ? (user_realname.empty? ? homework.user.login : user_realname) : homework.user.login %>
- <%= link_to user_name, user_path(homework.user), :title => user_name %>
-
- <% end %>
-
-
- <% if homework.name == nil || homework.name == "" %>
- <% homework_filename = homework.user.name + "提交的作业" %>
- <% else %>
- <% homework_filename = homework.name %>
- <% end %>
- <%= link_to homework_filename , homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type,:cur_sort => @cur_sort, :cur_direction => @cur_direction), :title => homework_filename, :remote => true%>
-
- 提交时间:
- <%= format_time homework.created_at%>
-
-
-
- <%#= link_to "(#{homework.attachments.count.to_s}个附件)", "javascript:"%>
-
-
- <% unless is_student_batch_homework %>
- <%= l(:label_teacher_score)%>:
-
- <%= (homework.t_score.nil? || (homework.t_score && homework.t_score.to_i == 0)) ? l(:label_without_score) : format("%.2f",homework.t_score)%>
-
-
- <% end %>
-
-
- <%= is_student_batch_homework ? l(:label_my_score) : l(:label_student_score)%>:
-
- <%= is_student_batch_homework ? (homework.m_score.nil? ? l(:label_without_score) : format("%.2f",homework.m_score)) : (homework.s_score.nil? ? l(:label_without_score) : format("%.2f",homework.s_score))%>
-
-
-<% if is_teacher %>
-
-
- <%= link_to l(:label_work_rating),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type,:cur_sort => @cur_sort, :cur_direction => @cur_direction),:remote => true %>
- <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
- 迟交!
- <% end %>
-
-<% else %>
-
- <% if is_my_homework %>
-
- <% if bid.comment_status == 0 || bid.open_anonymous_evaluation == 0 %>
-
- <%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
- <% if homework.user == User.current || User.current.admin? %>
-
- <%= link_to(l(:label_bid_respond_delete), homework,
- method: :delete, :confirm => l(:text_are_you_sure), :remote => true ) %>
- <% else %>
-
- <%= link_to l(:label_logout), destory_homework_users_homework_attach_path(homework,:user_id=>User.current.id),
- :remote => true, :confirm => l(:label_sure_exit_homework) %>
- <% end %>
-
- <% else %>
-
- <%= l(:button_edit) %>
- <% if homework.user == User.current || User.current.admin? %>
-
-
- <%=l(:label_bid_respond_delete)%>
-
- <% else %>
-
-
- <%=l(:label_logout) %>
-
- <% end %>
-
- <% end %>
- <% elsif is_student_batch_homework%>
-
- <% if bid.comment_status == 1 %>
-
-
- <%= link_to l(:label_anonymous_comments),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
- <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
- 迟交!
- <% end %>
-
- <% elsif bid.comment_status == 2%>
-
-
-
- <%= l(:label_anonymous_comments) %>
-
- <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
- 迟交!
- <% end %>
-
- <% end %>
- <% else %>
-
-
- <%= render :partial => "homework_attach/homework_praise", locals: {:homework => homework} %>
-
- <% end %>
+<% bid = homework.bid%>
+
+ <% if is_student_batch_homework %>
+
+ <%= image_tag(url_to_avatar("匿名"), :width => "40", :height => "40")%>
+ 匿名
+ <% else %>
+ <%= link_to image_tag(url_to_avatar(homework.user), :width => "40", :height => "40"), user_path(homework.user) %>
+
+ <% user_realname = homework.user.lastname.to_s + homework.user.firstname.to_s %>
+ <% user_name = is_teacher ? (user_realname.empty? ? homework.user.login : user_realname) : homework.user.login %>
+ <%= link_to user_name, user_path(homework.user), :title => user_name %>
+
+ <% end %>
+
+
+ <% if homework.name == nil || homework.name == "" %>
+ <% homework_filename = homework.user.name + "提交的作业" %>
+ <% else %>
+ <% homework_filename = homework.name %>
+ <% end %>
+ <%= link_to homework_filename , homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type,:cur_sort => @cur_sort, :cur_direction => @cur_direction), :title => homework_filename, :remote => true%>
+
+ 提交时间:
+ <%= format_time homework.created_at%>
+
+
+
+ <%= link_to "(#{homework.attachments.count.to_s}个附件)", zipdown_download_user_homework_path(:homework => homework)%>
+
+
+ <% unless is_student_batch_homework %>
+ <%= l(:label_teacher_score)%>:
+
+ <%= (homework.t_score.nil? || (homework.t_score && homework.t_score.to_i == 0)) ? l(:label_without_score) : format("%.2f",homework.t_score)%>
+
+
+ <% end %>
+
+
+ <%= is_student_batch_homework ? l(:label_my_score) : l(:label_student_score)%>:
+
+ <%= is_student_batch_homework ? (homework.m_score.nil? ? l(:label_without_score) : format("%.2f",homework.m_score)) : (homework.s_score.nil? ? l(:label_without_score) : format("%.2f",homework.s_score))%>
+
+
+<% if is_teacher %>
+
+
+ <%= link_to l(:label_work_rating),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type,:cur_sort => @cur_sort, :cur_direction => @cur_direction),:remote => true %>
+ <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
+ 迟交!
+ <% end %>
+
+<% else %>
+
+ <% if is_my_homework %>
+
+ <% if bid.comment_status == 0 || bid.open_anonymous_evaluation == 0 %>
+
+ <%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
+ <% if homework.user == User.current || User.current.admin? %>
+
+ <%= link_to(l(:label_bid_respond_delete), homework,
+ method: :delete, :confirm => l(:text_are_you_sure), :remote => true ) %>
+ <% else %>
+
+ <%= link_to l(:label_logout), destory_homework_users_homework_attach_path(homework,:user_id=>User.current.id),
+ :remote => true, :confirm => l(:label_sure_exit_homework) %>
+ <% end %>
+
+ <% else %>
+
+ <%= l(:button_edit) %>
+ <% if homework.user == User.current || User.current.admin? %>
+
+
+ <%=l(:label_bid_respond_delete)%>
+
+ <% else %>
+
+
+ <%=l(:label_logout) %>
+
+ <% end %>
+
+ <% end %>
+ <% elsif is_student_batch_homework%>
+
+ <% if bid.comment_status == 1 %>
+
+
+ <%= link_to l(:label_anonymous_comments),homework_attach_path(homework,:cur_page => @cur_page,:cur_type => @cur_type),:remote => true %>
+ <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
+ 迟交!
+ <% end %>
+
+ <% elsif bid.comment_status == 2%>
+
+
+
+ <%= l(:label_anonymous_comments) %>
+
+ <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
+ 迟交!
+ <% end %>
+
+ <% end %>
+ <% else %>
+
+
+ <%= render :partial => "homework_attach/homework_praise", locals: {:homework => homework} %>
+
+ <% end %>
<% end %>
\ No newline at end of file
diff --git a/app/views/kaminari/_first_page.html.erb b/app/views/kaminari/_first_page.html.erb
index a732013b7..3a5b3e2dc 100644
--- a/app/views/kaminari/_first_page.html.erb
+++ b/app/views/kaminari/_first_page.html.erb
@@ -6,6 +6,7 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-
- <%= link_to_unless current_page.first?, l('views.pagination.first').html_safe, url, :remote => remote %>
+
+ <%= link_to_unless current_page.first?, l('views.pagination.first').html_safe, url, :remote => remote, :class => 'next c_blue' %>
+
diff --git a/app/views/kaminari/_gap.html.erb b/app/views/kaminari/_gap.html.erb
index 01b6cc640..fa1038998 100644
--- a/app/views/kaminari/_gap.html.erb
+++ b/app/views/kaminari/_gap.html.erb
@@ -5,6 +5,6 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-
-<%= raw(t 'views.pagination.truncate') %>
-
\ No newline at end of file
+
+<%= link_to raw(t 'views.pagination.truncate'),:class=>'c_blue' %>
+
\ No newline at end of file
diff --git a/app/views/kaminari/_next_page.html.erb b/app/views/kaminari/_next_page.html.erb
index 59c3d0a21..a94b629a8 100644
--- a/app/views/kaminari/_next_page.html.erb
+++ b/app/views/kaminari/_next_page.html.erb
@@ -6,6 +6,6 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-
- <%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, :rel => 'next', :remote => remote %>
-
+
+ <%= link_to_unless current_page.last?, t('views.pagination.next').html_safe, url, :rel => 'next', :remote => remote, :class => "next c_blue" %>
+
diff --git a/app/views/kaminari/_page.html.erb b/app/views/kaminari/_page.html.erb
index a40f17dc4..89e8b85ab 100644
--- a/app/views/kaminari/_page.html.erb
+++ b/app/views/kaminari/_page.html.erb
@@ -8,6 +8,6 @@
remote: data-remote
<%= link_to_unless page.current?, page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
-%>
-
- <%= link_to page, url, page.current? ? {:remote => remote,:class => 'current-page', :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} : {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
-
+
+ <%= link_to page, url, page.current? ? {:remote => remote,:class => 'current-page c_white', :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} : {:remote => remote,:class => 'page c_blue', :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
+
diff --git a/app/views/kaminari/_paginator.html.erb b/app/views/kaminari/_paginator.html.erb
index ace425d08..b4d5ee4ea 100644
--- a/app/views/kaminari/_paginator.html.erb
+++ b/app/views/kaminari/_paginator.html.erb
@@ -7,8 +7,8 @@
paginator: the paginator that renders the pagination tags inside
-%>
<%= paginator.render do -%>
-
+
+
<% end -%>
diff --git a/app/views/kaminari/_prev_page.html.erb b/app/views/kaminari/_prev_page.html.erb
index c44edd07a..693977716 100644
--- a/app/views/kaminari/_prev_page.html.erb
+++ b/app/views/kaminari/_prev_page.html.erb
@@ -6,6 +6,7 @@
per_page: number of items to fetch per page
remote: data-remote
-%>
-
- <%= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, :rel => 'prev', :remote => remote %>
+
+ <%= link_to_unless current_page.first?, t('views.pagination.previous').html_safe, url, :rel => 'prev', :remote => remote ,:class=>"previous c_blue"%>
+
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb
index e787cfa54..9fed77faf 100644
--- a/app/views/layouts/base_courses.html.erb
+++ b/app/views/layouts/base_courses.html.erb
@@ -1,6 +1,7 @@
<% course_model %>
<% teacher_num = teacherCount(@course) %>
<% student_num = studentCount(@course) %>
+<% course_file_num = visable_attachemnts_incourse(@course).count%>
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
@@ -47,7 +48,7 @@
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get, :class => "search_form") do %>
- <%= text_field_tag 'name', params[:name], :placeholder => "课程名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
+ <%= text_field_tag 'name', params[:name], :placeholder => l(:label_course_name), :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
<%= l(:label_search)%>
@@ -94,7 +95,7 @@
|
<%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>)
|
- <%= l(:project_module_attachments)%>(<%= link_to @course.attachments.count, course_files_path(@course), :class => 'info_foot_num c_blue' %>)
+ <%= l(:project_module_attachments)%>(<%= link_to course_file_num, course_files_path(@course), :class => 'info_foot_num c_blue' %>)
@@ -125,7 +126,9 @@
<%= link_to( "+#{l(:label_course_news_new)}", new_course_news_path(@course), :class => 'subnav_green c_white') if is_teacher %>
- <%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %><%= link_to "(#{@course.attachments.count})", course_files_path(@course), :class => "subnav_num c_orange" %><%= link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
+ <%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %>
+ <%= link_to "(#{course_file_num})", course_files_path(@course), :class => "subnav_num c_orange" %>
+ <%= link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
<%= link_to l(:label_course_board), course_boards_path(@course), :class => "f14 c_blue02" %>
diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb
index 1735bd899..712e11246 100644
--- a/app/views/mailer/send_for_user_activities.html.erb
+++ b/app/views/mailer/send_for_user_activities.html.erb
@@ -1,373 +1,373 @@
-
-
-
-
-
-
-
-<%= @subject %>
-
-<% if @attachments.first || @course_news.first || @bids.first ||
- @homeworks.first || @course_journal_messages.first|| @course_messages.first %>
-
-
<%= l(:label_course_overview)%>
- <% unless @course_news.first.nil? %>
-
-
-
- <%= l(:label_course_news) %>
- (<%= @course_news.count %>)
-
-
- <% @course_news.each do |course_new|%>
- -
- ▪
- [
-
- <%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_project_notice) %>
-
- <%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(course_new.created_on) %>
-
- <% end %>
-
-
-
- <% end %>
- <% if !@bids.first.nil? || !@homeworks.first.nil? %>
-
-
- <%= l(:label_homework_overview) %>(<%= @bids.count %>)
- <% unless @bids.first.nil?%>
- <% @bids.each do |bid| %>
- -
- ▪
- [
-
- <%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_course_homework) %>
-
- <%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => bid.id,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(bid.created_on) %>
-
- <% end %>
- <% end %>
- <% unless @homeworks.first.nil? %>
- <% @homeworks.each do |homework| %>
- -
- ▪
- [
-
- <%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_course_submit_homework) %>
-
- <%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => homework.bid.id,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(homework.created_on) %>
-
- <% end %>
- <% end %>
-
-
-
- <% end %>
-
- <% unless @course_journal_messages.first.nil? %>
-
-
-
- <%= l(:view_course_journals_for_messages) %>
- (<%= @course_journal_messages.count %>)
-
-
- <% @course_journal_messages.each do |course_journal_message|%>
- -
- ▪
- [
-
- <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_send_course_journals_for_messages) %>
-
- <%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(course_journal_message.created_on) %>
-
- <% end %>
-
-
-
- <% end %>
-
- <% unless @course_messages.first.nil? %>
-
-
-
- <%= l(:view_borad_course) %>
- (<%= @course_journal_messages.count %>)
-
-
- <% @course_messages.each do |course_message|%>
- -
- ▪
- [
-
- <%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_send_course_messages) %>
-
- <%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(course_message.created_on) %>
-
- <% end %>
-
-
-
- <% end %>
-
- <% unless @attachments.first.nil? %>
-
-
- <%= l(:label_course_attendingcontestwork_download) %>
- (<%= @attachments.count %>)
-
-
- <% @attachments.each do |attachment|%>
- -
- ▪
- [
-
- <%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_course_file_upload) %>
-
- <%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(attachment.created_on) %>
-
- <% end %>
-
-
- <% end %>
-
- <% end %>
- <% if @issues.first || @project_messages.first %>
-
-
<%= l(:label_project_overview_new)%>
- <% unless @issues.first.nil? %>
-
-
- <%= l(:label_issue_tracking) %>
- (<%= @issues.count %>)
-
-
- <% @issues.each do |issue|%>
- -
- ▪
- [
-
- <%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_project_issue) %>
-
- <%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(issue.created_on) %>
-
- <% end %>
-
-
-
- <% end %>
-
- <% unless @project_messages.first.nil? %>
-
-
- <%= l(:project_moule_boards_show) %>
- (<%= @project_messages.count %>)
-
-
- <% @project_messages.each do |project_message|%>
- -
- ▪
- [
-
- <%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
- :class=> "wmail_column",
- :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- ]
-
- <%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
- <%= l(:label_send_course_messages) %>
-
- <%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(project_message.created_on) %>
-
- <% end %>
-
-
-
- <% end %>
-
-
-
-
- <% end %>
- <% unless @user_journal_messages.first.nil? %>
-
-
<%= l(:label_activities) %>
-
-
-
- <%= l(:label_user_message) %>
- (<%= @user_journal_messages.count %>)
-
-
- <% @user_journal_messages.each do |user_journal_message|%>
- -
- ▪
-
- <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
- :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- <%= l(:label_show_your_message) %>
-
- <%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(user_journal_message.created_on) %>
-
- <% end %>
-
-
-
-
-
- <% end %>
- <% if @forums.first || @memos.first %>
-
-
<%= l(:lable_bar_active) %>
- <% unless @forums.first.nil? %>
-
-
- <%= l(:label_user_forum) %>
- (<%= @forums.count %>)
-
-
- <% @forums.each do |forum|%>
- -
- ▪
-
- <%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
- :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- <%= l(:label_forum_new) %>
-
- <%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(forum.created_at) %>
-
- <% end %>
-
-
-
- <% end %>
- <% unless @memos.first.nil? %>
-
-
- <%= l(:label_user_message_forum) %>
- (<%= @memos.count %>)
-
-
- <% @memos.each do |memo|%>
- -
- ▪
-
- <%= link_to memo.author, user_activities_url(memo.author,:token => @token.value),
- :class => "wmail_name",
- :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
- <%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
-
- <%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id)),
- :class => 'wmail_info',
- :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
- %>
- <%= format_time(memo.created_at) %>
-
- <% end %>
-
-
-
- <% end %>
-
-<% end %>
-
-
-
-
-
+
+
+
+
+
+
+
+<%= @subject %>
+
+<% if @attachments.first || @course_news.first || @bids.first ||
+ @homeworks.first || @course_journal_messages.first|| @course_messages.first %>
+
+
<%= l(:label_course_overview)%>
+ <% unless @course_news.first.nil? %>
+
+
+
+ <%= l(:label_course_news) %>
+ (<%= @course_news.count %>)
+
+
+ <% @course_news.each do |course_new|%>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_project_notice) %>
+
+ <%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(course_new.created_on) %>
+
+ <% end %>
+
+
+
+ <% end %>
+ <% if !@bids.first.nil? || !@homeworks.first.nil? %>
+
+
+ <%= l(:label_homework_overview) %>(<%= @bids.count %>)
+ <% unless @bids.first.nil?%>
+ <% @bids.each do |bid| %>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_course_homework) %>
+
+ <%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => bid.id,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(bid.created_on) %>
+
+ <% end %>
+ <% end %>
+ <% unless @homeworks.first.nil? %>
+ <% @homeworks.each do |homework| %>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_course_submit_homework) %>
+
+ <%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => homework.bid.id,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(homework.created_at) %>
+
+ <% end %>
+ <% end %>
+
+
+
+ <% end %>
+
+ <% unless @course_journal_messages.first.nil? %>
+
+
+
+ <%= l(:view_course_journals_for_messages) %>
+ (<%= @course_journal_messages.count %>)
+
+
+ <% @course_journal_messages.each do |course_journal_message|%>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_send_course_journals_for_messages) %>
+
+ <%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(course_journal_message.created_on) %>
+
+ <% end %>
+
+
+
+ <% end %>
+
+ <% unless @course_messages.first.nil? %>
+
+
+
+ <%= l(:view_borad_course) %>
+ (<%= @course_journal_messages.count %>)
+
+
+ <% @course_messages.each do |course_message|%>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_send_course_messages) %>
+
+ <%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(course_message.created_on) %>
+
+ <% end %>
+
+
+
+ <% end %>
+
+ <% unless @attachments.first.nil? %>
+
+
+ <%= l(:label_course_attendingcontestwork_download) %>
+ (<%= @attachments.count %>)
+
+
+ <% @attachments.each do |attachment|%>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_course_file_upload) %>
+
+ <%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(attachment.created_on) %>
+
+ <% end %>
+
+
+ <% end %>
+
+ <% end %>
+ <% if @issues.first || @project_messages.first %>
+
+
<%= l(:label_project_overview_new)%>
+ <% unless @issues.first.nil? %>
+
+
+ <%= l(:label_issue_tracking) %>
+ (<%= @issues.count %>)
+
+
+ <% @issues.each do |issue|%>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_project_issue) %>
+
+ <%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(issue.created_on) %>
+
+ <% end %>
+
+
+
+ <% end %>
+
+ <% unless @project_messages.first.nil? %>
+
+
+ <%= l(:project_moule_boards_show) %>
+ (<%= @project_messages.count %>)
+
+
+ <% @project_messages.each do |project_message|%>
+ -
+ ▪
+ [
+
+ <%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
+ :class=> "wmail_column",
+ :style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ ]
+
+ <%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
+ <%= l(:label_send_course_messages) %>
+
+ <%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(project_message.created_on) %>
+
+ <% end %>
+
+
+
+ <% end %>
+
+
+
+
+ <% end %>
+ <% unless @user_journal_messages.first.nil? %>
+
+
<%= l(:label_activities) %>
+
+
+
+ <%= l(:label_user_message) %>
+ (<%= @user_journal_messages.count %>)
+
+
+ <% @user_journal_messages.each do |user_journal_message|%>
+ -
+ ▪
+
+ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
+ :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ <%= l(:label_show_your_message) %>
+
+ <%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(user_journal_message.created_on) %>
+
+ <% end %>
+
+
+
+
+
+ <% end %>
+ <% if @forums.first || @memos.first %>
+
+
<%= l(:lable_bar_active) %>
+ <% unless @forums.first.nil? %>
+
+
+ <%= l(:label_user_forum) %>
+ (<%= @forums.count %>)
+
+
+ <% @forums.each do |forum|%>
+ -
+ ▪
+
+ <%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
+ :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ <%= l(:label_forum_new) %>
+
+ <%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(forum.created_at) %>
+
+ <% end %>
+
+
+
+ <% end %>
+ <% unless @memos.first.nil? %>
+
+
+ <%= l(:label_user_message_forum) %>
+ (<%= @memos.count %>)
+
+
+ <% @memos.each do |memo|%>
+ -
+ ▪
+
+ <%= link_to memo.author, user_activities_url(memo.author,:token => @token.value),
+ :class => "wmail_name",
+ :style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
+ <%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
+
+ <%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id)),
+ :class => 'wmail_info',
+ :style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
+ %>
+ <%= format_time(memo.created_at) %>
+
+ <% end %>
+
+
+
+ <% end %>
+
+<% end %>
+
+
+
+
+
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index ad07a190b..d47157e61 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -1,3 +1,34 @@
+
<%= l(:label_board) %>
@@ -24,7 +55,7 @@
:class => 'talk_edit fr'
) if @message.course_destroyable_by?(User.current) %>
-
<%= textilizable(@topic, :content) %>
+
<%= textAreailizable(@topic, :content) %>
<%= link_to_attachments_course @topic, :author => false %>
@@ -52,7 +83,7 @@
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
<%= format_time(message.created_on) %>
-
<%= textilizable message,:content,:attachments => message.attachments %>
+
<%= textAreailizable message,:content,:attachments => message.attachments %>
<%= link_to_attachments_course message, :author => false %>
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb
index ed6011e29..3334f7c6a 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -44,6 +44,7 @@
function submitNews()
{
+ news_description_editor.sync();
if(regexTitle() && regexDescription())
{
$("#news-form").submit();
@@ -51,6 +52,7 @@
}
function submitComment()
{
+ comment_editor.sync();
$("#add_comment_form").submit();
}
function clearMessage()
@@ -58,7 +60,7 @@
$("#comment_comments").val("");
}
-
+<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<%= l(:label_course_news) %>
@@ -84,7 +86,7 @@
:onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @course) %>
<%= delete_link(news_path(@news),:class => 'talk_edit fr') if User.current.allowed_to?(:manage_news, @course) %>
- <%= textilizable(@news, :description) %>
<%= l(:label_create_time) %> : <%= format_time(@news.created_on) %>
+ <%= textAreailizable(@news, :description) %>
<%= l(:label_create_time) %> : <%= format_time(@news.created_on) %>
<%= link_to_attachments_course @news %>
@@ -95,8 +97,9 @@
<%= l(:label_comment_add) %>
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %>
-
- <%= text_area 'comment', 'comments', :placeholder=>"最多250个字"%>
+
+ <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
+ <%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>
<%= l(:label_cancel_with_space) %>
@@ -106,6 +109,7 @@
<% end %>
<% end %>
+
<% comments = @comments.reverse %>
<% comments.each do |comment| %>
<% next if comment.new_record? %>
@@ -115,7 +119,7 @@
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %>
<%= format_time(comment.created_on) %>
-
<%= textilizable(comment.comments) %>
+
<%= textAreailizable(comment.comments) %>