diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 3fa3f311d..7f09906b5 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -1,3 +1,4 @@ +#coding=utf-8 module Mobile module Entities class Issue 'hw_btn_green fr mt5', :title => "查看作品", :target => '_blank' + else User.current.member_of_course?(homework.course) work = cur_user_works_for_homework homework project = cur_user_projects_for_homework homework if work.nil? && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") if homework.homework_type ==3 && project.nil? && homework.homework_detail_group.base_on_project == 1 - link_to "查看详情", homework_common_index_path(:course_id => homework.course_id), :class => 'hw_btn_green2 fr mt5',:title => '查看分组作业详情', :target => '_blank' + link_to "查看详情", homework_common_index_path(:course_id => homework.course_id), :class => 'hw_btn_green fr mt5',:title => '查看分组作业详情', :target => '_blank' else - link_to "提交作品", new_student_work_url_without_domain(homework.id),:class => 'hw_btn_green2 fr mt5', :target => '_blank' + link_to "提交作品", new_student_work_url_without_domain(homework.id),:class => 'hw_btn_green fr mt5', :target => '_blank' end elsif work.nil? && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") if homework.homework_type ==3 && project.nil? && homework.homework_detail_group.base_on_project == 1 - link_to "查看详情", homework_common_index_path(:course_id => homework.course_id), :class => 'hw_btn_green2 fr mt5',:title => '查看分组作业详情', :target => '_blank' + link_to "查看详情", homework_common_index_path(:course_id => homework.course_id), :class => 'hw_btn_green fr mt5',:title => '查看分组作业详情', :target => '_blank' else link_to "补交作品", new_student_work_url_without_domain(homework.id),:class => 'btn_orange_big fr mt5', :target => '_blank' end else if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 2 #匿评作业,且作业状态不是在开启匿评之前 - link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'hw_btn_green2 fr mt5', :title => "开启匿评后不可修改作品", :target => '_blank' + link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'hw_btn_green fr mt5', :title => "开启匿评后不可修改作品", :target => '_blank' elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3 - link_to "查看作品",student_work_index_url_in_org(homework.id, 2), :class => 'hw_btn_green2 fr mt5', :title => "匿评已结束", :target => '_blank' + link_to "查看作品",student_work_index_url_in_org(homework.id, 2), :class => 'hw_btn_green fr mt5', :title => "匿评已结束", :target => '_blank' elsif homework.homework_type == 2 && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")#编程作业不能修改作品 - link_to "修改作品", new_student_work_url_without_domain(homework.id),:class => 'hw_btn_green2 fr mt5', :target => '_blank' + link_to "修改作品", new_student_work_url_without_domain(homework.id),:class => 'hw_btn_green fr mt5', :target => '_blank' elsif Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") && work.user_id == User.current.id - link_to "修改作品", edit_student_work_url_without_domain(work.id),:class => 'hw_btn_green2 fr mt5', :target => '_blank' + link_to "修改作品", edit_student_work_url_without_domain(work.id),:class => 'hw_btn_green fr mt5', :target => '_blank' else - link_to "查看作品", student_work_index_url_in_org(homework.id, 2), :class => 'hw_btn_green2 fr mt5', :title => "作业截止后不可修改作品", :target => '_blank' + link_to "查看作品", student_work_index_url_in_org(homework.id, 2), :class => 'hw_btn_green fr mt5', :title => "作业截止后不可修改作品", :target => '_blank' end end end diff --git a/app/views/courses/_new_member_list.html.erb b/app/views/courses/_new_member_list.html.erb index d04e14cc8..796d4ae92 100644 --- a/app/views/courses/_new_member_list.html.erb +++ b/app/views/courses/_new_member_list.html.erb @@ -1,6 +1,6 @@ <% is_teacher = User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %> <% if members.any? %> - +
@@ -123,7 +123,7 @@ <%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id, :group_id => @group && @group != -1 ? @group.id : -1},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
- +
<%= select( :name,:group_id, course_group_option(@course), { :include_blank => false,:selected => member.course_group_id}, @@ -136,7 +136,7 @@ <% if is_teacher %> <% end %> @@ -159,6 +159,11 @@ \ No newline at end of file diff --git a/app/views/repositories/_dir_list.html.erb b/app/views/repositories/_dir_list.html.erb index c17154cbf..395bf2860 100644 --- a/app/views/repositories/_dir_list.html.erb +++ b/app/views/repositories/_dir_list.html.erb @@ -1,18 +1,20 @@
序号 - +
- - - - - - - - + <% unless @path.blank? %> + + + + + + + + + <% end %> <%= render :partial => 'dir_list_content' %> diff --git a/app/views/student_work/_evaluation_un_group.html.erb b/app/views/student_work/_evaluation_un_group.html.erb index 6b973aedc..57202c357 100644 --- a/app/views/student_work/_evaluation_un_group.html.erb +++ b/app/views/student_work/_evaluation_un_group.html.erb @@ -12,12 +12,12 @@
  • - <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %> + <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user) %>
    <%= render :partial => 'users/message_contents', :locals => {:comment => comment}%> diff --git a/app/views/users/_project_issue_reply.html.erb b/app/views/users/_project_issue_reply.html.erb index fb2fc214e..6b16b3411 100644 --- a/app/views/users/_project_issue_reply.html.erb +++ b/app/views/users/_project_issue_reply.html.erb @@ -10,7 +10,7 @@ <% end %>
    -
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author), :alt => "用户头像" %>
    <% if User.current.logged? %>
    diff --git a/db/schema.rb b/db/schema.rb index a97bb4b69..bb1f1bc1c 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 => 20161111070615) do +ActiveRecord::Schema.define(:version => 20161111081619) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -518,20 +518,6 @@ ActiveRecord::Schema.define(:version => 20161111070615) do t.integer "container_id", :default => 0 end - create_table "course_class_post", :id => false, :force => true do |t| - t.integer "班级id", :default => 0, :null => false - t.string "班级名" - t.integer "帖子id", :default => 0, :null => false - t.integer "主贴id" - t.string "帖子标题", :default => "", :null => false - t.text "帖子内容" - t.integer "帖子用户id" - t.integer "帖子回复数", :default => 0, :null => false - t.integer "最后回帖id" - t.datetime "发帖时间", :null => false - t.datetime "帖子更新时间", :null => false - end - create_table "course_contributor_scores", :force => true do |t| t.integer "course_id" t.integer "user_id" @@ -1876,6 +1862,7 @@ ActiveRecord::Schema.define(:version => 20161111070615) do t.integer "is_leader" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.integer "course_id" end add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 27d03ab0b..c9db3c4e3 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -110,7 +110,7 @@ function addFile(inputEl, file, eagerUpload,btnId) { 'class': 'upload_filename readonly hidden', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly', - 'style': 'border:none; width:464px;' + 'style': 'border:none; max-width:270px;' }).val(file.name), // $('', { // 'type': 'text', diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index 62f6805f3..afe6192fb 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -195,6 +195,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .mt6{ margin-top:6px;} .mt7 {margin-top:7px;} .mt8{ margin-top:8px !important;} +.mt9{ margin-top:9px !important;} .mt10{ margin-top:10px !important;} .mt12 { margin-top:12px !important;} .mt15 {margin-top:15px;}
  • - - - 返回上级目录 - -
    + + + 返回上级目录 + +