From 50e172a25adf847d30be73837a26235c3cb89a2a Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Mon, 11 Aug 2014 16:51:45 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=95=99=E8=A8=80=E5=89=8D=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/feedback.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/feedback.html.erb b/app/views/courses/feedback.html.erb index 903b0b5fc..a5d7326e0 100644 --- a/app/views/courses/feedback.html.erb +++ b/app/views/courses/feedback.html.erb @@ -79,7 +79,7 @@ function checkMaxLength() { return false;"} %> <% end %> <% if journal.delete_by_user?(User.current) %> - <%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:remote => true)%> + <%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:confirm => l(:text_are_you_sure),:remote => true)%> <% end %> From 14026d0e0ba3da46fcc9780f0eb0c64fee970bdb Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 13 Aug 2014 15:59:19 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=BE=97=E5=88=86?= =?UTF-8?q?=E7=BB=86=E8=8A=82=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_activity_new_score_index.html.erb | 17 +-- .../users/_influence_new_score_index.html.erb | 13 +-- .../users/_project_new_score_index.html.erb | 5 +- app/views/users/_score_new_index.html.erb | 30 +----- app/views/users/_show_new_score.html.erb | 101 +++++++++--------- .../users/_topic_new_score_index.html.erb | 13 +-- app/views/users/show_new_score.html.erb | 27 +---- 7 files changed, 83 insertions(+), 123 deletions(-) diff --git a/app/views/users/_activity_new_score_index.html.erb b/app/views/users/_activity_new_score_index.html.erb index 0ceb8f157..b592b508d 100644 --- a/app/views/users/_activity_new_score_index.html.erb +++ b/app/views/users/_activity_new_score_index.html.erb @@ -1,8 +1,9 @@ -
技术得分:
-
    踩别人的帖子 -2
-
    帖子被一级会员顶 +4
-
    帖子被二级会员顶 +6
-
    帖子被三级会员顶 +8
-
    帖子被一级会员踩 -2
-
    帖子被二级会员踩 -4
-
    帖子被三级会员踩 -6
\ No newline at end of file + +
    踩别人的帖子数量 * (-2) = <%= option_num.tread %> * (-2) = <%= option_num.tread * (-2) %>
+
    帖子被一级会员顶的次数 * 4 = <%= option_num.praise_by_one %> * 4 = <%= option_num.praise_by_one * 4 %>
+
    帖子被二级会员顶的次数 * 6 = <%= option_num.praise_by_two %> * 6 = <%= option_num.praise_by_two * 6 %>
+
    帖子被三级会员顶的次数 * 8 = <%= option_num.praise_by_three %> * 8 = <%= option_num.praise_by_three * 8 %>
+
    帖子被一级会员踩的次数 * (-2) = <%= option_num.tread_by_one %> * (-2) = <%= option_num.tread_by_one * (-2) %>
+
    帖子被二级会员踩的次数 * (-4) = <%= option_num.tread_by_two %> * (-4) = <%= option_num.tread_by_two * (-4) %>
+
    帖子被三级会员踩的次数 * (-6) = <%= option_num.tread_by_three %> * (-6) = <%= option_num.tread_by_three * (-6) %>
+
    技术得分 = <%= option_num.tread * (-2) %> + <%= option_num.praise_by_one * 4 %> + <%= option_num.praise_by_two * 6 %> + <%= option_num.praise_by_three * 8 %> + (<%= option_num.tread_by_one * (-2) %>) + ( <%= option_num.tread_by_two * (-4) %>) + (<%= option_num.tread_by_three * (-6) %>) = <%= skill(option_num) %>
\ No newline at end of file diff --git a/app/views/users/_influence_new_score_index.html.erb b/app/views/users/_influence_new_score_index.html.erb index 9985d26cd..9977494b9 100644 --- a/app/views/users/_influence_new_score_index.html.erb +++ b/app/views/users/_influence_new_score_index.html.erb @@ -1,6 +1,7 @@ -
项目贡献得分:
-
    提交代码 +4
-
    提交文档 +4
-
    提交附件 +4
-
    更新缺陷完成度 +2
-
    发布缺陷 +4
\ No newline at end of file + +
    提交代码次数 * 4 = <%= option_num.changeset %> * 4 = <%= option_num.changeset * 4 %>
+
    提交文档次数 * 4 = <%= option_num.document %> * 4 = <%= option_num.document * 4 %>
+
    提交附件次数 * 4 = <%= option_num.attachment %> * 4 = <%= option_num.attachment * 4 %>
+
    更新缺陷完成度次数 * 2 = <%= option_num.issue_done_ratio %> * 2 = <%= option_num.issue_done_ratio * 2 %>
+
    发布缺陷数量 * 4 = <%= option_num.post_issue %> * 4 = <%= option_num.post_issue * 4 %>
+
    项目贡献得分 = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> = <%= active(option_num) %>
\ No newline at end of file diff --git a/app/views/users/_project_new_score_index.html.erb b/app/views/users/_project_new_score_index.html.erb index 45e0b0600..d627fba91 100644 --- a/app/views/users/_project_new_score_index.html.erb +++ b/app/views/users/_project_new_score_index.html.erb @@ -1,2 +1,3 @@ -
影响力得分:
-
    被关注人数 +2/人
+ +
    被关注人数 * 2 = <%= option_num.follow %> * 2 = <%= option_num.follow * 2 %>
+
    影响力得分 = <%= option_num.follow * 2 %>
diff --git a/app/views/users/_score_new_index.html.erb b/app/views/users/_score_new_index.html.erb index ff13e5299..539c55f80 100644 --- a/app/views/users/_score_new_index.html.erb +++ b/app/views/users/_score_new_index.html.erb @@ -1,34 +1,10 @@ -<%# messages_count = @user.messages.count %> -<%# messages_score = messages_count * 0.05%> -<%# finall_messages_score = messages_score %> - -<%# journals_count = @user.journals.count %> -<%# journals_score = journals_count * 0.1 %> -<%# user_changesets_count = @user.changesets.count %> -<%# user_changesets_score = user_changesets_count * 0.3 %> -<%# finall_user_project_score = journals_score + user_changesets_score %> - -<%# journals_for_messages_count = @user.journals_messages.count %> -<%# activities_count = @user.activities.count %> -<%# journals_for_messages_score = journals_for_messages_count * 0.05 %> -<%# activities_score = activities_count * 0.2 %> -<%# finall_activity_score = journals_for_messages_score + activities_score %> - -<%# news_count = @user.news.count %> -<%# news_score = news_count * 0.1 %> -<%# wiki_contents_count = @user.wiki_contents.count %> -<%# wiki_contents_score = wiki_contents_count * 0.1 %> -<%# comments_count = @user.comments.count %> -<%# comments_score = comments_count * 0.1 %> -<%# finall_influence_score = news_score + wiki_contents_score + comments_score %> -<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
<%= l(:label_user_score) %>
= <%= l(:label_user_score_of_collaboration) %> + <%= l(:label_user_score_of_influence) %> + <%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %>
-
= <%= format("%.2f" ,@user.user_score_attr.collaboration.nil? ? 0:@user.user_score_attr.collaboration).to_i %> + <%= format("%.2f" , @user.user_score_attr.influence.nil? ? 0:@user.user_score_attr.influence ).to_i %> - + <%= format("%.2f" , @user.user_score_attr.skill.nil? ? 0:@user.user_score_attr.skill).to_i %> + <%= format("%.2f" , @user.user_score_attr.active.nil? ? 0:@user.user_score_attr.active).to_i %>
-
= <%= format("%.2f" ,@user.user_score_attr.total_score.nil? ? 0:@user.user_score_attr.total_score).to_i %>
+
= <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %> + + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %>
+
= <%= format("%.2f" ,option_num.total_score).to_i %>
diff --git a/app/views/users/_show_new_score.html.erb b/app/views/users/_show_new_score.html.erb index e9ca499f4..c0e731a65 100644 --- a/app/views/users/_show_new_score.html.erb +++ b/app/views/users/_show_new_score.html.erb @@ -1,28 +1,4 @@ -<%# messages_count = @user.messages.count %> -<%# messages_score = messages_count * 0.05%> -<%# finall_messages_score = messages_score %> - -<%# journals_count = @user.journals.count %> -<%# journals_score = journals_count * 0.1 %> -<%# user_changesets_count = @user.changesets.count %> -<%# user_changesets_score = user_changesets_count * 0.3 %> -<%# finall_user_project_score = journals_score + user_changesets_score %> - -<%# journals_for_messages_count = @user.journals_messages.count %> -<%# activities_count = @user.activities.count %> -<%# journals_for_messages_score = journals_for_messages_count * 0.05 %> -<%# activities_score = activities_count * 0.2 %> -<%# finall_activity_score = journals_for_messages_score + activities_score %> - -<%# news_count = @user.news.count %> -<%# news_score = news_count * 0.1 %> -<%# wiki_contents_count = @user.wiki_contents.count %> -<%# wiki_contents_score = wiki_contents_count * 0.1 %> -<%# comments_count = @user.comments.count %> -<%# comments_score = comments_count * 0.1 %> -<%# finall_influence_score = news_score + wiki_contents_score + comments_score %> -<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>

<%= l(:label_user_score) %>

@@ -37,8 +13,9 @@ - - + + <% option_num = get_option_number(@user,1) %> +
<%= l(:label_user_score) %>
<%= format("%.2f" , @user.user_score_attr.total_score).to_i %>
<%= l(:label_user_score) %>
<%= format("%.2f" , option_num.total_score).to_i %>
@@ -46,31 +23,57 @@ - - - <%= link_to l(:label_user_score) , {:controller => 'users', :action => 'score_new_index', :remote => true} %> : - <%= format("%.2f" , @user.user_score_attr.total_score).to_i %> -
- - <%= link_to l(:label_user_score_of_collaboration), {:controller => 'users',:action => 'topic_new_score_index', :remote => true} %> : - <%= format("%.2f" , @user.user_score_attr.collaboration.nil? ? 0:@user.user_score_attr.collaboration).to_i %> -
- - <%= link_to l(:label_user_score_of_influence), {:controller => 'users',:action => 'project_new_score_index', :remote => true} %> : - <%= format("%.2f" , @user.user_score_attr.influence.nil? ? 0:@user.user_score_attr.influence).to_i %> -
- - <%= link_to l(:label_user_score_of_skill), {:controller => 'users',:action => 'activity_new_score_index', :remote => true} %> : - <%= format("%.2f" , @user.user_score_attr.skill.nil? ? 0:@user.user_score_attr.skill).to_i %> -
- - <%= link_to l(:label_user_score_of_active), {:controller => 'users',:action => 'influence_new_score_index', :remote => true} %> : - <%= format("%.2f" , @user.user_score_attr.active.nil? ? 0:@user.user_score_attr.active).to_i %> -
-
+ + +
- <%= render :partial => 'users/score_new_index', :locals => {:index => 0 } %> + <%= render :partial => 'users/score_new_index', :locals => {:index => 0,:option_num => option_num } %>
diff --git a/app/views/users/_topic_new_score_index.html.erb b/app/views/users/_topic_new_score_index.html.erb index 908932c9e..02bc1de4f 100644 --- a/app/views/users/_topic_new_score_index.html.erb +++ b/app/views/users/_topic_new_score_index.html.erb @@ -1,6 +1,7 @@ -
协同得分:
-
    发帖 +2
-
    对缺陷留言 +1
-
    更改一次缺陷状态 +1
-
    对留言的回复 +1
-
    对帖子的回复 +1
\ No newline at end of file + +
    发帖数量 * 2 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %>
+
    对缺陷留言数量 * 1 = <%= option_num.messages_for_issues %> * 1 = <%= option_num.messages_for_issues * 1 %>
+
    更改缺陷状态次数 * 1 = <%= option_num.issues_status %> * 1= <%= option_num.issues_status * 1 %>
+
    对留言的回复数量 * 1 = <%= option_num.replay_for_message %> * 1 = <%= option_num.replay_for_message * 1 %>
+
    对帖子的回复数量 * 1 = <%= option_num.replay_for_memo %> * 1 = <%= option_num.replay_for_memo * 1 %>
+
    协同得分 = <%= option_num.memo * 2 %> + <%= option_num.messages_for_issues * 1 %> + <%= option_num.issues_status * 1 %> + <%= option_num.replay_for_message * 1 %> + <%= option_num.replay_for_memo * 1 %> = <%= collaboration(option_num) %>  
diff --git a/app/views/users/show_new_score.html.erb b/app/views/users/show_new_score.html.erb index 0efae940c..be61d3faa 100644 --- a/app/views/users/show_new_score.html.erb +++ b/app/views/users/show_new_score.html.erb @@ -1,28 +1,5 @@ -<% messages_count = @user.messages.count %> -<% messages_score = messages_count * 0.05%> -<% finall_messages_score = messages_score %> -<% journals_count = @user.journals.count %> -<% journals_score = journals_count * 0.1 %> -<% user_changesets_count = @user.changesets.count %> -<% user_changesets_score = user_changesets_count * 0.3 %> -<% finall_user_project_score = journals_score + user_changesets_score %> - -<% journals_for_messages_count = @user.journals_messages.count %> -<% activities_count = @user.activities.count %> -<% journals_for_messages_score = journals_for_messages_count * 0.05 %> -<% activities_score = activities_count * 0.2 %> -<% finall_activity_score = journals_for_messages_score + activities_score %> - -<% news_count = @user.news.count %> -<% news_score = news_count * 0.1 %> -<% wiki_contents_count = @user.wiki_contents.count %> -<% wiki_contents_score = wiki_contents_count * 0.1 %> -<% comments_count = @user.comments.count %> -<% comments_score = comments_count * 0.1 %> -<% finall_influence_score = news_score + wiki_contents_score + comments_score %> -<% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %> <%= h html_title %> @@ -52,8 +29,8 @@ - - + +
<%= l(:label_user_score) %>
<%= format("%.2f" , @user.user_score_attr.total_score).to_i %>
<%= l(:label_user_score) %>
<%= format("%.2f" , get_option_number(@user,1).total_score).to_i %>
From c833c4ac629776332fb5cb7714bc41f526eb567f Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 13 Aug 2014 15:59:54 +0800 Subject: [PATCH 03/10] =?UTF-8?q?readme=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadMe.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ReadMe.txt b/ReadMe.txt index b5822682b..7e8af4e21 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -75,3 +75,9 @@ bundle exec rake db:migrate:up version=20140725062302 kw: Mysql2::Error,洢,CALL sp_project_status_cursor(); bundle exec rake db:migrate:down version=20130828004955 bundle exec rake db:migrate:up version=20130828004955 + +=================================[2014-08-13]==================================== +kw:ֵ֧ͼƬʽ +Ĭ֧¸ʽ"bmp,jpeg,jpg,png,gif" +configuration.yml޸ģʽpic_types: "bmp,jpeg,jpg,png,gif"(ע⣺pic_typesǰ#ȥ) +ɺ From f2f06a9d282eeac8f080c7cc79971a123e73349c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 13 Aug 2014 16:06:40 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E7=94=A8=E6=88=B7=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E8=A1=A8=E6=A0=BC=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/users.html.erb | 13 ++----------- db/schema.rb | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/app/views/admin/users.html.erb b/app/views/admin/users.html.erb index 8bd1ef446..47d588ec2 100644 --- a/app/views/admin/users.html.erb +++ b/app/views/admin/users.html.erb @@ -37,18 +37,9 @@ <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %> <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %> <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %> - + - - - - - - - - - <% for user in @users -%> "> @@ -59,7 +50,7 @@ <%= checked_image user.admin? %> <%= format_time(user.created_on) %> <%= format_time(user.last_login_on) unless user.last_login_on.nil? %> - <%= change_status_link(user) %> + <%= change_status_link(user) %> <%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %> <% end -%> diff --git a/db/schema.rb b/db/schema.rb index 7a921754a..cdedc6a2c 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 => 20140811022947) do +ActiveRecord::Schema.define(:version => 20140812065417) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -291,6 +291,24 @@ ActiveRecord::Schema.define(:version => 20140811022947) do t.datetime "updated_on", :null => false end + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + create_table "course_infos", :force => true do |t| t.integer "course_id" t.integer "user_id" @@ -889,6 +907,19 @@ ActiveRecord::Schema.define(:version => 20140811022947) do add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" + create_table "rich_rich_files", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "rich_file_file_name" + t.string "rich_file_content_type" + t.integer "rich_file_file_size" + t.datetime "rich_file_updated_at" + t.string "owner_type" + t.integer "owner_id" + t.text "uri_cache" + t.string "simplified_type", :default => "file" + end + create_table "roles", :force => true do |t| t.string "name", :limit => 30, :default => "", :null => false t.integer "position", :default => 1 From a7e22a737979071f1af778383dd2ccdbd96ffc88 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 13 Aug 2014 16:10:47 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dadmin=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/admin/search.html.erb | 20 ++++++++++---------- app/views/admin/users.html.erb | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/admin/search.html.erb b/app/views/admin/search.html.erb index 67c97366e..5d49d84fa 100644 --- a/app/views/admin/search.html.erb +++ b/app/views/admin/search.html.erb @@ -26,7 +26,7 @@  
- +
<%= sort_header_tag('login', :caption => l(:field_login)) %> @@ -37,20 +37,20 @@ <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %> <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %> <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %> - + <% for user in @users -%> "> - - - - - - - - + + + + + + + <% end -%> diff --git a/app/views/admin/users.html.erb b/app/views/admin/users.html.erb index 47d588ec2..4a76a42ef 100644 --- a/app/views/admin/users.html.erb +++ b/app/views/admin/users.html.erb @@ -50,7 +50,7 @@ - <% end -%> From e65487d52709791d2c6ce91cdb0ba5ab663162e6 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 13 Aug 2014 16:50:32 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=88=90=E5=91=98?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=BE=97=E5=88=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_member_list.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/_member_list.html.erb b/app/views/projects/_member_list.html.erb index 15a02df93..89a88e51c 100644 --- a/app/views/projects/_member_list.html.erb +++ b/app/views/projects/_member_list.html.erb @@ -23,8 +23,8 @@ <% else%> <%= content_tag "div", content_tag("p", rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ')), :class => "clear avatar_name" %>
-

- <%= l(:label_user_for_project_grade) %>: <%= format("%.2f" ,UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i %> +

+ <%= l(:label_user_for_project_grade) %>: <%= format("%.2f" ,user_scores(member.user,2,@project).total_score).to_i %>

<% end %> From 440395f26f40fc0b1f9b55e3dfd621682d56e7eb Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 13 Aug 2014 16:52:07 +0800 Subject: [PATCH 07/10] =?UTF-8?q?#1290=20=E4=BF=AE=E6=94=B9admin=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=AE=A1=E7=90=86--=E7=94=A8=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8--=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BB=A5=E5=8F=8A=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_memberships.html.erb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/views/users/_memberships.html.erb b/app/views/users/_memberships.html.erb index 5f61d2ce2..2c18ed416 100644 --- a/app/views/users/_memberships.html.erb +++ b/app/views/users/_memberships.html.erb @@ -1,4 +1,4 @@ -<% roles = Role.find_all_givable %> +<% roles = Role.find_all_givable[0..2] %> <% projects = Project.active.all %>
@@ -50,12 +50,19 @@

<%= l(:label_no_data) %>

<% end %>
+
<% if projects.any? %> -
<%=l(:label_project_new)%> +
<%=l(:label_project_new)%> <%= form_for(:membership, :remote => true, :url => user_memberships_path(@user)) do %> -<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects) %> +
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@user, projects)%>

<%= l(:label_role_plural) %>: <% roles.each do |role| %> From 8c59abc070a4fa4b764c70eed62762924c7bf819 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 13 Aug 2014 16:55:42 +0800 Subject: [PATCH 08/10] =?UTF-8?q?#1279=20=E4=BF=AE=E6=94=B9=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/stores/_search_bar.html.erb | 2 +- app/views/welcome/_search_bar.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/stores/_search_bar.html.erb b/app/views/stores/_search_bar.html.erb index c91f90e96..884f8b263 100644 --- a/app/views/stores/_search_bar.html.erb +++ b/app/views/stores/_search_bar.html.erb @@ -4,5 +4,5 @@    <%= submit_tag l(:label_search), :class => "enterprise"%> <% end %> -

全站文件搜索。不会搜索私有项目中的内容、学生已经提交的作业。
+
全站文件搜索。不会搜索私有项目中的内容。
\ No newline at end of file diff --git a/app/views/welcome/_search_bar.html.erb b/app/views/welcome/_search_bar.html.erb index 73a497835..302aa3c26 100644 --- a/app/views/welcome/_search_bar.html.erb +++ b/app/views/welcome/_search_bar.html.erb @@ -4,5 +4,5 @@    <%= submit_tag l(:label_search), :class => "enterprise"%> <% end %> -
全站文件搜索。不会搜索私有项目中的内容和学生已经提交的作业。
+
全站文件搜索。不会搜索私有项目中的内容。
\ No newline at end of file From e12a5400618eced0643eace8668d22cade177580 Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Wed, 13 Aug 2014 17:34:20 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=97=A5=E5=8E=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=8F=8F=E8=BF=B0=E9=94=99=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh.yml | 2 +- db/schema.rb | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 62a5649a3..b60184665 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1039,7 +1039,7 @@ zh: button_ok_and_submit: 确定并提交 button_apply: 查询 - button_clear: 清除留言 + button_clear: 取消查询 button_clear_requirement: 取消 button_lock: 锁定 button_unlock: 解锁 diff --git a/db/schema.rb b/db/schema.rb index 7a921754a..cdedc6a2c 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 => 20140811022947) do +ActiveRecord::Schema.define(:version => 20140812065417) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -291,6 +291,24 @@ ActiveRecord::Schema.define(:version => 20140811022947) do t.datetime "updated_on", :null => false end + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "container_id", :default => 0 + end + create_table "course_infos", :force => true do |t| t.integer "course_id" t.integer "user_id" @@ -889,6 +907,19 @@ ActiveRecord::Schema.define(:version => 20140811022947) do add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id" + create_table "rich_rich_files", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "rich_file_file_name" + t.string "rich_file_content_type" + t.integer "rich_file_file_size" + t.datetime "rich_file_updated_at" + t.string "owner_type" + t.integer "owner_id" + t.text "uri_cache" + t.string "simplified_type", :default => "file" + end + create_table "roles", :force => true do |t| t.string "name", :limit => 30, :default => "", :null => false t.integer "position", :default => 1 From df0c1e5917893d447e89a1f246e983538ae6646b Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 13 Aug 2014 17:37:00 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E8=B6=85=E5=87=BA=E7=95=8C=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/show.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 89fc862d0..204dd519a 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -4,7 +4,9 @@ <%= render :partial => 'action_menu' %> -

<%= issue_heading(@issue) %>

+

+ <%= issue_heading(@issue) %> +

@@ -25,9 +27,9 @@ <% end %> - + -
+
<%= render_issue_subject_with_tree(@issue) %>
<%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %><%= h(user.firstname) %><%= h(user.lastname) %><%= checked_image user.admin? %><%= format_time(user.created_on) %> <%= change_status_link(user) %> + <%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %><%= h(user.firstname) %><%= h(user.lastname) %><%= checked_image user.admin? %><%= format_time(user.created_on) %> <%= change_status_link(user) %> <%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %>
<%= checked_image user.admin? %> <%= format_time(user.created_on) %> <%= change_status_link(user) %> + <%= change_status_link(user) %> <%= delete_link user_path(user, :back_url => admin_users_path(params)) unless User.current == user %>