From c56f6411637b5d2832145df5e74798e5722019bb Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 30 Jan 2015 09:57:43 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E9=A1=B9=E7=9B=AE=E6=8C=89=E9=92=AE=E6=B2=A1?= =?UTF-8?q?=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 899997456..e3a804ef8 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -33,7 +33,7 @@ class ProjectsController < ApplicationController menu_item l(:label_course_news), :only => :index - before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches] + before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_project] # before_filter :authorize, :except => [:new_join, :new_homework, :homework, :statistics, :search, :watcherlist, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, # :statistics, :feedback, :course, :enterprise_course, :course_enterprise, :project_respond, :share, # :show_projects_score, :issue_score_index, :news_score_index, :file_score_index, :code_submit_score_index, :projects_topic_score_index] @@ -910,6 +910,14 @@ class ProjectsController < ApplicationController end end end + + #加入私有项目 + def join_project + respond_to do |format| + format.js + end + end + private def memberAccess From 6bca666f08593fbcbf18b4d81012ba72d198e0a6 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 30 Jan 2015 10:24:06 +0800 Subject: [PATCH 02/21] =?UTF-8?q?=20#1896=20=20=20=E8=AF=BE=E7=A8=8B--?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E8=B0=83=E6=9F=A5--=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E9=A2=98=E7=9B=AE=E6=97=B6=E7=82=B9=E5=87=BB=E7=A1=AE=E5=AE=9A?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=97=A0=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index 05ca1e61f..658d8a9b7 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -25,13 +25,13 @@ } //添加标题时确定按钮 - function add_poll_question(obj) + function add_poll_question(doc) { var title = $.trim($("#poll_questions_title").val()); if(title.length == 0){alert("标题不能为空");}else{doc.parent().parent().parent().submit();} } //修改标题时确定按钮 - function edit_poll_question(obj,id) + function edit_poll_question(doc,id) { var title = $.trim($("#poll_questions_title_" + id).val()); if(title.length == 0){alert("标题不能为空");}else{doc.parent().parent().parent().submit();} From f05e046751c73622437bc054e3bdf108001d3ac6 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 30 Jan 2015 10:26:26 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/helpers/welcome_helper.rb | 36 ++-- app/views/layouts/_base_footer.html.erb | 22 +-- .../layouts/_bootstrap_base_footer.html.erb | 12 +- app/views/welcome/_search_course.html.erb | 8 +- app/views/welcome/_search_project.html.erb | 10 +- app/views/welcome/contest.html.erb | 2 +- app/views/welcome/index.html.erb | 7 +- config/locales/en.yml | 162 +++++++++++++++--- config/locales/zh.yml | 155 ++++++++++++++--- 10 files changed, 321 insertions(+), 95 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1face5c38..4d9004e57 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1844,7 +1844,7 @@ module ApplicationHelper users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain} # contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'} bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'} - forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index"} + forum_link = link_to l(:label_forum_all), {:controller => "forums", :action => "index"} stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'} school_all_school_link = link_to l(:label_school_all), {:controller => 'school', :action => 'index'} diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 27caa8306..d101fd36c 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -314,38 +314,38 @@ module WelcomeHelper str = ' '.html_safe case event.event_type when 'news' - str << content_tag("span", "发表了") << + str << content_tag("span", l(:field_user_active_published)) << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url, {:title => event.event_description}) when 'issue', 'message' , 'bid' , 'wiki-page' , 'document' - str << content_tag("span", "发表了") << + str << content_tag("span", l(:field_user_active_published)) << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title}) when 'reply' ,'Reply', 'Memo' - str << content_tag("span", "发表了") << - content_tag("span", find_all_event_type(event)) << + str << content_tag("span", l(:field_user_active_published)) << + content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url, {:title => event.event_description}) when 'attachment' - str << content_tag('span', '上传了') << + str << content_tag('span', l(:field_user_active_uploaded)) << content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title}) << link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container.project), :class => "attachments_list_color") else - str << content_tag("span", "更新了") << + str << content_tag("span", l(:field_user_active_updated)) << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title}) end str rescue Exception => e - str << content_tag("span", '未知内容') + str << content_tag("span", l(:field_user_active_unknow)) end def show_event_reply event - str = "回复(" + str = l(:field_active_reply) case event.event_type when 'news' str << link_to( event.comments.count, news_path(event)) << ")" @@ -463,25 +463,25 @@ module WelcomeHelper def find_all_event_type event case event.event_type when 'news' - '新闻' + l(:field_user_active_news) when 'issue' - '缺陷' + l(:field_user_active_issue) when 'attachment' - '附件' + l(:field_user_active_attachment) when 'message' - '主题' + l(:field_user_active_message) when 'Reply','reply' - '回复' + l(:field_user_active_reply) when 'bid' - '作业' + l(:field_user_active_bid) when 'Memo' - '主题' + l(:field_user_active_memo) when 'document' - '文件' + l(:field_user_active_document) when 'changeset' - '版本库' + l(:field_user_active_changeset) when 'issue-note' - '问题说明' + l(:field_user_active_issue_note) else event.event_type end diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 4050de3b7..4716ed25a 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -9,12 +9,12 @@

<% if @organizer.nil? %>

- 主办单位 - 国防科学技术大学并行与分布处理国家重点实验室 - 计算机科学与技术系 - 版权©2007~2014 - 联系我们 - 湘ICP备09019772 + <%= l(:label_hosted_organization) %> + <%= l(:label_hosted_by) %> + <%= l(:label_sponsor) %> + <%= l(:label_rights_reserved)%> + <%= l(:label_contact_us) %> + <%= l(:label_license) %>

<% else %> <%= @organizer.description.html_safe %> @@ -22,11 +22,11 @@