From b9ee7fe00d25952e9898c78a925c3de9a6434710 Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Mon, 11 Aug 2014 16:39:18 +0800 Subject: [PATCH 01/35] =?UTF-8?q?1.#878=20=E7=BC=BA=E9=99=B7=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E8=AE=A1=E5=88=92=E5=AE=8C=E6=88=90=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=B0=8F=E4=BA=8E=E5=BC=80=E5=A7=8B=E6=97=B6=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=202.=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=9A=84=E6=9C=80=E5=B0=8F=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 +-- app/views/issues/_attributes.html.erb | 37 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9f8b8fff5..b1006d239 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1300,10 +1300,10 @@ module ApplicationHelper start_of_week = start_of_week.to_i % 7 tags = javascript_tag( - "var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " + + "var datepickerOptions={dateFormat: 'yy-mm-dd',minDate: new Date(), firstDay: #{start_of_week}, " + "showOn: 'button', buttonImageOnly: true, buttonImage: '" + path_to_image('/images/calendar.png') + - "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true};") + "', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true, onClose: function(dateText, inst) {TimeClose(dateText,inst);}, beforeShow : function(input){TimeBeforeShow(input);} };") jquery_locale = l('jquery.locale', :default => current_language.to_s) unless jquery_locale == 'en' tags << javascript_include_tag("i18n/jquery.ui.datepicker-#{jquery_locale}.js") diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index b17283f3b..ebf6dbc91 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -46,6 +46,43 @@

<%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf?, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %>

<% end %>

<%= h @page.pretty_title %>

<%= form_for @content, :as => :content, @@ -12,8 +13,15 @@ <% end %> <%= error_messages_for 'content' %> +
+

<%=text_area_tag 'content[text]', @text, :required => true, :id => 'editor02', :cols => 100, :rows => 25 %>

+ +
+
-<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, +<%#= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %> <%= l(:label_user_for_project_grade) %>: <%= format("%.2f" ,UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i %>

diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index e9a733ece..3d7cdfb6c 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -128,7 +128,7 @@ <% if @project.project_type !=1 %> <%= l(:label_project_grade)%>: - <%= link_to(format("%.2f" , project_scores(@project) ).to_i, + <%= link_to(format("%.2f" , red_project_scores(@project) ).to_i, {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id}, :style=>"color: #EC6300;") %> diff --git a/app/views/users/_user_score.html.erb b/app/views/users/_user_score.html.erb index 338d72ada..e9334a047 100644 --- a/app/views/users/_user_score.html.erb +++ b/app/views/users/_user_score.html.erb @@ -1,6 +1,7 @@ <%= l(:label_user_grade)%>: -<%= link_to(format("%.2f" ,user_scores(user,1).total_score ).to_i, {:controller => 'users', + +<%= link_to(format("%.2f" ,get_option_number(user,1).total_score ).to_i, {:controller => 'users', :action => 'show_new_score', :remote => true, :id => user.id diff --git a/db/schema.rb b/db/schema.rb index 292ca9d05..7a921754a 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 => 20140801034242) do +ActiveRecord::Schema.define(:version => 20140811022947) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -772,6 +772,13 @@ ActiveRecord::Schema.define(:version => 20140801034242) do t.datetime "updated_at", :null => false end + create_table "project_scores", :force => true do |t| + t.string "project_id" + t.integer "score" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "project_statuses", :force => true do |t| t.integer "changesets_count" t.integer "watchers_count" From 582ccd2ecf282a819b247db6946351a6fddb63cc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 13 Aug 2014 14:45:10 +0800 Subject: [PATCH 09/35] =?UTF-8?q?=E6=B7=BB=E5=8A=A0wiki=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E6=A8=A1=E5=9D=97=E5=9B=9E=E5=8E=BB=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 44 ++++++++++++++++++++++- app/helpers/wiki_helper.rb | 10 ++++++ app/views/messages/_project_show.html.erb | 4 +-- app/views/wiki/_content.html.erb | 2 +- db/schema.rb | 7 ++-- 5 files changed, 60 insertions(+), 7 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b1006d239..23f6b6994 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -685,7 +685,7 @@ module ApplicationHelper when 2 obj = args.shift attr = args.shift - text = obj.send(attr).to_s + text = obj.send(attr).html_safe.to_s else raise ArgumentError, 'invalid arguments to textilizable' end @@ -716,6 +716,48 @@ module ApplicationHelper text.html_safe end + # + #格式化字符串,不转义html代码 + def textAreailizable(*args) + options = args.last.is_a?(Hash) ? args.pop : {} + case args.size + when 1 + obj = options[:object] + text = args.shift + when 2 + obj = args.shift + attr = args.shift + text = obj.send(attr).html_safe.to_s + else + raise ArgumentError, 'invalid arguments to textilizable' + end + return '' if text.blank? + project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil) + only_path = options.delete(:only_path) == false ? false : true + + text = text.dup + macros = catch_macros(text) + text = Redmine::WikiFormatting.to_html("CKEditor", text, :object => obj, :attribute => attr) + + @parsed_headings = [] + @heading_anchors = {} + @current_section = 0 if options[:edit_section_links] + + parse_sections(text, project, obj, attr, only_path, options) + text = parse_non_pre_blocks(text, obj, macros) do |text| + [:parse_inline_attachments, :parse_wiki_links, :parse_redmine_links].each do |method_name| + send method_name, text, project, obj, attr, only_path, options + end + end + parse_headings(text, project, obj, attr, only_path, options) + + if @parsed_headings.any? + replace_toc(text, @parsed_headings) + end + + text.html_safe + end + def parse_non_pre_blocks(text, obj, macros) s = StringScanner.new(text) tags = [] diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb index c6cb3b39d..8278ce035 100644 --- a/app/helpers/wiki_helper.rb +++ b/app/helpers/wiki_helper.rb @@ -40,4 +40,14 @@ module WikiHelper link_to(h(parent.pretty_title), {:controller => 'wiki', :action => 'show', :id => parent.title, :project_id => parent.project, :version => nil}) }) end + + def wiki_content_format wiki + text = wiki.text.html_safe + text = parse_non_pre_blocks(text, wiki, text) do |text| + [:parse_inline_attachments, :parse_wiki_links, :parse_redmine_links].each do |method_name| + send method_name, text, project, wiki, attr, only_path, options + end + end + text + end end diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb index 66027e6ec..0bae1a761 100644 --- a/app/views/messages/_project_show.html.erb +++ b/app/views/messages/_project_show.html.erb @@ -161,8 +161,8 @@
- <%#= textilizable message,:content,:attachments => message.attachments %> - <%= message.content.html_safe %> + <%= textAreailizable message,:content,:attachments => message.attachments %> + <%#= message.content.html_safe %>
<%= link_to_attachments message, :author => false %> diff --git a/app/views/wiki/_content.html.erb b/app/views/wiki/_content.html.erb index fcfcc1351..96d358381 100644 --- a/app/views/wiki/_content.html.erb +++ b/app/views/wiki/_content.html.erb @@ -1,5 +1,5 @@
- <%= textilizable content, :text, :attachments => content.page.attachments, + <%= textAreailizable content, :text, :attachments => content.page.attachments, :edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> <%#= content.text.html_safe %>
diff --git a/db/schema.rb b/db/schema.rb index f087206ee..d90541472 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 => 20140812032957) do +ActiveRecord::Schema.define(:version => 20140812065417) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -304,8 +304,9 @@ ActiveRecord::Schema.define(:version => 20140812032957) do t.string "disk_directory" t.integer "attachtype" t.integer "is_public" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + 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| From 0e35967433e913646a0ea8e61312fbe5df1086f1 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 13 Aug 2014 15:19:05 +0800 Subject: [PATCH 10/35] =?UTF-8?q?=E4=BF=AE=E6=94=B9wiki=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=9D=E5=A7=8B=E5=8C=96=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wiki/edit.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index 35f905eef..3a1abdd83 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -16,7 +16,7 @@

<%=text_area_tag 'content[text]', @text, :required => true, :id => 'editor02', :cols => 100, :rows => 25 %>

From 4934c8c801051e2b3bdfd91be65adea47f20094c Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Wed, 13 Aug 2014 15:37:28 +0800 Subject: [PATCH 11/35] =?UTF-8?q?#=20=E9=A1=B5=E9=9D=A2=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/stores_controller.rb | 6 +++++ app/models/issue.rb | 13 ++++----- app/views/stores/index.html.erb | 4 +-- app/views/welcome/contest.html.erb | 40 ++++++++++++++-------------- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/app/controllers/stores_controller.rb b/app/controllers/stores_controller.rb index ae9336161..26ed51a59 100644 --- a/app/controllers/stores_controller.rb +++ b/app/controllers/stores_controller.rb @@ -5,12 +5,18 @@ class StoresController < ApplicationController layout 'base_stores' def search + begin q = "%#{params[:name].strip}%" (redirect_to stores_path, :notice => l(:label_sumbit_empty);return) if params[:name].blank? result = find_public_attache q @searched_attach = paginateHelper result @result_all_count = result.count; + rescue Exception => e + #render 'stores' + redirect_to stores_path + end + end def find_public_attache keywords diff --git a/app/models/issue.rb b/app/models/issue.rb index 1978f5405..f81665035 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -138,10 +138,10 @@ class Issue < ActiveRecord::Base nil when 'default' user_ids = [user.id] + user.groups.map(&:id) - "(#{table_name}.is_private = #{connection.quoted_false} OR #{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" + "(#{table_name}.is_private = #{connection.quoted_false}) OR (#{table_name}.author_id = #{user.id} OR #{table_name}.tracker_id IN (#{user_ids.join(',')}) OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" when 'own' user_ids = [user.id] + user.groups.map(&:id) - "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" + "(#{table_name}.author_id = #{user.id} OR #{table_name}.tracker_id IN (#{user_ids.join(',')}) OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" else '1=0' end @@ -159,9 +159,9 @@ class Issue < ActiveRecord::Base when 'all' true when 'default' - !self.is_private? || (self.author == user || user.is_or_belongs_to?(assigned_to)) - when 'own' - self.author == user || user.is_or_belongs_to?(assigned_to) + (!self.is_private? ||self.tracker == user) || (self.author == user || user.is_or_belongs_to?(assigned_to)) + when 'own' + self.tracker == user || self.author == user || user.is_or_belongs_to?(assigned_to) else false end @@ -1009,9 +1009,10 @@ class Issue < ActiveRecord::Base s << ' overdue' if overdue? s << ' child' if child? s << ' parent' unless leaf? - s << ' private' if is_private? + #s << ' private' if is_private? s << ' created-by-me' if User.current.logged? && author_id == User.current.id s << ' assigned-to-me' if User.current.logged? && assigned_to_id == User.current.id + s << ' tracker-id' if User.current.logged? && tracker_id == User.current.id s end diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb index 8ad37f504..6984169d7 100644 --- a/app/views/stores/index.html.erb +++ b/app/views/stores/index.html.erb @@ -21,7 +21,7 @@ <% k.each do |c1|%>
- <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %> + <%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
<%= c1.downloads %> @@ -32,7 +32,7 @@
<% end -%>
- + <% end; reset_cycle %> diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index f2140fd9b..d735e1013 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -14,7 +14,7 @@ $('#' + id).val(''); } } - + $(function(){ $("#main").find("a").attr("target", "_blank"); setCss(); @@ -118,23 +118,23 @@ +
- +
<% if get_avatar?(@contest_page) %> <%= image_tag(url_to_avatar(@contest_page), width:@contest_page.image_width,height: @contest_page.image_height) %> <% else %> <%= image_tag '/images/transparent.png', width:@contest_page.image_width,height: @contest_page.image_height %> <% end %> -
+
<% unless @contest_page.nil? %> <%= @contest_page.title %> , <%= @contest_page.description %> <% end %>
- +
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %> <%= text_field_tag 'name', params[:name], :placeholder => l(:label_search_intimation), name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%> @@ -162,7 +162,7 @@
<%= image_tag('/images/contest1.png')%>
- +
<%= link_to(contest.name, contest_contestnotifications_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %> @@ -172,19 +172,19 @@ (<%= link_to("#{contest.contesting_softapplications.count}"+l(:label_work_quantity), show_attendingcontest_contest_path(contest), :target => "_blank") %>) <% end %>
- +
<%=contest.description.truncate(100, omission: '...')%>

- +
- + <%=l(:label_release_time)%>: <%=format_time contest.created_on %>
- + - <% end; reset_cycle %> - + <% end; reset_cycle %> +
@@ -299,31 +299,31 @@ <% if Softapplication.count > 0%>
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %> - +
  • <%= image_tag('/images/app1.png')%>
    - +
    <%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %>
    - +
    ><%=softapplication.description.to_s.truncate(50, omission: '...')%>

    - +
    <%=l(:label_release_time)%>: <%=format_time softapplication.created_at %>
    - +
  • - <% end; reset_cycle %> - + <% end; reset_cycle %> +
    <% else %>

    <%= l(:label_no_ftapplication) %>

    - + <% end %> From 14026d0e0ba3da46fcc9780f0eb0c64fee970bdb Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 13 Aug 2014 15:59:19 +0800 Subject: [PATCH 12/35] =?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 %> -
    -
    + + +
      +
    • + <%= link_to l(:label_user_score) ,"javascript:void(0)", :onclick => "show_div('score_new_index')" %> : + <%= format("%.2f" , option_num.total_score).to_i %> +
    • +
    • + <%= link_to l(:label_user_score_of_collaboration), "javascript:void(0)", :onclick => "show_div('topic_new_score_index')" %> : + <%= format("%.2f" , collaboration(option_num)).to_i %> +
    • +
    • + <%= link_to l(:label_user_score_of_influence),"javascript:void(0)", :onclick => "show_div('project_new_score_index')" %> : + <%= format("%.2f" , influence(option_num)).to_i %> +
    • +
    • + <%= link_to l(:label_user_score_of_skill),"javascript:void(0)", :onclick => "show_div('activity_new_score_index')" %> : + <%= format("%.2f" , skill(option_num)).to_i %> +
    • +
    • + <%= link_to l(:label_user_score_of_active), "javascript:void(0)", :onclick => "show_div('influence_new_score_index')" %> : + <%= format("%.2f" , active(option_num)).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 13/35] =?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 14/35] =?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 15/35] =?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 ce7d91d164d8d0ac1dc28e69313209ddb11ebd02 Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Wed, 13 Aug 2014 16:29:26 +0800 Subject: [PATCH 16/35] =?UTF-8?q?=20#932=20=E8=BE=93=E5=85=A5=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E4=B8=BA=E9=9D=9E=E6=B1=89=E5=AD=97=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=94=E5=AD=97=E6=95=B0=E8=BE=83=E5=A4=9A=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=B6=85=E5=87=BA=E8=BE=B9=E6=A1=86Bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/issues_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 5e7f7c18c..315a86340 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -73,7 +73,7 @@ module IssuesHelper ancestors.each do |ancestor| s << '
    ' + content_tag('p', link_to_issue(ancestor, :project => (issue.project_id != ancestor.project_id))) end - s << '
    ' + s << '
    ' subject = h(issue.subject) if issue.is_private? subject = content_tag('span', l(:field_is_private), :class => 'private') + ' ' + subject From bc6ad5d4163175a5d283fa4ccaeb5637b0826ebd Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Wed, 13 Aug 2014 16:45:50 +0800 Subject: [PATCH 17/35] =?UTF-8?q?#936=20=E8=BE=93=E5=85=A5=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=A0=87=E9=A2=98=E9=9D=9E=E6=B1=89=E6=97=8F=E6=98=BE?= =?UTF-8?q?=E7=A4=BAbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/documents/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 2964a06ba..45f54ad9b 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -9,7 +9,7 @@ <% end %>
    -

    <%=h @document.title %>

    +

    <%=h @document.title %>

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

    From e65487d52709791d2c6ce91cdb0ba5ab663162e6 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 13 Aug 2014 16:50:32 +0800 Subject: [PATCH 18/35] =?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 19/35] =?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 20/35] =?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 21/35] =?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 22/35] =?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) %>
    From 9d0f759a7140d1a0bc8c8703d33a04687a88998d Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Thu, 14 Aug 2014 09:42:58 +0800 Subject: [PATCH 23/35] =?UTF-8?q?#939=20=E9=A1=B9=E7=9B=AE=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=97=97=E5=B8=9C=E6=97=B6=E9=97=B4=E7=9A=84=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/show.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index e299be182..71bea9cfa 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -1,7 +1,8 @@ <% if @events_by_day.size >0 %>

    - <%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %> + <% # 暂时隐藏时间的显示%> + <%#= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %>

    <% @events_by_day.keys.sort.reverse.each do |day| %> From 027bd1ace686e47645333f5d07d0d332ad41730c Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Thu, 14 Aug 2014 09:56:22 +0800 Subject: [PATCH 24/35] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=82=E5=8A=A0?= =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E9=A1=B5=E9=9D=A2=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 --- config/locales/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b60184665..619fcd0d4 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1977,7 +1977,7 @@ zh: label_upload_softapplication_packets: 上传应用软件包 label_upload_softapplication_photo: 上传产品截图 label_upload_softapplication_packets_mustpacketed: 作品相关代码及相关说明文件必须打包后以压缩包的形式上传,便于上传和下载 ; - label_upload_softapplication_photo_condition: 作品截图最好0~4张(多余图片不会再展示页面上显示);格式为gif/jpg/png, 每张小于5M + label_upload_softapplication_photo_condition: 作品截图最好0~4张(多余图片不会在展示页面上显示);格式为gif/jpg/png/bmp等, 每张小于5M label_updated_caution: 注意:若编辑参赛作品,则之前上传的软件包和截图都将被删除,请重新上传! label_softapplication_name: 应用名称 label_work_name: 作品名称 From 86cb7d13d55bc8513f94aca7a863720092e13ffc Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Thu, 14 Aug 2014 10:24:01 +0800 Subject: [PATCH 25/35] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E9=80=9A=E7=9F=A5bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contestnotifications/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/contestnotifications/_form.html.erb b/app/views/contestnotifications/_form.html.erb index 7e7b10a23..afcb60657 100644 --- a/app/views/contestnotifications/_form.html.erb +++ b/app/views/contestnotifications/_form.html.erb @@ -3,7 +3,7 @@ <%= l(:bale_news_notice) %>
    -

    <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;" %>

    +

    <%= f.text_field :title, :required => true, :size => 60,:maxlength => 60, :style => "width:488px;" %>

    <%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;" %>

    From 87ada7c0d5c53d0a0339b393b3f7b552f0c33b36 Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Thu, 14 Aug 2014 10:52:34 +0800 Subject: [PATCH 26/35] =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8B=E8=BD=BD=E6=96=87=E4=BB=B6=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=B8=AD=E6=96=87=E6=8F=90=E7=A4=BA=EF=BC=9B=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E4=B8=AD=E6=96=87=E5=90=8E=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/file_not_found.html | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/public/file_not_found.html b/public/file_not_found.html index c927e13c0..38d022c09 100644 --- a/public/file_not_found.html +++ b/public/file_not_found.html @@ -1,6 +1,7 @@ + File not found + + +
    + +

    <%= l(:lable_file_not_found) %>

    +

    <%= l(:lable_goto_homepage) %>

    + +
    +
    +

    <%= l(:lable_trustie_team) %>

    +
    +
    + +
    + + From d21bda87a77ab682aa6d1130875c2eb3712a9d47 Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Thu, 14 Aug 2014 11:37:03 +0800 Subject: [PATCH 29/35] =?UTF-8?q?#938=20=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E4=BB=BB=E9=80=89=E6=9F=90=E9=A1=B9=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E2=80=9C=E6=9F=A5=E8=AF=A2=E2=80=9D=E5=8F=91=E7=94=9F=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/index.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 31cf824d7..67b3d46c4 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -34,6 +34,7 @@ <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
    +
    <%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %> <%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %> From 08115c9de4ad2c3bbb79f7ba5a555404b2ab1000 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 14 Aug 2014 14:11:02 +0800 Subject: [PATCH 30/35] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=202.=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A=E7=95=99?= =?UTF-8?q?=E8=A8=80=E6=B8=85=E9=99=A4=E6=8C=89=E9=92=AE=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=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/helpers/application_helper.rb | 20 ++++++++++---------- app/views/bids/_history.html.erb | 2 +- app/views/bids/_new.html.erb | 2 +- app/views/bids/show.html.erb | 4 ++-- app/views/issues/_list.html.erb | 2 +- config/locales/zh.yml | 1 + 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6ade665f9..4d8b53e3c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -679,15 +679,15 @@ module ApplicationHelper def textilizable(*args) options = args.last.is_a?(Hash) ? args.pop : {} case args.size - when 1 - obj = options[:object] - text = args.shift - when 2 - obj = args.shift - attr = args.shift - text = obj.send(attr).html_safe.to_s - else - raise ArgumentError, 'invalid arguments to textilizable' + when 1 + obj = options[:object] + text = args.shift + when 2 + obj = args.shift + attr = args.shift + text = obj.send(attr).to_s + else + raise ArgumentError, 'invalid arguments to textilizable' end return '' if text.blank? project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil) @@ -727,7 +727,7 @@ module ApplicationHelper when 2 obj = args.shift attr = args.shift - text = obj.send(attr).html_safe.to_s + text = obj.send(attr).to_s else raise ArgumentError, 'invalid arguments to textilizable' end diff --git a/app/views/bids/_history.html.erb b/app/views/bids/_history.html.erb index b0bc22479..0961e3cf8 100644 --- a/app/views/bids/_history.html.erb +++ b/app/views/bids/_history.html.erb @@ -5,7 +5,7 @@
    <%= render :partial => 'new', :locals => {:bid => @bid, :sta => @state} %>
    -<% label = ''; +<% label = '' case @bid.reward_type when 1 label = l(:label_respond_requirement) diff --git a/app/views/bids/_new.html.erb b/app/views/bids/_new.html.erb index cf9f8df30..7dd7492c0 100644 --- a/app/views/bids/_new.html.erb +++ b/app/views/bids/_new.html.erb @@ -41,7 +41,7 @@
    <%= 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 %>
    + <%= submit_tag l(:button_clear_meassge), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
    <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> - <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('bid_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
    diff --git a/app/views/bids/show.html.erb b/app/views/bids/show.html.erb index 96ed4ea75..3107d8bd6 100644 --- a/app/views/bids/show.html.erb +++ b/app/views/bids/show.html.erb @@ -4,11 +4,11 @@

    <%= link_to(@bid.author.lastname+@bid.author.firstname, user_path(@bid.author))%>:<%= link_to(@bid.name,respond_path(@bid)) %>

    <% if @bid.reward_type.nil? or @bid.reward_type == 1%> -

    +

    <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %>  <%= l(:label_RMB_sign) %><%= @bid.budget %>

    <% elsif @bid.reward_type == 2%> -

    +

    <%= l(:label_bids_reward_method) %><%= @bid.budget%>

    <% else %> diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 0a8402609..4c2a63844 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -39,7 +39,7 @@
      -

      <%= textAreailizable issue, :description %>

      + <%= textilizable issue, :description %>
      diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 8800ec253..9fce654b4 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1415,6 +1415,7 @@ zh: #fq button_leave_meassge: 留言 + button_clear_meassge: 清除留言 label_leave_message_to: 给用户 %{name}留言 label_leave_message: 留言内容 label_message: 留言板 From 445d29d0366a1cb904f28bb9650c3f04334c6206 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 14 Aug 2014 14:38:18 +0800 Subject: [PATCH 31/35] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E7=9A=84=E9=95=BF=E5=BA=A6=E4=B8=8A=E9=99=90?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=8C=E8=AE=BE=E7=BD=AE=E4=B8=BA2G=202.?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA=E8=B4=B4=E5=90=A7=E6=97=B6?= =?UTF-8?q?=E8=B4=B4=E5=90=A7=E7=9A=84=E6=8F=8F=E8=BF=B0=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/forum.rb | 2 +- app/models/memo.rb | 2 +- app/views/forums/new.html.erb | 2 +- .../20140814062455_change_forum_description.rb | 9 +++++++++ db/schema.rb | 12 ++++++------ 5 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 db/migrate/20140814062455_change_forum_description.rb diff --git a/app/models/forum.rb b/app/models/forum.rb index cd9c210dd..24b5b15e0 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -11,7 +11,7 @@ class Forum < ActiveRecord::Base 'creator_id' validates_presence_of :name, :creator_id, :description validates_length_of :name, maximum: 50 - validates_length_of :description, maximum: 255 + #validates_length_of :description, maximum: 255 validates :name, :uniqueness => true acts_as_taggable diff --git a/app/models/memo.rb b/app/models/memo.rb index 5a909f782..2c0d3571f 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -8,7 +8,7 @@ class Memo < ActiveRecord::Base # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } validates_length_of :subject, maximum: 50 - validates_length_of :content, maximum: 3072 + #validates_length_of :content, maximum: 3072 validate :cannot_reply_to_locked_topic, :on => :create acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC" diff --git a/app/views/forums/new.html.erb b/app/views/forums/new.html.erb index 19c911c37..2e8924c90 100644 --- a/app/views/forums/new.html.erb +++ b/app/views/forums/new.html.erb @@ -4,7 +4,7 @@ @nav_dispaly_main_contest_label = 1 %> <% @nav_dispaly_forum_label = 1%> -

      <%= l :label_forum_new %>

      +

      <%= l :label_forum_new %>

      <%= render 'form' %> diff --git a/db/migrate/20140814062455_change_forum_description.rb b/db/migrate/20140814062455_change_forum_description.rb new file mode 100644 index 000000000..1bcd81d81 --- /dev/null +++ b/db/migrate/20140814062455_change_forum_description.rb @@ -0,0 +1,9 @@ +class ChangeForumDescription < ActiveRecord::Migration + def up + change_column :forums, :description, :text, default: nil + end + + def down + change_column :forums, :description, :string, default: '' + end +end diff --git a/db/schema.rb b/db/schema.rb index 0a24b0ac1..525cfb745 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 => 20140812065417) do +ActiveRecord::Schema.define(:version => 20140814062455) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -448,14 +448,14 @@ ActiveRecord::Schema.define(:version => 20140812065417) do end create_table "forums", :force => true do |t| - t.string "name", :null => false - t.string "description", :default => "" + t.string "name", :null => false + t.text "description" t.integer "topic_count", :default => 0 t.integer "memo_count", :default => 0 t.integer "last_memo_id", :default => 0 - t.integer "creator_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.integer "creator_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "groups_users", :id => false, :force => true do |t| From 43cfcce44e3ff85efc450e242af91763e3732430 Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Thu, 14 Aug 2014 15:11:14 +0800 Subject: [PATCH 32/35] =?UTF-8?q?#826=20=EF=BC=9A=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4Bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_tag_name.html.erb | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index f5057aba3..f8a549b0f 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -43,32 +43,32 @@ <% case object_flag %> <% when '1' %> - - <% if User.current.eql?(obj) %> + + <% if User.current.eql?(obj) %> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - + <% when '2' %> - + <% if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - + <% when '3' %> - + <% if (ProjectInfo.find_by_project_id(obj.project_id)).try(:user_id) == User.current.id %> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> - + <% when '4' %> <% if obj.author_id == User.current.id %> - + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> - + <% end %> <% when '6' %> @@ -82,10 +82,10 @@ <% end %> <% when '7' %> <% if obj.author_id == User.current.id %> - + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> - + <% end %> <% when '9' %> @@ -94,6 +94,13 @@ :taggable_id => obj.id, :taggable_type => object_flag %> <% end %> <% end %> + + <% if obj.author_id == User.current.id %> + + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, + :taggable_id => obj.id, :taggable_type => object_flag %> + + <% end %>
    From daeab7ef64b47de0e7674e637a59d31d4f8ef487 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 14 Aug 2014 15:15:52 +0800 Subject: [PATCH 33/35] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E8=B4=B4=E5=90=A7=E6=97=B6=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E7=BC=96=E8=BE=91=E6=A1=86=202.=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E9=95=BF=E5=BA=A6=E9=99=90=E5=AE=9A=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=203.=E4=BF=AE=E6=94=B9=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/_form.html.erb | 13 ++++++++----- app/views/forums/show.html.erb | 3 ++- app/views/memos/_topic_form.html.erb | 5 +++-- app/views/memos/show.html.erb | 2 +- config/locales/zh.yml | 3 +++ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/views/forums/_form.html.erb b/app/views/forums/_form.html.erb index f67aa1181..993563954 100644 --- a/app/views/forums/_form.html.erb +++ b/app/views/forums/_form.html.erb @@ -13,16 +13,19 @@ --> <% end %> -
    +
    <%= f.text_field :name, :required => true, :style => 'width: 100%;', :class => 'create-share' %>
    -
    - <%= f.text_area :description, :required => true, :rows => 4, :style => 'width: 100%;resize: none;', :class => 'create-share' %> +
    + + <%= f.text_area :description, :required => true, :id => 'editor01' %> + +

    (<%= l(:lable_forums_max_length) %>)

    - <%= f.submit :value=>(l :button_submit) ,:class => 'nyan-clean-gray', :style => 'font-size: 14px; padding: 0px 3px' %> - <%= link_to l(:button_back), forums_path,:class => 'nyan-clean-gray',:style => 'font-size: 14px; padding: 0px 3px; color: #000' %> + <%= submit_tag l(:button_submit) %> + <%= link_to l(:button_back), forums_path ,:style => 'font-size: 14px; padding: 0px 3px;' %>
    <% end %> diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index d558abe3f..48913a38d 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -18,8 +18,9 @@

    <%= f.text_field :subject, :required => true%>

    <%= f.text_area :content, :required => true, :id => 'editor02' %>

    -
    +

    (<%= l(:lable_memos_max_length) %>)

    + <%= l(:label_attachment_plural) %>
    <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>

    diff --git a/app/views/memos/_topic_form.html.erb b/app/views/memos/_topic_form.html.erb index fa291a7f9..3f5642733 100644 --- a/app/views/memos/_topic_form.html.erb +++ b/app/views/memos/_topic_form.html.erb @@ -10,12 +10,13 @@
    <% end %> -
    +

    <%= f.text_field :subject, :required => true, :size => 95 %>

    <%= f.text_area :content, :required => true, :id => 'editor01' %>


    -

    + +

    <%= l(:label_attachment_plural) %>
    <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>

    diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 2c3248d06..75030797b 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -48,7 +48,7 @@
    <%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
    - <%=h sanitize(@memo.content.html_safe) %> + <%= textAreailizable(@memo,:content) %>

    <% if @memo.attachments.any?%> <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 1d66874ee..62c9b860f 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2109,4 +2109,7 @@ zh: lable_file_not_found: 对不起,该文件现在不能下载! lable_goto_homepage: 返回主页 lable_trustie_team: Trustie开发团队 + + lable_memos_max_length: 帖子内容最大长度为65535个字符 + lable_forums_max_length: 贴吧描述最大长度为65535个字符 \ No newline at end of file From 0215c96ec9d8f5715b213db369b015a0f1e4d755 Mon Sep 17 00:00:00 2001 From: zhanghaitao <562681745@qq.com> Date: Thu, 14 Aug 2014 15:47:36 +0800 Subject: [PATCH 34/35] =?UTF-8?q?=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_tag_name.html.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb index f8a549b0f..531ed6966 100644 --- a/app/views/tags/_tag_name.html.erb +++ b/app/views/tags/_tag_name.html.erb @@ -95,12 +95,13 @@ <% end %> <% end %> - <% if obj.author_id == User.current.id %> +

    From fb50defbec56abfd0bb6f7e05317882087eae385 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 14 Aug 2014 15:54:03 +0800 Subject: [PATCH 35/35] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=9B=9E=E5=8E=BB=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contests/_new.html.erb | 2 +- app/views/homework_attach/_addjour.html.erb | 2 +- app/views/homework_attach/_evaluation_add_jour.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/contests/_new.html.erb b/app/views/contests/_new.html.erb index 804c59429..7ef0e71f1 100644 --- a/app/views/contests/_new.html.erb +++ b/app/views/contests/_new.html.erb @@ -40,7 +40,7 @@ + <%= submit_tag l(:button_clear_meassge), :name => nil, :onclick => "clearMessage('contest_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
    <%= submit_tag l(:button_leave_meassge), :name => nil , :class => "contest_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> - <%= submit_tag l(:button_clear), :name => nil, :onclick => "clearMessage('contest_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
    diff --git a/app/views/homework_attach/_addjour.html.erb b/app/views/homework_attach/_addjour.html.erb index fb64a0995..fae799a93 100644 --- a/app/views/homework_attach/_addjour.html.erb +++ b/app/views/homework_attach/_addjour.html.erb @@ -78,7 +78,7 @@ :name => nil , :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> - <%= submit_tag l(:button_clear), :name => nil, :class => "enterprise", + <%= submit_tag l(:button_clear_meassge), :name => nil, :class => "enterprise", :onclick => "clearMessage('new_form_user_message');", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %> diff --git a/app/views/homework_attach/_evaluation_add_jour.html.erb b/app/views/homework_attach/_evaluation_add_jour.html.erb index aacbf4c12..5ba198013 100644 --- a/app/views/homework_attach/_evaluation_add_jour.html.erb +++ b/app/views/homework_attach/_evaluation_add_jour.html.erb @@ -78,7 +78,7 @@ :name => nil , :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> - <%= submit_tag l(:button_clear), :name => nil, :class => "enterprise", + <%= submit_tag l(:button_clear_meassge), :name => nil, :class => "enterprise", :onclick => "clearMessage('new_form_user_message');", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>