From 6498002c714e6f121de3e034903796a6f95cf1fd Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 18 Mar 2015 15:50:00 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=AD=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98=E3=80=81=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=9A=84=E6=97=B6=E5=80=99=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84bug=20=E5=8E=9F=E5=9B=A0=EF=BC=9A?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/documents_controller.rb | 1 + app/views/documents/_form.html.erb | 4 +- app/views/documents/edit.html.erb | 4 +- app/views/issues/_newissue_index.html.erb | 139 --------------------- app/views/issues/index.html.erb | 140 +++++++++++++++++++++- app/views/issues/index.js.erb | 1 - public/stylesheets/application.css | 2 +- 7 files changed, 146 insertions(+), 145 deletions(-) delete mode 100644 app/views/issues/_newissue_index.html.erb delete mode 100644 app/views/issues/index.js.erb diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 545d61155..9bf2ee846 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -91,6 +91,7 @@ class DocumentsController < ApplicationController def update @document.safe_attributes = params[:document] + @document.save_attachments(params[:attachments]) if request.put? and @document.save flash[:notice] = l(:notice_successful_update) redirect_to document_url(@document) diff --git a/app/views/documents/_form.html.erb b/app/views/documents/_form.html.erb index 72361b9ab..50f47e5f7 100644 --- a/app/views/documents/_form.html.erb +++ b/app/views/documents/_form.html.erb @@ -11,8 +11,8 @@ <%= wikitoolbar_for 'document_description' %> -<% if @document.new_record? %> +

<%= render :partial => 'attachments/form', :locals => {:container => @document} %>

-<% end %> + diff --git a/app/views/documents/edit.html.erb b/app/views/documents/edit.html.erb index 8a6122f8c..5c6ed2383 100644 --- a/app/views/documents/edit.html.erb +++ b/app/views/documents/edit.html.erb @@ -1,4 +1,6 @@ -

<%=l(:label_document)%>

+
+

<%=l(:label_document_plural)%>

+
<%= labelled_form_for @document do |f| %> <%= render :partial => 'form', :locals => {:f => f} %> diff --git a/app/views/issues/_newissue_index.html.erb b/app/views/issues/_newissue_index.html.erb deleted file mode 100644 index 4b282aa8f..000000000 --- a/app/views/issues/_newissue_index.html.erb +++ /dev/null @@ -1,139 +0,0 @@ -
-

问题跟踪

-
-
- <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> - - <% if User.current.member_of?(@project) %> - <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new, - :html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %> - <% end %> - <%= link_to l(:label_query), '#', :class => 'icon icon-help', - :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %> - - <% end %> - 问题总数:<%= @project.issues.count %> 未解决:<%= @project.issues.where('status_id in (1,2,4,6)').count %> -
-
- <% if !@query.new_record? && @query.editable_by?(User.current) %> - <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> - <%= delete_link query_path(@query) %> - <% end %> -
- -<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> -
- <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %> - <%= hidden_field_tag 'set_filter', '1' %> - -
- ---<%= l :label_query_new %>--- - -
-
"> - - <%= l(:label_issue_query_condition) %> - -
"> - <%= 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' %> -
-
-
- <% end %> -
- -<%= error_messages_for 'query' %> - -<% if @query.valid? %> - <% if @issues.empty? %> -

- <%= l(:label_no_data) %> -

- <% else %> - <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> - - <% end %> -
- <% other_formats_links do |f| %> - <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> - <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %> - <%= f.link_to 'PDF', :url => params %> - <% end %> -
- - - - -<% end %> - -<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %> - -<% content_for :sidebar do %> - <%= render :partial => 'issues/sidebar' %> -<% end %> - -<% content_for :header_tags do %> - <%= auto_discovery_link_tag(:atom, - {:query_id => @query, :format => 'atom', - :page => nil, :key => User.current.rss_key}, - :title => l(:label_issue_plural)) %> - <%= auto_discovery_link_tag(:atom, - {:controller => 'journals', :action => 'index', - :query_id => @query, :format => 'atom', - :page => nil, :key => User.current.rss_key}, - :title => l(:label_changes_details)) %> -<% end %> - -<%= context_menu issues_context_menu_path %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index b3750a770..4b282aa8f 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1 +1,139 @@ -<%= render :partial => 'issues/newissue_index' %> \ No newline at end of file +
+

问题跟踪

+
+
+ <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> + + <% if User.current.member_of?(@project) %> + <%= link_to l(:label_issue_new), {:controller => 'issues', :action => 'new', :copy_from => nil}, :param => :project_id, :caption => :label_issue_new, + :html => {:accesskey => Redmine::AccessKeys.key_for(:new_issue)}, :class => 'icon icon-add' %> + <% end %> + <%= link_to l(:label_query), '#', :class => 'icon icon-help', + :onclick => '$("#custom_query").slideToggle(400); ' if true || User.current.logged? %> + + <% end %> + 问题总数:<%= @project.issues.count %> 未解决:<%= @project.issues.where('status_id in (1,2,4,6)').count %> +
+
+ <% if !@query.new_record? && @query.editable_by?(User.current) %> + <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> + <%= delete_link query_path(@query) %> + <% end %> +
+ +<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> +
+ <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get, :id => 'query_form', :class => 'query_form') do %> + <%= hidden_field_tag 'set_filter', '1' %> + +
+ ---<%= l :label_query_new %>--- + +
+
"> + + <%= l(:label_issue_query_condition) %> + +
"> + <%= 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' %> +
+
+
+ <% end %> +
+ +<%= error_messages_for 'query' %> + +<% if @query.valid? %> + <% if @issues.empty? %> +

+ <%= l(:label_no_data) %> +

+ <% else %> + <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> + + <% end %> +
+ <% other_formats_links do |f| %> + <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> + <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %> + <%= f.link_to 'PDF', :url => params %> + <% end %> +
+ + + + +<% end %> + +<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %> + +<% content_for :sidebar do %> + <%= render :partial => 'issues/sidebar' %> +<% end %> + +<% content_for :header_tags do %> + <%= auto_discovery_link_tag(:atom, + {:query_id => @query, :format => 'atom', + :page => nil, :key => User.current.rss_key}, + :title => l(:label_issue_plural)) %> + <%= auto_discovery_link_tag(:atom, + {:controller => 'journals', :action => 'index', + :query_id => @query, :format => 'atom', + :page => nil, :key => User.current.rss_key}, + :title => l(:label_changes_details)) %> +<% end %> + +<%= context_menu issues_context_menu_path %> diff --git a/app/views/issues/index.js.erb b/app/views/issues/index.js.erb deleted file mode 100644 index 866882053..000000000 --- a/app/views/issues/index.js.erb +++ /dev/null @@ -1 +0,0 @@ -$('#content').html('<%= escape_javascript(render :partial => 'issues/newissue_index') %>'); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 6d50d8bd2..3c487db5a 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -77,7 +77,7 @@ a:hover.subnav_green{ background:#14ad5a;} /*右侧内容--动态*/ /*右侧内容--动态*/ .project_r_h{height:40px; background:#eaeaea; margin-bottom:10px;} -.project_h2{ background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} +.project_h2{ background:#64bdd9; color:#fff; height:29px; width:90px; text-align:center; font-weight:normal; padding-top:10px; font-size:16px;padding-left:10px;} .project_r_box{ border:1px solid #e2e1e1; width:670px; margin-top:10px;} .project_h3 { color:#646464; font-size:14px; padding:0 10px; border-bottom:1px solid #e2e1e1;} a.more{ float:right; font-size:12px; font-weight:normal; color:#a9a9a9; margin-top:3px;} From fd2c3e82014726991d5768dbfdd56159a1cf03e8 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 18 Mar 2015 17:21:19 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/course_dynamic.rb | 2 ++ app/services/courses_service.rb | 2 +- app/views/issues/show.html.erb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/api/mobile/entities/course_dynamic.rb b/app/api/mobile/entities/course_dynamic.rb index aa8aadbb6..b6e4630e4 100644 --- a/app/api/mobile/entities/course_dynamic.rb +++ b/app/api/mobile/entities/course_dynamic.rb @@ -15,6 +15,8 @@ module Mobile course_dynamic_expose :type course_dynamic_expose :count course_dynamic_expose :course_name + course_dynamic_expose :course_term + course_dynamic_expose :course_time course_dynamic_expose :course_id course_dynamic_expose :course_img_url course_dynamic_expose :message diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index 1ec8a0ef0..dc6cf8119 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -402,7 +402,7 @@ class CoursesService latest_course_dynamics.sort!{|order,newer| newer[:time] <=> order[:time]} latest_course_dynamic = latest_course_dynamics.first unless latest_course_dynamic.nil? - result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:type => latest_course_dynamic[:type],:update_time => latest_course_dynamic[:time],:message => latest_course_dynamic[:message],:count => nil} + result << {:course_name => course.name,:course_id => course.id,:course_img_url => url_to_avatar(course),:course_time => course.time,:course_term => course.term,:type => latest_course_dynamic[:type],:update_time => latest_course_dynamic[:time],:message => latest_course_dynamic[:message],:count => nil} end end result.sort!{|order,newer| newer[:update_time] <=> order[:update_time]} diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 69abf79a6..42171d595 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -89,7 +89,7 @@ end %> <%= render_custom_fields_rows(@issue) %> <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> -woca + <% if @issue.description? || @issue.attachments.any? -%>
<% if @issue.description? %> From 9d686349da40a0de155e8cc29c95d60ab8400369 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 18 Mar 2015 17:31:35 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0=E6=8C=89=E6=98=B5=E7=A7=B0?= =?UTF-8?q?=E6=88=96=E5=A7=93=E5=90=8D=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/apis/users.rb | 2 +- app/models/user.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/mobile/apis/users.rb b/app/api/mobile/apis/users.rb index 9a5307be6..b6d1db25c 100644 --- a/app/api/mobile/apis/users.rb +++ b/app/api/mobile/apis/users.rb @@ -82,7 +82,7 @@ module Mobile desc "用户搜索" params do requires :name, type: String, desc: '用户名关键字' - requires :search_by, type: String,desc: '搜索依据:0 昵称,1 用户名,2 邮箱' + requires :search_by, type: String,desc: '搜索依据:0 昵称,1 用户名,2 邮箱,3 昵称和姓名' end get 'search/search_user' do us = UsersService.new diff --git a/app/models/user.rb b/app/models/user.rb index 83e08254c..860eb56a5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -214,6 +214,8 @@ class User < Principal where(" LOWER(login) LIKE '#{pattern}' ") elsif type == "1" where(" LOWER(concat(lastname, firstname)) LIKE '#{pattern}' ") + elsif type == "3" + where(" LOWER(concat(lastname, firstname,login)) LIKE '#{pattern}' ") else where(" LOWER(mail) LIKE '#{pattern}' ") end From 7e8ee49298b2f1592a5de6684c3f8a956bce48b0 Mon Sep 17 00:00:00 2001 From: whimlex Date: Wed, 18 Mar 2015 18:02:54 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BA=93=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_show_all_attachment.html.erb | 6 ++--- app/views/files/_sort_by_attachtypel.html.erb | 6 ++--- app/views/tags/_show_attachments.html.erb | 10 ++++---- config/locales/commons/en.yml | 7 ++---- config/locales/commons/zh.yml | 2 +- config/locales/contests/en.yml | 10 ++++++++ config/locales/contests/zh.yml | 13 +++++++++- config/locales/en.yml | 20 +++++---------- config/locales/projects/en.yml | 25 ++++++++++++++++++- config/locales/projects/zh.yml | 15 ++++++++--- config/locales/zh.yml | 22 +++------------- 11 files changed, 81 insertions(+), 55 deletions(-) diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index c32280c2c..6935c186f 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -16,8 +16,8 @@ <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure",:class => "tableth") %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %> - <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> - <%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%> + <%= sort_header_tag('attach_type', :caption => l(:field_filecontenttype), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> + <%= content_tag('th', l(:field_filetype), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%> <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %> @@ -73,7 +73,7 @@
diff --git a/app/views/files/_sort_by_attachtypel.html.erb b/app/views/files/_sort_by_attachtypel.html.erb index 5faa73b0f..27aaf2f3d 100644 --- a/app/views/files/_sort_by_attachtypel.html.erb +++ b/app/views/files/_sort_by_attachtypel.html.erb @@ -15,8 +15,8 @@ <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure" ,:class => "tableth") %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %> - <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> - <%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%> + <%= sort_header_tag('attach_type', :caption => l(:field_filecontenttype), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> + <%= content_tag('th', l(:field_filetype), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%> <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %> @@ -76,7 +76,7 @@
diff --git a/app/views/tags/_show_attachments.html.erb b/app/views/tags/_show_attachments.html.erb index a76211fc6..ca6a2dd7a 100644 --- a/app/views/tags/_show_attachments.html.erb +++ b/app/views/tags/_show_attachments.html.erb @@ -24,19 +24,19 @@    <%= file.description %>
- <%= l('label_attachment_category')%> + <%= l('attachment.category')%> <%=result_come_from file%>
- <%= l('label_attachment_download_num')%> + <%= l('attachment.download_num')%> <%= file.downloads%>| - <%= l('label_attachment_size')%> + <%= l('attachment.size')%> <%= number_to_human_size(file.filesize) %>| - <%= l('label_attachment_sharer')%> + <%= l('attachment.sharer')%> <%= link_to file.author, user_path(file.author), target: "_blank" unless file.author.blank? %> | - <%= l('label_attachment_upload_time')%> + <%= l('attachment.upload_time')%> <%= format_time(file.created_on) %>
diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml index 561fc09cc..b9a6e89c4 100644 --- a/config/locales/commons/en.yml +++ b/config/locales/commons/en.yml @@ -138,10 +138,7 @@ en: circular_dependency: "This relation would create a circular dependency" cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" - attachment_all: "All" - attachment_browse: "Attachment Content Browse" - attachment_sufix_browse: "Attachment Type Browse" - attachment_type: "Attachment Type" + general_text_No: 'No' general_text_Yes: 'Yes' general_text_no: 'no' @@ -166,7 +163,7 @@ en: label_requirement: Calls label_forum: Forum label_contest: Contest - + label_attachment_plural: Files diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index 35087eb06..a238e1234 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -173,7 +173,7 @@ zh: label_requirement: 需求 label_forum: 公共贴吧 label_contest: 竞赛 - + label_attachment_plural: 文件 field_description: 描述 diff --git a/config/locales/contests/en.yml b/config/locales/contests/en.yml index e124e3f1a..1c2784050 100644 --- a/config/locales/contests/en.yml +++ b/config/locales/contests/en.yml @@ -2,3 +2,13 @@ en: # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl) direction: ltr + # + # 竞赛托管平台 + # + # 主页 + # + label_current_hot_contest: Latest Hot Competition + label_current_attendingcontest_work: Latest Competition Work + label_issue_feedback_activities: Question&Feedback + label_more_information: More... + label_release_time: Release-time \ No newline at end of file diff --git a/config/locales/contests/zh.yml b/config/locales/contests/zh.yml index 08115110b..1c4c4d126 100644 --- a/config/locales/contests/zh.yml +++ b/config/locales/contests/zh.yml @@ -3,4 +3,15 @@ # by tsechingho (http://github.com/tsechingho) zh: # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl) - direction: ltr \ No newline at end of file + direction: ltr + + # + # 竞赛托管平台 + # + # 主页 + # + label_current_hot_contest: 最新热门竞赛 + label_current_attendingcontest_work: 最新参赛作品 + label_issue_feedback_activities: 问题和反馈动态 + label_more_information: 更多>> + label_release_time: 发布时间 diff --git a/config/locales/en.yml b/config/locales/en.yml index ac98c4005..e84a26815 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -71,10 +71,9 @@ en: field_summary: Summary field_job_category: Job category # added by bai - field_filename: File - field_file_dense: File Dense - field_filesize: Size - field_downloads: Downloads + + + field_author: Author field_created_on: Created field_closed_on: Closed @@ -340,7 +339,7 @@ en: label_create_new_projects: Create a project label_work_scores_people: The total number of users given scores label_project_grade: Score - label_relation_files: Select an existing resource + # Personal signature tips @@ -482,7 +481,7 @@ en: label_attachment: Files label_attachment_new: New file label_attachment_delete: Delete file - label_attachment_plural: Files + label_file_added: File added label_report: Report label_report_plural: Reports @@ -792,7 +791,7 @@ en: label_cross_project_hierarchy: With project hierarchy label_cross_project_system: With all projects label_gantt_progress_line: Progress line - label_files_filter: Files Filter: + button_check_all: Check all button_uncheck_all: Uncheck all @@ -1430,13 +1429,7 @@ en: label_your_course: your course label_have_message: have a new message lable_not_receive_mail: Click here don't receive email form site! -#added by linchun as competition# - label_current_hot_contest: Latest Hot Competition - label_current_attendingcontest_work: Latest Competition Work - label_issue_feedback_activities: Question&Feedback - label_more_information: More... - label_release_time: Release-time label_weixin: WeiXin @@ -1571,7 +1564,6 @@ en: label_trustie_team: The Trustie development team label_memos_max_length: The content of the post up to 65535 characters in length label_forums_max_length: Post Bar describing the maximum length of 65535 characters - label_unknow_type: Unknow type review_assignments: Review assignments label_my_school: My school diff --git a/config/locales/projects/en.yml b/config/locales/projects/en.yml index 458311bda..ba6b81a5c 100644 --- a/config/locales/projects/en.yml +++ b/config/locales/projects/en.yml @@ -37,7 +37,7 @@ en: label_unapply_project: Cancel the application label_member: Members - project_module_attachments: Resources + project_module_attachments: Files label_invite: Invitation label_invite_new_user: "Send e-mail to invite new user" @@ -95,6 +95,29 @@ en: # # 资源库 # + lable_file_sharingarea: Files + + label_upload_files: Upload + + + # 资源库(附件)公用 + label_relation_files: Select an existing resource + label_search_by_keyword: "Search by keywords" + label_files_filter: "Files Filter:" + + attachment_all: "All" + attachment_browse: "Attachment Content Browse" + attachment_sufix_browse: "Attachment Type Browse" + attachment_type: "Attachment Type" + label_unknow_type: Unknow type + + field_filename: File + field_filesize: Size + field_filecontenttype: Content Typ + field_filetype: File Typ + field_downloads: Downloads + field_file_dense: Dense + diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index b68d9b64d..a58536e10 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -101,16 +101,23 @@ zh: label_upload_files: 上传文件 - # 附件公用 + # 资源库(附件)公用 label_relation_files: 关联已有资源 label_search_by_keyword: "按关键字搜索:" label_files_filter: "资源过滤:" - attachment_all: "全部" + + field_filename: 文件 + field_filesize: 大小 + field_filecontenttype: 内容分类 + field_filetype: 文件格式 + field_file_dense: 是否公开 + field_downloads: 下载次数 + attachment_sufix_browse: "文件类型" attachment_browse: "内容类型" + attachment_all: "全部" attachment_type: "分类" - - + label_unknow_type: 未知类型 # # 项目托管平台 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 626a12abd..dc1937926 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -99,10 +99,9 @@ zh: lastname_empty: 姓氏不能为空 enterprise_empty: 企业名不能为空 field_lastname_eg: '(例:张三丰,请填写[张])' - field_filename: 文件 - field_file_dense: 是否公开 - field_filesize: 大小 - field_downloads: 下载次数 + + + field_author: 作者 field_created_on: 创建于 field_updated_on: 更新于 @@ -566,7 +565,7 @@ zh: label_file_upload: 上传资料 label_course_file_upload: 上传了课件 label_attachment_delete: 删除文件 - label_attachment_plural: 文件 + label_file_added: 文件已添加 label_report: 报表 label_report_plural: 报表 @@ -1918,12 +1917,6 @@ zh: lable_not_receive_mail: 点此设置接收本站邮件偏好! label_contest_notification: 竞赛通知 - #english site translation - label_current_hot_contest: 最新热门竞赛 - label_current_attendingcontest_work: 最新参赛作品 - label_issue_feedback_activities: 问题和反馈动态 - label_more_information: 更多>> - label_release_time: 发布时间 label_weixin: 微信扫码 @@ -2032,13 +2025,6 @@ zh: label_enterprise_nil: 该模块为最新上线模块,目前还没有创建企业项目! label_enterprises: 组织 - label_tags_opensource: 开源项目 - label_attachment_category: 所属分类 - label_attachment_download_num: 下载 - label_attachment_size: 大小 - label_attachment_sharer: 共享者 - label_attachment_upload_time: 上传时间 - #api label_recently_updated_notification: 最近更新了通知 From 1cdf397bc09c53353948cc1fcfbec154bfac95f2 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 18 Mar 2015 20:04:59 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=B3=E6=B3=A8?= =?UTF-8?q?=E3=80=81=E7=94=B3=E8=AF=B7=E6=96=B9=E6=B3=95=E4=B8=AD=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/watchers_helper.rb | 4 ++-- app/views/boards/_project_show.html.erb | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index b9e658bb5..221331338 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -43,7 +43,7 @@ module WatchersHelper ) method = watched ? 'delete' : 'post' - link_to text, url, :remote => true, :method => method, :class => css + link_to text, url, :remote => true, :method => method, :style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 22px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES" end ############## added by linchun @@ -278,7 +278,7 @@ module WatchersHelper ) method = applied ? 'delete' : 'post' - link_to text, url, :remote => true, :method => method ,:class=>css + link_to text, url, :remote => true, :method => method ,:style => "color: #fff; display:block; padding: 0px 5px; margin-right: 10px; height: 22px; line-height: 22px; background: none repeat scroll 0% 0% #64BDD9; TES" end def exit_project_link(project) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index d5449e44d..7ddd37ad6 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -44,7 +44,7 @@
项目讨论区共有<%= @topic_count %>个帖子
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %> - <%= link_to l(:label_message_new), new_board_message_path(@board), + <%= link_to l(:label_message_new), new_board_message_path(@board), :class => 'problem_new_btn fl', :onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %> <% end %> @@ -61,14 +61,14 @@
<%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %> <% if topic.sticky? %> - 置顶 + 置顶 <% end %>
- 由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> - 添加于<%= format_time topic.created_on %> + 由<%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> + 添加于<%= format_time topic.created_on %>
-
+ 回复<%= link_to (topic.replies_count), board_message_path(@board, topic), :style =>"color:#fff;" %>
From cf3d836cf3e61751aaa37dc594171b8aca39d978 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Thu, 19 Mar 2015 09:37:37 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=97=B6=E5=87=BA=E7=8E=B0=E3=80=8A"?= =?UTF-8?q?=E4=BA=B2=E7=88=B1=E7=9A=84Trustie=E7=94=A8=E6=88=B7=EF=BC=8C?= =?UTF-8?q?=E6=82=A8=E5=A5=BD=EF=BC=81"=E3=80=8B=20Signed-off-by:=20alan?= =?UTF-8?q?=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/mailer.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index c5be3f4fd..c24ab84e7 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -41,7 +41,8 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}
-

<%= l(:mail_issue_greetings)%>

+ +
<%= yield %>
From 39193a0d710333fbf1d3977cbfdc8f060b386c53 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 Mar 2015 10:04:01 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E4=B8=AD=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/application.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 3c487db5a..e665e11dc 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -109,8 +109,8 @@ a:hover.more{ color:#64bdd9;} .icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; } .icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px} .icon_removem:hover{background:url(../images/img_floatbox.png) -22px -61px no-repeat;} -.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;} -.btn_free:hover{ background:#d63502;} +.btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff !important; height:25px; padding-top:5px; margin-bottom:10px;} +.btn_free:hover{ background:#d63502;text-decoration:none;} /*成员邀请*/ .invi_search{ margin-left:50px;} .invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} From 28a61c261709389028b5174de7a2e8ed2b36c8fa Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 19 Mar 2015 10:13:43 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=97=A0=E6=B3=95=E6=90=9C=E5=88=B0=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E7=9A=84=E7=A7=81=E6=9C=89=E8=AF=BE=E7=A8=8B=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/services/courses_service.rb | 2 +- app/services/users_service.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index dc6cf8119..4512344ad 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -38,7 +38,7 @@ class CoursesService if name.blank? raise 'sumbit empty' end - @courses = courses_all.visible + @courses = courses_all.visible(current_user) if params[:name].present? @courses_all = @courses.like(params[:name]) else diff --git a/app/services/users_service.rb b/app/services/users_service.rb index f75a84c5b..39ca37d26 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -193,7 +193,6 @@ class UsersService @current_user.save #raise @current_user.errors.full_message #return @current_user - else raise 'wrong password' end From 371f25b61ffcd4b1cbe3032365aa4431d417c332 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 19 Mar 2015 10:44:03 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=80=E8=AF=B7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=86=E9=A1=B5=E5=BC=82=E5=B8=B8=EF=BC=88?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E5=BC=95=E8=B5=B7=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/invite_members_by_mail.html.erb | 2 ++ public/stylesheets/application.css | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb index 63f69e120..c222bece1 100644 --- a/app/views/projects/invite_members_by_mail.html.erb +++ b/app/views/projects/invite_members_by_mail.html.erb @@ -45,6 +45,7 @@
+

<%= l(:label_invite_new_user)%>

<%= l(:label_invite_email_tips)%> @@ -62,5 +63,6 @@ <%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %> <% end %> +

\ No newline at end of file diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index e665e11dc..3374d1177 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -13,7 +13,7 @@ ul.wlist{ margin-left: -40px; border-bottom:none; } ul.wlist li{float: left;} ul.wlist li a{ border:1px solid #15bccf; padding:4px; margin-left:3px;} ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} -.wlist_select { background-color:#64bdd9; color:#fff; padding: 4px 3px 3px 3px; margin-left:3px;margin-top: -5px; border:1px solid #64bdd9;} +.wlist_select { background-color:#64bdd9; color:#fff; padding: 5px 3px 3px 3px; margin-left:3px;margin-top: 0px; border:1px solid #64bdd9;} /*20150203项目界面优化样式 By: huangjignquan*/ .project_new{font-size: 15px; padding: 5px;} @@ -104,7 +104,7 @@ a:hover.more{ color:#64bdd9;} .box_main02{ width:390px; margin:15px auto;} .box_h3{ color:#15bccf; text-align:center; font-size:16px;} .box_p{ color:#404040; margin-bottom:5px;} -.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;} +.fb_item{ color:#919191; border:1px solid #919191; height:25px; margin-bottom:10px; padding-left:5px; width:290px;} .icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;} .icon_addm:hover{background:url(../images/img_floatbox.png) 0 -61px no-repeat; } .icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px} @@ -112,11 +112,11 @@ a:hover.more{ color:#64bdd9;} .btn_free{ background:#ff5722; display:block; width:80px; text-align:center; color:#fff !important; height:25px; padding-top:5px; margin-bottom:10px;} .btn_free:hover{ background:#d63502;text-decoration:none;} /*成员邀请*/ -.invi_search{ margin-left:50px;} -.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;} +.invi_search{ margin-left:25px;} +.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px;} .invi_search_btn{ background:#15bccf; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #15bccf; padding-top:2px; cursor:pointer;} .invi_search_btn:hover{ background:#0da1b2; border:1px solid #0da1b2;} -.rolebox{ margin:10px 0;} +.rolebox{ margin:10px 0;margin-left:-38px;} /*问题跟踪*/ .problem_top{ margin:10px 0 ;} .problem_search_input{ border:1px solid #64bdd9; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}