From eec155f0778c0588249326ba50ce72d5d3ae3ee9 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 11 Mar 2015 11:22:58 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2app=E8=87=AA=E5=8A=A8=E7=99=BB=E9=99=86?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 474f199a2..aacb32990 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -21,6 +21,7 @@ class FilesController < ApplicationController menu_item :files before_filter :auth_login1, :only => [:index] + before_filter :logged_user_by_apptoken,:only => [:index] before_filter :find_project_by_project_id#, :except => [:getattachtype] before_filter :authorize, :except => [:getattachtype,:quote_resource_show,:search] From 32a2e7ae1ffc52cc181d53a2ef3b46cb363002e6 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 11 Mar 2015 11:38:09 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=20=E7=94=A8=E6=88=B7=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E6=A1=86=E5=A4=84=E4=BA=8E=E5=85=B3=E9=97=AD=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 2444af68c..e21500576 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -62,7 +62,7 @@ $.fn.fix = function(options){ var defaults = { float : 'right', - minStatue : false, + minStatue : true, skin : 'blue', durationTime : 1000 } From aa2a41d36826366d8259a99f8a4616065bae1009 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 11 Mar 2015 11:55:55 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3=20?= =?UTF-8?q?=E4=BB=8E=E9=A1=B9=E7=9B=AE=E5=8A=A8=E6=80=81=E7=82=B9=E5=85=A5?= =?UTF-8?q?=E5=90=8E=E5=AF=BC=E8=88=AA=E6=A0=8F=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/documents/show.html.erb | 71 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 5632c9d63..531f68a08 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -1,38 +1,45 @@
-

<%=h @document.title %>

+

<%= l(:project_module_documents) %>

-
+
+
+ <% if User.current.allowed_to?(:edit_documents, @project) %> + <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> + <% end %> + <% if User.current.allowed_to?(:delete_documents, @project) %> + <%= delete_link document_path(@document) %> + <% end %> +
+

+ <%= h @document.title %> +

+

+ <%#=h @document.category.name %> +
+ <%= format_date @document.created_on %>
+

+
+ <%= textilizable @document, :description, :attachments => @document.attachments %> +
-
-<% if User.current.allowed_to?(:edit_documents, @project) %> -<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> -<% end %> -<% if User.current.allowed_to?(:delete_documents, @project) %> -<%= delete_link document_path(@document) %> -<% end %> -
- - -

<%#=h @document.category.name %>
-<%= format_date @document.created_on %>

-
-<%= textilizable @document, :description, :attachments => @document.attachments %> -
- -
-

<%= l(:label_attachment_plural) %>

-<%= link_to_attachments @document %> +
+

<%= l(:label_attachment_plural) %>

+ <%= link_to_attachments @document %> -<% if authorize_for('documents', 'add_attachment') %> -

<%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", - :id => 'attach_files_link' %>

- <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> -
-

<%= render :partial => 'attachments/form' %>

-
- <%= submit_tag l(:button_add) %> - <% end %> -<% end %> + <% if authorize_for('documents', 'add_attachment') %> +

+ <%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;", + :id => 'attach_files_link' %> +

+ <%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> +
+

+ <%= render :partial => 'attachments/form' %> +

+
+ <%= submit_tag l(:button_add) %> + <% end %> + <% end %> -<% html_title @document.title -%> + <% html_title @document.title -%>
From cbfb72bd5bd45170dcbf6c21d0a259589b68adbf Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 11 Mar 2015 14:32:29 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/new.html.erb | 2 +- app/views/layouts/base_projects.html.erb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/files/new.html.erb b/app/views/files/new.html.erb index be9bcd722..efdc35dcd 100644 --- a/app/views/files/new.html.erb +++ b/app/views/files/new.html.erb @@ -1,5 +1,5 @@
-

<%=l(:label_attachment_new)%>

+

<%= l(:label_course_file) %>

<%= error_messages_for 'attachment' %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 9b4c22b75..6456b0090 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -112,11 +112,11 @@
<% if @project.project_type == 0 %> <%= l(:label_project_grade)%> : - <%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects', - :action => 'show_projects_score', - :remote => true, - :id => @project.id }, - :style => "color: #EC6300;")%> + <%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects', + :action => 'show_projects_score', + :remote => true, + :id => @project.id }, + :style => "color: #EC6300;") %> <% end %>
From 14fe487835bab35d8bc1f1e7672604b64f15ff60 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 11 Mar 2015 14:52:07 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E5=B0=86app=E4=B8=AA=E4=BA=BA=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E5=8A=A8=E6=80=81=E6=8E=A5=E5=8F=A3=E4=B8=AD=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E7=95=99=E8=A8=80=E5=BD=92=E7=B1=BB=E5=88=B0=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BA=86=E4=BD=9C=E4=B8=9A=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index c0d3d2f83..09cc5d59d 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -382,7 +382,7 @@ class CoursesService end latest_bid_message = messages.first unless latest_bid_message.nil? - latest_course_dynamics << {:type => 2,:time => latest_bid_message.created_on,:message => '最近更新了留言'}#l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)} + latest_course_dynamics << {:type => 4,:time => latest_bid_message.created_on,:message => '最近更新了作业'}#l(:label_recently_updated_message,:locale => current_user.language.nil? ? 'zh':current_user.language)} end #每个作业中学生最后提交的作业 homeworks = [] From 11c8c0510a0d77882b08cbe214197e5aefe4a9d9 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 11 Mar 2015 15:13:41 +0800 Subject: [PATCH 6/7] =?UTF-8?q?app=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/mobile_version.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/mobile_version.html.erb b/app/views/admin/mobile_version.html.erb index cc6490f90..2a03ac003 100644 --- a/app/views/admin/mobile_version.html.erb +++ b/app/views/admin/mobile_version.html.erb @@ -36,7 +36,7 @@ <% end %> -<% if @versions.first.attachments.any?%> +<% if !@versions.first.nil? && @versions.first.attachments.any?%> <% options = {:author => true, :deletable => true } %> <%= render :partial => 'attachments/links', :locals => {:attachments => @versions.first.attachments, :options => options, :is_float => true} %> <% end %> From 078d2fa48875f99ab63471048be2e8fab6741dbb Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 11 Mar 2015 15:14:13 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E6=A1=A3=E4=B8=BA=E7=A9=BA=E6=83=85=E5=86=B5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8=20=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=96=87=E4=BB=B6=E6=9C=AF=E8=AF=AD=E6=94=B9?= =?UTF-8?q?=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/documents/index.html.erb | 2 +- app/views/files/new.html.erb | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index e0c39eb33..73a3a6f2a 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -28,7 +28,7 @@
<% if @grouped.empty? %> -

+

<%= l(:label_no_data) %>

<% end %> diff --git a/app/views/files/new.html.erb b/app/views/files/new.html.erb index efdc35dcd..fad22b192 100644 --- a/app/views/files/new.html.erb +++ b/app/views/files/new.html.erb @@ -8,11 +8,10 @@ <% if @versions.any? %>

-<%= select_tag "version_id", content_tag('option', '') + - options_from_collection_for_select(@versions, "id", "name") %>

+ <%= select_tag "version_id", content_tag('option', '') + options_from_collection_for_select(@versions, "id", "name") %>

<% end %> -

<%= render :partial => 'attachments/form' %>

+

<%= render :partial => 'attachments/form' %>

<%= submit_tag l(:button_add) %> <% end %>