diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index d5359185e..ce7b2db59 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -2,7 +2,7 @@ <% for attachment in attachments %>

- <%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true -%> + <%= link_to_short_attachment attachment, :class => 'icon icon-attachment', :download => true,:id => 'attachment_' -%> <% if attachment.is_text? %> <%= link_to image_tag('magnifier.png'), diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 4fb97bf24..3d8a76537 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -105,66 +105,26 @@ - <%= l(:label_new_course_description) %> : + <%= l(:label_homework_description) %> : - <%= textilizable course.description %> - - - - - - <%= l(:label_create_time) %> : - - - <%= format_time course.created_at %> + <%= textilizable @bid.description %> - <%= l(:lable_course_teacher) %> : + <%= l(:label_limit_time) %>: + - <%= link_to(course.teacher.lastname+course.teacher.firstname, user_path(course.teacher)) %> + <%= @bid.deadline %> - - - - <%= l(:label_class_period) %> : - - - <%= course.class_period.to_s %>  - <%= l(:label_class_hour) %> - - - - - - <%= l(:label_main_term) %> : - - - <%= course.time.to_s %> - <%= course.term %> - - - - - - <%= l(:label_teacher_work_unit) %> : - - - <% unless @user.user_extensions.nil? || @user.user_extensions.school.nil? %> - - <%= link_to @user.user_extensions.school,"http://#{Setting.host_course}/?school_id=#{@user.user_extensions.school.id}" %> - - <% end %> -

@@ -174,8 +134,10 @@ @@ -183,33 +145,9 @@ <%#= @bid.homework_type==Bid::HomeworkFile ? "提交文件" : "提交项目" %> - <% unless @bid.parent_id.nil? %> - - - - <% end %> +
- <%= l(:label_limit_time) %>: - <%= @bid.deadline %> + <% if @bid.attachments.any?%> + <% options = {:author => true,:deletable => (@bid.author.id == User.current.id || User.current.admin? ? true : false)} %> + <%= render :partial => 'attachments/links', :locals => {:attachments => @bid.attachments, :options => options} %> + <% end %>
-
- <% author=Bid.find(@bid.parent_id).author %> - 作业来源于<%= link_to(author.lastname+author.firstname, user_path(Bid.find(@bid.parent_id).author)) %> - 的需求:<%= link_to(Bid.find(@bid.parent_id).name, respond_path(Bid.find(@bid.parent_id))) %> -
-
- - -
-
- - - - -
- <%= render :partial => 'tags/tag', :locals => {:obj => @bid, :object_flag => "4"} %> -
- -
-
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 68b60d31a..d32ebb04b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1894,6 +1894,7 @@ zh: label_new_course_password: 课程密码 label_new_course_school: 开课学校 label_new_course_description: 课程描述 + label_homework_description: 作业描述 label_new_join_order: 请输入课程密码 label_task_submit_form_accessory: 作业最终以附件形式提交 label_task_submit_form_project: 作业最终以项目形式提交