-
+
+
From 4b9bc7f0fccdd95f7c81acc52521088864d9fe7f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 21 Nov 2014 15:03:56 +0800 Subject: [PATCH 01/29] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 5222b466f..0330b65e4 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -8,8 +8,12 @@ <%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
<%=link_to @memo.author.name, user_path(@memo.author) %>
++ <%=link_to @memo.author.name, user_path(@memo.author) %> +
文件大小:<%= number_to_human_size(file.filesize) %>
+文件大小:<%= 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 delete_allowed && file.container_id == @course.id && file.container_type == "Course"%><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用0
diff --git a/app/views/tags/_tag_add.html.erb b/app/views/tags/_tag_add.html.erb index 14f2dc965..0b59015f2 100644 --- a/app/views/tags/_tag_add.html.erb +++ b/app/views/tags/_tag_add.html.erb @@ -1,13 +1,14 @@ <%= link_to '+ 添加标签', 'javascript:void(0);', :class => "yellowBtn f_l", :onclick=>"$('#add_tag_#{obj.id}').slideToggle();" if User.current.logged? %> - \ No newline at end of file diff --git a/public/stylesheets/resource.css b/public/stylesheets/resource.css index 1046429be..fc6b74b75 100644 --- a/public/stylesheets/resource.css +++ b/public/stylesheets/resource.css @@ -12,11 +12,12 @@ a:hover{ text-decoration:underline;} .b_lblue{ background:#64bdd9 !important;} .b_dblue{ background:#55a1b9 !important; cursor:pointer !important;} .f_b{ font-weight: bold !important;} -.c_blue{ color:#64bdd9;} +.c_blue{ color:#64bdd9 !important;} .c_grey{ color:#999999 !important;} .c_grey02{ color:#666666 !important;} +.font{ font-size: 12px;} .f_14{ font-size:14px ;} -.c_dblue{ color:#3e6d8e;} +.c_dblue{ color:#3e6d8e !important;} .w90{width:90px;} .ml10{margin-left:10px;} .ml5{margin-left:5px;} @@ -46,14 +47,14 @@ a:hover{ text-decoration:underline;} text-shadow: none !important; } a.re_fabu { display:block; width:90px; height:35px; font-size:14px; color:#fff; text-align:center; padding-top:5px; margin:5px; } -a:hover.re_fabu{background:#55a1b9;} +a:hover.re_fabu{background:#55a1b9 !important;} /****列表***/ .re_con{ margin:5px; width:683px;} .re_con_top{color:#494949; } .re_con_top span{ color:#999999; font-weight:bold;} a.re_select{ display:block; width:88px; height:22px; background:url(images/pic_select01.png) 0 0 no-repeat; color:#fff; font-weight:bold; margin-left:10px;} a:hover.re_select{background:url(images/pic_select02.png) 0 0 no-repeat;} -.re_open{display:block; width:46px; height:22px; background:url(images/pic_open01.png) 0 0 no-repeat; color:#fff; font-weight:bold; margin-left:10px;} +.re_open{display:block; width:46px; height:22px; background:url(images/pic_open01.png) 0 0 no-repeat; color:#fff !important; font-weight:bold; margin-left:10px;} a:hover.re_open{background:url(images/pic_open02.png) 0 0 no-repeat;} a.re_de{ color:#6883b6; margin-left:15px;} .re_con_box{ border-bottom:1px dashed #dadada; padding:10px 0;} @@ -76,7 +77,6 @@ a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} margin-top:2px !important; margin-left:3px !important; border:none !important; - margin-left:0px !important; box-shadow: none !important; padding: 0px !important; border-radius: 0 !important; From ea19c1aeefed788f49491cfd22a20a9f66570b98 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 22 Nov 2014 09:33:37 +0800 Subject: [PATCH 07/29] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=95=99=E5=B8=88?= =?UTF-8?q?=E8=AF=84=E5=88=86=E6=89=80=E5=8D=A0=E6=AF=94=E4=BE=8B=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_homework_form.html.erb | 2 +- app/views/courses/_homework_form.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index cd682deb0..12393c558 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -40,7 +40,7 @@ -+
diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb index 8ce6be3fe..2d20ecf07 100644 --- a/app/views/courses/_homework_form.html.erb +++ b/app/views/courses/_homework_form.html.erb @@ -45,7 +45,7 @@
-+
From 56150e44cee595b3daf13192f9e66116e4f0367f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 22 Nov 2014 09:49:51 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BD=9C=E4=B8=9A=E5=9C=A8=E6=96=B0=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=89=93=E5=BC=80=E7=BD=91=E9=A1=B5=E6=8A=A5500?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_attach_controller.rb | 22 +-- app/views/homework_attach/show.html.erb | 177 +----------------- 2 files changed, 3 insertions(+), 196 deletions(-) diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index 61760f462..0286fcad6 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -382,42 +382,22 @@ class HomeworkAttachController < ApplicationController if User.current.admin? || User.current.member_of_course?(@homework.bid.courses.first) # 打分统计 stars_reates = @homework. rates(:quality) - #stars_reates_count = stars_reates.count == 0 ? 1 : stars_reates.count - #stars_status = stars_reates.select("stars, count(*) as scount").group("stars") - #@stars_status_map = Hash.new(0.0) - #stars_status.each do |star_status| - # percent = (star_status.scount * 1.0/ stars_reates_count) * 100.to_f - # percent_m = format("%.2f", percent) - # @stars_status_map["star#{star_status.stars.to_i}".to_sym] = - # percent_m.to_s + "%" - #end #是否已经进行过评价 temp = HomeworkAttach.find_by_sql("SELECT stars FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = #{@homework.id} AND rater_id = #{User.current.id}").first @m_score = temp.nil? ? 0:temp.stars @has_evaluation = stars_reates.where("rater_id = ?",User.current).count > 0 - #是否开启互评功能 - #@is_evaluation = @homework.bid.is_evaluation == 1 || @homework.bid.is_evaluation == nil - #@limit = 10 #@jours留言 is null条件用以兼容历史数据 @jours = @homework.journals_for_messages.where("is_comprehensive_evaluation = 3 or is_comprehensive_evaluation is null").order("created_on DESC") @cur_page = params[:cur_page] || 1 @cur_type = params[:cur_type] || 5 @jour = paginateHelper @jours,5 - #@feedback_count = @jours.count - #@feedback_pages = Paginator.new @feedback_count, @limit, params['page'] - #@offset ||= @feedback_pages.offset - #@jour = @jours[@offset, @limit] - #@comprehensive_evaluation教师评论 - #@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1").order("created_on DESC") + teachers = searchTeacherAndAssistant @course @comprehensive_evaluation = [] teachers.each do|teacher| temp = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id = #{teacher.user_id}").order("created_on DESC").first @comprehensive_evaluation << temp if temp end - #@comprehensive_evaluation = @homework.journals_for_messages.where("is_comprehensive_evaluation = 1 and user_id in #{convert_array(teachers)}").order("created_on DESC") - #@anonymous_comments 匿评 - #@anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2").order("created_on DESC") annymous_users = @homework.homework_evaluations.map(&:user) unless annymous_users.nil? || annymous_users.count == 0 @anonymous_comments = @homework.journals_for_messages.where("is_comprehensive_evaluation = 2 and user_id in #{convert_array(annymous_users)}").order("created_on DESC") diff --git a/app/views/homework_attach/show.html.erb b/app/views/homework_attach/show.html.erb index 5f631c26a..d2f096bae 100644 --- a/app/views/homework_attach/show.html.erb +++ b/app/views/homework_attach/show.html.erb @@ -1,175 +1,2 @@ -<%= render :partial => 'layouts/base_homework_attach', :locals => {:homework_attach => @homework} %> - -<% is_student = is_cur_course_student @homework.bid.courses.first %> -<% is_teacher = is_course_teacher User.current,@homework.bid.courses.first %> -
<%= notice %>
-作业基础信息<%=@count %> | -|
- 发布人员:<%= link_to @homework.user, user_path(@homework.user)%> - | -- 所属任务:<%= link_to(@homework.bid.name, course_for_bid_path(@homework.bid))%> - | -
- 作业下载: - <% if @is_evaluation || is_teacher%> - <% options = {:author => true } %> - <%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %> - <% else %> - <%= l(:label_cant_download) %> - <% end %> - | -
- 参与人员:
- <% @homework.users.each do |homework_user| %>
- <%= link_to homework_user, user_path(homework_user)%>
- <% if @homework.users.count > 1 && homework_user != @homework.users.last %>
- - <% end %> - <% end %> - |
-
平均评分: - <%= render :partial => 'show_score', :locals => {:stars => @totle_score} %> - | -发布时间:<%=format_time @homework.created_at %> | -
作业描述: |
- |
-
- <% if @homework.description != nil && @homework.description != "" %>
- <%= @homework.description %>
- <% else %>
-
-
- 该作业无任何描述!
-
- <% end %>
- |
-
共有 <%= User.current.member_of_course?(course) ? all_attachments.count : 0 %> 个资源
- + <#% 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 delete_allowed && file.container_id == @course.id && file.container_type == "Course"%> -<%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用0
+<%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用<%=get_qute_number file %>
-
diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index e756213ab..19b68743a 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -128,7 +128,7 @@ a:hover.ping_sub{ background:#14a8b9;} .w430{ width:430px;} .w350{ width:350px;} -.w620{ width:580px; height:160px; border:1px solid #CCC;} +.w620{ width:580px; height:160px; border:1px solid #CCC !important; padding-left: 3px !important;} .bo{height:26px; border:1px solid #CCC !important; padding: 0 !important;} a.tijiao{ height:28px !important; display:block !important; width:80px !important; color:#fff !important; background:#15bccf !important; text-align:center !important; padding-top:4px !important; float:left !important; margin-right:10px !important;} a:hover.tijiao{ background:#0f99a9 !important;} From 9908a7f41f9d7e0da3c5641ec6ce99e94be59695 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 22 Nov 2014 12:40:53 +0800 Subject: [PATCH 15/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=90=AF=E5=8A=A8=E5=8C=BF=E8=AF=84=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_bid_homework_show.html.erb | 4 ++-- app/views/layouts/base_homework.html.erb | 14 +++++++++++++- .../redpenny-master/stylesheets/application.css | 4 ++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index aadc93fa4..8a6b276b3 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -27,8 +27,8 @@ background: #15bccf; color: #fff; text-align: center; - padding-top: 3px; - padding-left: 3px; + padding: 5px !important; + display: none; } .span_wping a:hover{ background-color:#03a1b3;} diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index b3336fb46..ec6214493 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -21,6 +21,18 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> + +
<% course = @bid.courses.first %> @@ -107,7 +119,7 @@- - <%= l(:label_attachment) %> : - - | -|||||
- <% if @bid.attachments.any?%>
+ <% unless @bid.attachments.empty? %>
+
+
+
|
共有 <%= User.current.member_of_course?(course) ? all_attachments.count : 0 %> 个资源
+共有 <%= all_attachments.count%> 个资源
<% end %> - + <% else %> + <%= link_to "选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select",:remote => true %> + <% end %> <% else %> - <%= link_to (file.is_public? ? "公开":"私有"),"javascript:void(0)",:class=>"f_l re_open" %> <% 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 delete_allowed && file.container_id == @course.id && file.container_type == "Course"%> -<%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用<%=get_qute_number file %>
+<%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %>
- |
+ <%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}", :onfocus => "clearInfo('username','#{l(:label_login_prompt)}')", @@ -42,48 +35,33 @@ | ||
- |
- - <%= password_field_tag 'password', nil, :tabindex => '2' %> - | +<%= password_field_tag 'password', nil, :tabindex => '2' %> | |
- |
- - <%= text_field_tag "openid_url", nil, :tabindex => '3' %> - | +<%= text_field_tag "openid_url", nil, :tabindex => '3' %> | |
<% if Setting.autologin? %>
- |
|||
- - <% if Setting.lost_password? %> + <% if Setting.lost_password? %> <%= link_to l(:label_password_lost), lost_password_path %> <% end %> + |
<%= f.text_field :login, :size => 25, :required => true %> - <%= l(:label_max_number) %> -
-<%= f.password_field :password, :size => 25, :required => true %> - <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %> -
-<%= f.password_field :password_confirmation, :size => 25, :required => true %>
- <% end %> - -- <%= f.text_field :mail,:size => 25, :required => true %> - -
-
-
- <%= "#{l(:label_mail_attention)} " %> <%= "#{l(:label_mail_attention1)} " %>
-
<%= submit_tag l(:button_submit) %> | -
<%= f.text_field :identity_url %>
-<% end %> -<% @user.custom_field_values.select { |v| v.editable? || v.required? }.each do |value| %> -<%= custom_field_tag_with_label :user, value %>
-<% end %> -+
+ <%= l(:label_identity) %> * | ++ + | ++ | + + +<% else %> +<%= text_field_tag :no, nil, :placeholder => "请输入学号" %> +<% end %> +
<%= f.text_field :login, :size => 25, :required => true %> + <%= l(:label_max_number) %>
+ +<%= f.password_field :password, :size => 25, :required => true %> + <%= l(:text_caracters_minimum, :count => Setting.password_min_length) %>
+ +<%= f.password_field :password_confirmation, :size => 25, :required => true %>
+ <% end %> + + + +<%= f.text_field :mail, :required => true %>
+ ++ <%= "#{l(:label_mail_attention)} " %>
+ +<%= f.select :language, lang_options_for_select, :required => true %>
+ + + + + + ++
+ <%= l(:label_location) %> * + | ++ + | ++ + | +
+
<%= submit_tag l(:button_submit) %> | +
<%= f.text_field :identity_url %>
+<% end %> + + +<% @user.custom_field_values.select { |v| v.editable? || v.required? }.each do |value| %> +<%= custom_field_tag_with_label :user, value %>
+<% end %> +
+ <%= f.text_field :login, :required => true, :name => "login"%>
+ <%= l(:label_max_number) %>
+
+
+ <% if User.current.user_extensions.school.nil? %> + <%= l(:field_occupation) %> * + + + + <% else %> + <%= l(:field_occupation) %> * + + + + <% end %> +
+ ++ <%= f.text_field :mail, :required => true %> +
+ ++ <%= f.select :language, :Chinese => :zh, :English => :en %> +
+ + + + <% province = User.current.user_extensions.location %> + <% city = User.current.user_extensions.location_city %> + <% identity = User.current.user_extensions.identity %> + <% title = User.current.user_extensions.technical_title %> + + +<%= l(:label_location) %> + + +
+ + + + <% unless @user.user_extensions.identity == 2 %> ++ <%= l(:label_identity) %> + +
+ <% end %> + + + <% end %> + + + <% else %> + +<%= f.text_field :identity_url %>
+ <% end %> + + <% @user.custom_field_values.select(&:editable?).each do |value| %> +<%= custom_field_tag_with_label :user, value %>
+ <% end %> + <%= call_hook(:view_my_account, :user => @user, :form => f) %> ++ <%= render :partial => 'users/mail_notifications' %> +