diff --git a/ReadMe.txt b/ReadMe.txt index 722b4cd37..b5822682b 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -70,3 +70,8 @@ kw: undefined image_width bundle exec rake db:migrate:down version=20140725062302 bundle exec rake db:migrate:up version=20140725062302 + +=================================[2014-07-19]===================================== +kw: Mysql2::Error,洢,CALL sp_project_status_cursor(); +bundle exec rake db:migrate:down version=20130828004955 +bundle exec rake db:migrate:up version=20130828004955 diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 0af388c56..0a7f6f5fa 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -102,7 +102,14 @@ class AccountController < ApplicationController # User self-registration def register # @root_path="/home/pdl/redmine-2.3.2-0/apache2/" -# +# + @cache_identityy = params[:identity]||"" #身份 + @cache_no = params[:no]||"" #学号 + @cache_technical_title = params[:technical_title]||"" #教师职称 + @cache_province = params[:province]||"" #省份 + @cache_city = params[:city]||"" #城市 + @cache_enterprise_name = params[:enterprise_name]||"" #企业 + (redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration] if request.get? session[:auth_source_registration] = nil @@ -112,8 +119,8 @@ class AccountController < ApplicationController @user = User.new @user.safe_attributes = user_params if params[:identity] == "2" # 2 企业 - @user.firstname = params[:enterprise_name] - @user.lastname = l(:field_enterprise) + #@user.firstname = params[:enterprise_name] + #@user.lastname = l(:field_enterprise) end @user.admin = false @user.register diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb index e1ec7a799..9611a9621 100644 --- a/app/controllers/activities_controller.rb +++ b/app/controllers/activities_controller.rb @@ -20,7 +20,7 @@ class ActivitiesController < ApplicationController before_filter :find_optional_project, :index accept_rss_auth :index helper :Watchers - + helper :project_score def index @days = Setting.activity_days_default.to_i diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c4b72f584..f47ba446e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -525,7 +525,7 @@ class ApplicationController < ActionController::Base # # @return [boolean, string] name of the layout to use or false for no layout def use_layout - request.xhr? ? false : 'base' + request.xhr? ? false : 'users_base' end def invalid_authenticity_token diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 49ee47327..be27a71ea 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -29,6 +29,7 @@ class BidsController < ApplicationController helper :projects helper :words helper :welcome + helper :project_score def find_project_by_bid_id @bid = Bid.find(params[:id]) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 40674b53f..72e134fbf 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -26,6 +26,7 @@ class BoardsController < ApplicationController helper :sort include SortHelper helper :watchers + helper :project_score def index #modify by nwb diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index 2b6797b4f..167fa124a 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -27,6 +27,7 @@ class CalendarsController < ApplicationController include QueriesHelper helper :sort include SortHelper + helper :project_score def show if params[:year] and params[:year].to_i > 1900 diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 85dfba8cf..6989b0b4f 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -624,7 +624,9 @@ class CoursesController < ApplicationController "show_course_journals_for_messages" => true } @date_to ||= Date.today + 1 - @date_from = @date_to - @days-1.years + # + @date_from = (@date_to - @days) > @course.created_at.to_date ? (@date_to - @days) : @course.created_at.to_date + #@date_from = @date_to - @days-1.years @author = (params[:user_id].blank? ? nil : User.active.find(params[:user_id])) # 决定显示所用用户或单个用户活动 @activity = Redmine::Activity::Fetcher.new(User.current, :course => @course, diff --git a/app/controllers/documents_controller.rb b/app/controllers/documents_controller.rb index 2b92c32bb..721ae07ce 100644 --- a/app/controllers/documents_controller.rb +++ b/app/controllers/documents_controller.rb @@ -26,6 +26,7 @@ class DocumentsController < ApplicationController before_filter :authorize_document helper :attachments + helper :project_score def index @sort_by = %w(category date title author).include?(params[:sort_by]) ? params[:sort_by] : 'category' diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index a8ba3d426..c80ce6d69 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -24,6 +24,7 @@ class FilesController < ApplicationController helper :sort include SortHelper + helper :project_score def index #sort_init 'filename', 'asc' @@ -40,7 +41,32 @@ class FilesController < ApplicationController render :layout => !request.xhr? elsif params[:course_id] @isproject = false - @containers = [ Course.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@course.id)] + + if params[:sort] + if params[:sort].include?":" + @orderBy = params[:sort].split(":")[0] + @orderType = params[:sort].split(":")[1].split(",")[0] + else + @orderBy = params[:sort].split(",")[0] + @orderType = "asc" + end + end + + if @orderBy=="size" + @orderBy="filesize" + elsif @orderBy=="field_file_dense" + @orderBy="is_public" + elsif @orderBy=="attach_type" + @orderBy="attachtype" + elsif @orderBy=="content_type" + @orderBy="attachtype" + end + + if @orderBy + @containers = [ Course.includes(:attachments).reorder("#{Attachment.table_name}.#{@orderBy} #{@orderType}").find(@course.id)] + else + @containers = [ Course.includes(:attachments).reorder("#{Attachment.table_name}.created_on desc").find(@course.id)] + end render :layout => 'base_courses' end end diff --git a/app/controllers/gantts_controller.rb b/app/controllers/gantts_controller.rb index e404ed425..ee132ac29 100644 --- a/app/controllers/gantts_controller.rb +++ b/app/controllers/gantts_controller.rb @@ -29,6 +29,7 @@ class GanttsController < ApplicationController helper :sort include SortHelper include Redmine::Export::PDF + helper :project_score def show @gantt = Redmine::Helpers::Gantt.new(params) diff --git a/app/controllers/git_usage_controller.rb b/app/controllers/git_usage_controller.rb index 69b0c7f55..4f9a96d6f 100644 --- a/app/controllers/git_usage_controller.rb +++ b/app/controllers/git_usage_controller.rb @@ -1,5 +1,6 @@ #added by baiyu class GitUsageController < ApplicationController + layout "project_base" def ch_usage end diff --git a/app/controllers/issue_categories_controller.rb b/app/controllers/issue_categories_controller.rb index 3bc0ff245..472514cb9 100644 --- a/app/controllers/issue_categories_controller.rb +++ b/app/controllers/issue_categories_controller.rb @@ -26,6 +26,8 @@ class IssueCategoriesController < ApplicationController before_filter :authorize accept_api_auth :index, :show, :create, :update, :destroy + helper :project_score + def index respond_to do |format| format.html { redirect_to_settings_in_projects } diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index edff1888b..9d734db37 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -52,6 +52,7 @@ class IssuesController < ApplicationController include IssuesHelper helper :timelog include Redmine::Export::PDF + helper :project_score def index retrieve_query diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb index 62f860a96..1e537ff75 100644 --- a/app/controllers/memos_controller.rb +++ b/app/controllers/memos_controller.rb @@ -9,6 +9,7 @@ class MemosController < ApplicationController helper :attachments include AttachmentsHelper + include ApplicationHelper layout 'base_memos' @@ -19,6 +20,11 @@ class MemosController < ApplicationController @content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)}
  " @content << @memo.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "\n\n
" @content = "
" << @content + #@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> " + #@content << @memo.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" + #@content_html = textilizable(@content) + @temp = Memo.new + @temp.content = @content end def new @@ -34,12 +40,23 @@ class MemosController < ApplicationController end def create + + if params[:quote].nil? + @quote = "" + else + @quote = params[:quote] + end + + #unless params[:quote].nil? + # @quote = params[:quote][:quote] + #end + @memo = Memo.new(params[:memo]) @memo.forum_id = params[:forum_id] @memo.author_id = User.current.id @memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads])) - + @memo.content = @quote + @memo.content respond_to do |format| if @memo.save format.html { redirect_to back_memo_url, notice: "#{l :label_memo_create_succ}" } @@ -67,7 +84,7 @@ class MemosController < ApplicationController @reply_pages = Paginator.new @reply_count, pre_count, page @replies = @memo.children. includes(:author, :attachments). - reorder("#{Memo.table_name}.created_at ASC"). + reorder("#{Memo.table_name}.created_at DESC"). limit(@reply_pages.per_page). offset(@reply_pages.offset). all diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index b364440c9..e840664b4 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class MessagesController < ApplicationController + include ApplicationHelper menu_item :boards default_search_scope :messages before_filter :find_board, :only => [:new, :preview,:edit] @@ -27,6 +28,7 @@ class MessagesController < ApplicationController helper :watchers helper :attachments include AttachmentsHelper + helper :project_score REPLIES_PER_PAGE = 25 unless const_defined?(:REPLIES_PER_PAGE) @@ -80,10 +82,12 @@ class MessagesController < ApplicationController if params[:reply][:content] == "" (redirect_to board_message_path(@board, @topic, :r => @reply), :notice => l(:label_reply_empty);return) end + @quote = params[:quote][:quote] @reply = Message.new @reply.author = User.current @reply.board = @board @reply.safe_attributes = params[:reply] + @reply.content = @quote + @reply.content @topic.children << @reply #@topic.update_attribute(:updated_on, Time.now) if !@reply.new_record? @@ -143,8 +147,18 @@ class MessagesController < ApplicationController @subject = @message.subject @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:') - @content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " - @content << @message.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" + #@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " + #@temp = Message.new + ##@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> " + #@content << @message.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" + #@content_html = textilizable(@content) + #@temp.content = @content_html + @content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}
  " + @content << @message.content.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "
\n\n
" + @content = "
" << @content + @temp = Message.new + @temp.content = @content + end def preview diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 650f65555..9437889b2 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -29,6 +29,7 @@ class NewsController < ApplicationController helper :watchers helper :attachments + helper :project_score def index case params[:format] diff --git a/app/controllers/notificationcomments_controller.rb b/app/controllers/notificationcomments_controller.rb index 80500ab10..43cad6cbb 100644 --- a/app/controllers/notificationcomments_controller.rb +++ b/app/controllers/notificationcomments_controller.rb @@ -1,4 +1,7 @@ class NotificationcommentsController < ApplicationController + def show + + end # default_search_scope :contestnotifications # model_object Contestnotifications # before_filter :authorize @@ -20,8 +23,14 @@ class NotificationcommentsController < ApplicationController end def destroy - @contestnotifications.notificaioncomments.find(params[:notificaioncomment_id]).destroy - redirect_to contest_contestnotification_path(@contestnotifications) + @contest = Contest.find(params[:contest_id]) + @contestnotification = Contestnotification.find(params[:contestnotification_id]) + notificaioncomments = Notificationcomment.find(params[:id]) + notificaioncomments.destroy if notificaioncomments + #@contestnotifications = notificaioncomments.Contestnotification + #@contest = @contestnotifications.contest + #@contestnotifications.notificaioncomments.find(params[:notificaioncomment_id]).destroy + redirect_to contest_contestnotification_path(@contest,@contestnotification) end end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index b46bff2ff..447c1425f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -75,6 +75,7 @@ class ProjectsController < ApplicationController helper :watchers # helper :watcherlist helper :words + helper :project_score ### added by william include ActsAsTaggableOn::TagsHelper @@ -481,10 +482,10 @@ class ProjectsController < ApplicationController project_info = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id) user_grades = UserGrade.create(:user_id => User.current.id, :project_id => @project.id) Rails.logger.debug "UserGrade created: #{user_grades.to_json}" - if params[:project][:is_public] == '1' - project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :project_type => @project.project_type) + #if params[:project][:is_public] == '1' + project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :project_type => @project.project_type,:grade => 0) Rails.logger.debug "ProjectStatus created: #{project_status.to_json}" - end + #end @project.members << m @project.project_infos << project_info #end diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 7588eef21..ef4c9b061 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -39,6 +39,7 @@ class RepositoriesController < ApplicationController before_filter :check_hidden_repo, :only => [:show, :stats, :revisions, :revision, :diff ] helper :repositories include RepositoriesHelper + helper :project_score #@root_path = RepositoriesHelper::ROOT_PATH @@ -205,6 +206,14 @@ class RepositoriesController < ApplicationController @repository.committer_ids = params[:committers].values.inject({}) {|h, c| h[c.first] = c.last; h} flash[:notice] = l(:notice_successful_update) redirect_to settings_project_path(@project, :tab => 'repositories') + elsif request.get? + respond_to do |format| + format.html{ + render :layout => "project_base" + } + end + + end end @@ -412,7 +421,10 @@ class RepositoriesController < ApplicationController Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}") unless read_fragment(@cache_key) @diff = @repository.diff(@path, @rev, @rev_to) - show_error_not_found unless @diff + unless @diff + show_error_not_found + return + end end @changeset = @repository.find_changeset_by_name(@rev) diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index f2b0a0c83..067465b40 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -156,8 +156,8 @@ class SoftapplicationsController < ApplicationController format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]), notice: l(:notice_attendingcontest_work_successfully_created) } # format.json { render json: @softapplication, status: :created, location: @softapplication } else - format.js { render status: 406 } - format.html { render action: "new" } + #format.js { render status: 406 } + format.html { render action: "contests/show_attendingcontest" } # format.json { render json: @softapplication.errors, status: :unprocessable_entity } end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 7220f3ccb..cba7784bc 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -41,7 +41,7 @@ class UsersController < ApplicationController :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index, :activity_new_score_index, :influence_new_score_index, :score_new_index] before_filter :auth_user_extension, only: :show - #before_filter :rest_user_score, only: :show + before_filter :rest_user_score, only: :show accept_api_auth :index, :show, :create, :update, :destroy,:tag_save , :tag_saveEx #william @@ -794,7 +794,9 @@ class UsersController < ApplicationController praise_num(@user) changeset_num(@user) document_num(@user) - + attachment_num(@user) + issue_done_ratio_num(@user) + post_issue_num(@user) end #验证是否显示课程 diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 0bbbd1bd6..3641e0c61 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -29,6 +29,7 @@ class VersionsController < ApplicationController helper :custom_fields helper :projects + helper :project_score def index respond_to do |format| diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index c7cbf217d..4a0586c95 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -18,7 +18,7 @@ class WelcomeController < ApplicationController include ApplicationHelper include WelcomeHelper - + helper :project_score caches_action :robots # before_filter :fake, :only => [:index, :course] before_filter :entry_select, :only => [:index] diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 65f58da00..39b3b1753 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -44,6 +44,7 @@ class WikiController < ApplicationController include AttachmentsHelper helper :watchers include Redmine::Export::PDF + helper :project_score # List of pages, sorted alphabetically and by parent (hierarchy) def index diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 84aff1c25..aad350d22 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -98,11 +98,11 @@ module CoursesHelper end - alias teacherCountOrigin teacherCount - def teacherCount project - count = teacherCountOrigin project - garble count - end + #alias teacherCountOrigin teacherCount + #def teacherCount project + # count = teacherCountOrigin project + # garble count + #end # 注意:此方法有问题,速度慢且结果不准 # alias studentCountOrigin studentCount @@ -114,7 +114,7 @@ module CoursesHelper # 学生人数计算 # add by nwb def studentCount course - count = course.student.count + count = searchStudent(course).count#course.student.count if count <= 5 result = count.to_s elsif count < 10 && count > 5 @@ -125,6 +125,19 @@ module CoursesHelper result end + #课程成员数计算 + def memberCount course + count = searchStudent(course).count + searchTeacherAndAssistant(course).count + if count <= 5 + result = count.to_s + elsif count < 10 && count > 5 + result = "5+" + else + result = (count-count % 10).to_s + "+" + end + result + end + def eventToLanguageCourse event_type, course case event_type when "issue-note" diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 134b7c007..ecfb097e9 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -53,10 +53,13 @@ module MembersHelper # 当前申请加入的成员名单 def render_principals_for_applied_members(project) - scope = Principal.active.sorted.applied_members(project).like(params[:q]) + scope = project.applied_projects.map(&:user) principal_count = scope.count principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page'] - principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all + offset ||= principal_pages.offset + principals = scope[offset, 10] + #principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all + #principals = ApplicationController.new.paginateHelper scope,10 s = content_tag('div', principals_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals') diff --git a/app/helpers/project_score_helper.rb b/app/helpers/project_score_helper.rb new file mode 100644 index 000000000..6cf7e7767 --- /dev/null +++ b/app/helpers/project_score_helper.rb @@ -0,0 +1,90 @@ +# encoding: utf-8 +module ProjectScoreHelper + #缺陷数量 + def issue_num project + project.issues.count + end + + #缺陷留言数量 + def issue_journal_num project + project.issue_changes.count + end + + #新闻数量 + def news_num project + project.news.count + end + + #文档数量 + def document_num project + project.documents.count + end + + #代码提交数量 + def changesets_num project + project.changesets.count + end + + #讨论区帖子数量 + def board_message_num project + board_message_count = 0 + project.boards.each do |board| + board_message_count += board.messages_count + end + board_message_count + end + + #缺陷得分 + def issue_score project + i_num = issue_num project + i_j_num = issue_journal_num project + i_num * 4 + i_j_num + end + + # 新闻得分 + def news_score project + n_num = news_num project + n_num + end + + #文档得分 + def document_score project + d_num = document_num project + d_num * 4 + end + + #代码提交得分 + def changesets_score project + c_num = changesets_num project + c_num * 4 + end + + #讨论区帖子得分 + def board_message_score project + b_m_num = board_message_num project + b_m_num * 2 + end + + #项目得分 + def project_scores project + result = (issue_score project) + (news_score project) + (document_score project) + (changesets_score project) + (board_message_score project) + pss = ProjectStatus.where("project_id = '#{project.id}'") + if pss.nil? || pss.count == 0 + ps = ProjectStatus.new + ps.grade = result + ps.project = project + ps.watchers_count = project.watcher_users.count + ps.changesets_count = project.changesets.count + ps.save + else + ps = pss.first + ps.grade = result + if ps.changesets_count.nil? || ps.changesets_count == "" + ps.changesets_count = project.changesets.count + end + ps.save + end + result + end + +end \ No newline at end of file diff --git a/app/helpers/user_score_helper.rb b/app/helpers/user_score_helper.rb index ba055ddf4..8c00a6b23 100644 --- a/app/helpers/user_score_helper.rb +++ b/app/helpers/user_score_helper.rb @@ -337,12 +337,15 @@ module UserScoreHelper :activity => activity, :file => file, :issue => issue, :level => level) end - #==================================================================================================== - def get_option_number(user,type,project_id=nil) - if project_id.nil? + #======================================================================================================== + #个人得分统计 + #======================================================================================================== + #type 1:个人得分、2:个人在项目project中的得分 + def get_option_number(user,type,project=nil) + if project.nil? option_number = OptionNumber.where("user_id = '#{user.id}' and score_type = '#{type}'"); else - option_number = OptionNumber.where("user_id = '#{user.id}' and score_type = '#{type}' and project_id = '#{project_id}'"); + option_number = OptionNumber.where("user_id = '#{user.id}' and score_type = '#{type}' and project_id = '#{project.id}'"); end result = nil @@ -382,6 +385,7 @@ module UserScoreHelper def update_score(option_number) option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number) + active(option_number) option_number.save + option_number.total_score end #协同得分 @@ -402,16 +406,16 @@ module UserScoreHelper end #更新发帖数 - def update_memo_number(user,type) - option_number = get_option_number(user,type) - option_number.memo = Message.includes(:author).where("parent_id IS NULL and author_id = '#{user.id}'").all.count + Memo.includes(:author).where("parent_id IS NULL and author_id = '#{user.id}'").all.count + def update_memo_number(user,type,project=nil) + option_number = get_option_number(user,type,project) + option_number.memo = memo_num(user,project)#Message.includes(:author).where("parent_id IS NULL and author_id = '#{user.id}'").all.count + Memo.includes(:author).where("parent_id IS NULL and author_id = '#{user.id}'").all.count update_score(option_number) end #发帖数 def memo_num(user,project=nil) if project.nil? - Message.includes(:author).joins(:board).where("#{Message.table_name}.parent_id IS NULL and #{Message.table_name}.author_id = '#{user.id}' and #{Board.table_name}.project_id != -1").all.count + Message.includes(:author).joins(:board).where("#{Message.table_name}.parent_id IS NULL and #{Message.table_name}.author_id = '#{user.id}' and #{Board.table_name}.project_id != -1").all.count #+ Memo.includes(:author).where("parent_id IS NULL and author_id = '#{user.id}'").all.count else Message.includes(:author).joins(:board).where("#{Message.table_name}.parent_id IS NULL and #{Message.table_name}.author_id = '#{user.id}' and #{Board.table_name}.project_id = #{project.id}").all.count end @@ -419,9 +423,9 @@ module UserScoreHelper end #更新对缺陷留言数 - def update_messges_for_issue(user,type) + def update_messges_for_issue(user,type,project=nil) option_number = get_option_number(user,type) - option_number.messages_for_issues = Journal.includes(:user).where("user_id = '#{user.id}' and notes != '' and notes is not null").all.count + option_number.messages_for_issues = messges_for_issue_num(user,project)#Journal.includes(:user).where("user_id = '#{user.id}' and notes != '' and notes is not null").all.count update_score(option_number) end @@ -434,9 +438,9 @@ module UserScoreHelper end #更新更改缺陷状态状态次数 - def update_issues_status(user,type) + def update_issues_status(user,type,project=nil) option_number = get_option_number(user,type) - option_number.issues_status = Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'status_id' and #{User.table_name}.id = '#{user.id}'").count + option_number.issues_status = issues_status_num(user,project)#Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'status_id' and #{User.table_name}.id = '#{user.id}'").count update_score(option_number) end @@ -450,26 +454,31 @@ module UserScoreHelper end #更新对留言的回复数量 - def update_replay_for_message(user,type) + def update_replay_for_message(user,type,project=nil) option_number = get_option_number(user,type) - option_number.replay_for_message = JournalsForMessage.includes(:user).where("m_parent_id IS NOT NULL and user_id = #{user.id}").count + option_number.replay_for_message = replay_for_message_num(user,project)#JournalsForMessage.includes(:user).where("m_parent_id IS NOT NULL and user_id = #{user.id}").count update_score(option_number) end - def replay_for_message_num(user) - JournalsForMessage.includes(:user).where("m_parent_id IS NOT NULL and user_id = #{user.id}").count + def replay_for_message_num(user,project=nil) + if project.nil? + JournalsForMessage.includes(:user).where("m_parent_id IS NOT NULL and user_id = #{user.id} and jour_type = 'Project'").count + else + JournalsForMessage.includes(:user).where("m_parent_id IS NOT NULL and user_id = #{user.id} and jour_type = 'Project' and jour_id = '#{project.id}'").count + end + end #更新对帖子的回复数量 - def update_replay_for_memo(user,type) + def update_replay_for_memo(user,type,project=nil) option_number = get_option_number(user,type) - option_number.replay_for_memo = Message.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count #+ Memo.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count + option_number.replay_for_memo = replay_for_memo_num(user,project)#Message.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count #+ Memo.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count update_score(option_number) end def replay_for_memo_num(user,project=nil) if project.nil? - Message.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count + Message.includes(:author).joins(:board).where("#{Message.table_name}.parent_id IS NOT NULL and #{Message.table_name}.author_id = '#{user.id}' and #{Board.table_name}.project_id != -1").all.count else Message.includes(:author).joins(:board).where("#{Message.table_name}.parent_id IS NOT NULL and #{Message.table_name}.author_id = '#{user.id}' and #{Board.table_name}.project_id = #{project.id}").all.count end @@ -487,32 +496,13 @@ module UserScoreHelper end #更新帖子踩各项数量 - def update_tread(user,type) + def update_tread(user,type,project=nil) option_number = get_option_number(user,type) - option_number.tread = PraiseTread.where("praise_tread_object_type = 'Issue' || praise_tread_object_type = 'Message' and praise_or_tread = 0 and user_id = '#{user.id}'").all.count - pts = PraiseTread.where("praise_tread_object_type = 'Issue' || praise_tread_object_type = 'Message' and praise_or_tread = 0").all - result = [] - result1 = [] - result2 = [] - pts.each do |pt| - obj = PraiseTread.find_object_by_type_and_id(pt.praise_tread_object_type, pt.praise_tread_object_id) - if obj.nil? - next - end - target_user = obj.author - level = UserLevels.get_level(pt.user)#pt.user.get_level - project = pt.project - if level == 1 && target_user.id = user.id - result << pt - elsif level == 2 && target_user.id = user.id - result1 << pt - elsif level == 3 && target_user.id = user.id - result2 << pt - end - end - option_number.tread_by_one = result.count - option_number.tread_by_two = result1.count - option_number.tread_by_three = result2.count + tread_nums = tread_num(user,project) + option_number.tread = tread_nums[:tread] + option_number.tread_by_one = tread_nums[:tead_by_one] + option_number.tread_by_two = tread_nums[:tread_by_two] + option_number.tread_by_three = tread_nums[:tread_by_three] update_score(option_number) end @@ -571,36 +561,17 @@ module UserScoreHelper end #更新帖子顶数量 - def update_praise(user,type) + def update_praise(user,type,project=nil) option_number = get_option_number(user,type) - pts = PraiseTread.where("praise_tread_object_type = 'Issue' || praise_tread_object_type = 'Message' and praise_or_tread = 1").all - result = [] - result1 = [] - result2 = [] - pts.each do |pt| - obj = PraiseTread.find_object_by_type_and_id(pt.praise_tread_object_type, pt.praise_tread_object_id) - if obj.nil? - next - end - target_user = obj.author - level = UserLevels.get_level(pt.user)#pt.user.get_level - project = pt.project - if level == 1 && target_user.id = user.id - result << pt - elsif level == 2 && target_user.id = user.id - result1 << pt - elsif level == 3 && target_user.id = user.id - result2 << pt - end - end - option_number.praise_by_one = result.count - option_number.praise_by_two = result1.count - option_number.praise_by_three = result2.count + praise_nums = praise_num(user,project) + option_number.praise_by_one = praise_nums[:praise_by_one] + option_number.praise_by_two = praise_nums[:praise_by_two] + option_number.praise_by_three = praise_nums[:praise_by_three] update_score(option_number) end def praise_num(user,project=nil) - if project.nil? + if !project.nil? pts = PraiseTread.where("praise_tread_object_type = 'Issue' || praise_tread_object_type = 'Message' and praise_or_tread = 1").all result = [] result1 = [] @@ -635,6 +606,9 @@ module UserScoreHelper if obj.nil? next end + #if obj.project.id == -1 + # next + #end target_user = obj.author level = UserLevels.get_level(pt.user)#pt.user.get_level project = pt.project @@ -652,9 +626,9 @@ module UserScoreHelper end #更新提交代码次数 - def update_changeset(user,type) + def update_changeset(user,type,project=nil) option_number = get_option_number(user,type) - option_number.changeset = Changeset.includes(:user).where("user_id = '#{user.id}'").all.count + option_number.changeset = changeset_num(user,project)#Changeset.includes(:user).where("user_id = '#{user.id}'").all.count update_score(option_number) end @@ -668,13 +642,13 @@ module UserScoreHelper end #更新文档提交次数 - def update_document(user,type) + def update_document(user,type,project=nil) option_number = get_option_number(user,type) - option_number.document = Document.includes(:user).where("user_id = '#{user.id}'").all.count + option_number.document = document_num(user,project)#Document.includes(:user).where("user_id = '#{user.id}'").all.count update_score(option_number) end - def document_num(user,project=nil?) + def document_num(user,project=nil) if project.nil? Document.includes(:user).where("user_id = '#{user.id}'").all.count else @@ -684,40 +658,66 @@ module UserScoreHelper end #更新附件提交数量 - def update_attachment(user,type) + def update_attachment(user,type,project=nil) option_number = get_option_number(user,type) - option_number.attachment = Attachment.includes(:author).where("author_id = '#{user.id}'").all.count + option_number.attachment = attachment_num(user,project)#Attachment.includes(:author).where("author_id = '#{user.id}'").all.count update_score(option_number) end - #===================here to continue============================ + def attachment_num(user,project=nil) if project.nil? - Attachment.includes(:author).where("author_id = '#{user.id}'").all.count + Attachment.includes(:author,:container).where("author_id = '#{user.id}' and container_type = 'Project'").all.count else Attachment.includes(:author,:container).where("author_id = '#{user.id}' and container_type = 'Project' and container_id = #{project.id}").all.count end - end #更新缺陷完成度次数 - def update_issue_done_ratio(user,type) + def update_issue_done_ratio(user,type,project=nil) option_number = get_option_number(user,type) - option_number.issue_done_ratio = Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count + option_number.issue_done_ratio = issue_done_ratio_num(user,project) #Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count update_score(option_number) end - def issue_done_ratio_num(user,project) - Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count + def issue_done_ratio_num(user,project=nil) + if project.nil? + Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count + else + Journal.joins(:issue,:details,:user).where("#{Issue.table_name}.project_id = '#{project.id}' and #{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count + end + end #更新发布缺陷次数 - def update_post_issue(user,type) + def update_post_issue(user,type,project=nil) option_number = get_option_number(user,type) - option_number.post_issue = Issue.includes(:author).where("author_id = '#{user.id}'").all.count + option_number.post_issue = post_issue_num(user,project) #Issue.includes(:author).where("author_id = '#{user.id}'").all.count update_score(option_number) end def post_issue_num(user,project=nil) - Issue.includes(:author).where("author_id = '#{user.id}'").all.count + if project.nil? + Issue.includes(:author).where("author_id = '#{user.id}'").all.count + else + Issue.includes(:author).where("author_id = '#{user.id}' and project_id = '#{project.id}'").all.count + end + end + + def user_scores(user,type,project=nil) + ooption_num = get_option_number(user,type,project) + update_memo_number(user,type,project) + update_messges_for_issue(user,type,project) + update_issues_status(user,type,project) + update_replay_for_message(user,type,project) + update_replay_for_memo(user,type,project) + update_tread(user,type,project) + update_praise(user,type,project) + update_changeset(user,type,project) + update_document(user,type,project) + update_attachment(user,type,project) + update_issue_done_ratio(user,type,project) + update_post_issue(user,type,project) + update_score(ooption_num) + ooption_num end end diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 85f36fc5f..67e46eb5e 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -193,7 +193,7 @@ class Attachment < ActiveRecord::Base def show_suffix_type suffix = 'other' temp = self.suffix_type.downcase - if self.attachmentstype.suffixArr.include?(temp) + if self.attachmentstype && self.attachmentstype.suffixArr.include?(temp) suffix = temp end suffix diff --git a/app/models/notificationcomment.rb b/app/models/notificationcomment.rb index 9cc658f22..ce4227a00 100644 --- a/app/models/notificationcomment.rb +++ b/app/models/notificationcomment.rb @@ -4,6 +4,7 @@ class Notificationcomment < ActiveRecord::Base include Redmine::SafeAttributes belongs_to :notificationcommented, :polymorphic => true#, :counter_cache => true belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' + belongs_to :Contestnotification validates_presence_of :notificationcommented, :author, :notificationcomments diff --git a/app/models/project_status.rb b/app/models/project_status.rb index 09200e36a..c3d306c58 100644 --- a/app/models/project_status.rb +++ b/app/models/project_status.rb @@ -1,5 +1,5 @@ class ProjectStatus < ActiveRecord::Base - attr_accessible :changesets_count, :watchers_count, :project_id, :project_type + attr_accessible :changesets_count, :watchers_count, :project_id, :project_type,:grade belongs_to :project belongs_to :watchers belongs_to :changesets diff --git a/app/models/softapplication.rb b/app/models/softapplication.rb index a572a22ba..0234bc118 100644 --- a/app/models/softapplication.rb +++ b/app/models/softapplication.rb @@ -11,7 +11,7 @@ class Softapplication < ActiveRecord::Base belongs_to :project has_many :contests, :through => :contesting_softapplications - validates_length_of :name, :maximum => 125 + validates_length_of :name, :maximum => 25 validates_length_of :application_developers, :maximum => 125 validates_length_of :android_min_version_available, :maximum => 125 diff --git a/app/models/user.rb b/app/models/user.rb index 195346e7c..78bfc75f0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -174,6 +174,7 @@ class User < Principal validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\z/i validates_length_of :login, :maximum => LOGIN_LENGTH_LIMIT validates_length_of :firstname, :maximum => 30 + validates_length_of :lastname, :maximum => 30 validates_format_of :mail, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :allow_blank => true validates_length_of :mail, :maximum => MAIL_LENGTH_LIMIT, :allow_nil => true validates_confirmation_of :password, :allow_nil => true @@ -324,7 +325,7 @@ class User < Principal # Returns the user that matches provided login and password, or nil #登录,返回用户名与密码匹配的用户 def self.try_to_login(login, password) - login = login.to_s + login = login.to_s.lstrip.rstrip password = password.to_s # Make sure no one can sign in with an empty login or password diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 260d53744..21c8c11b9 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -193,7 +193,40 @@ diff --git a/app/views/admin/users.html.erb b/app/views/admin/users.html.erb index 41df178d8..834c9f6c2 100644 --- a/app/views/admin/users.html.erb +++ b/app/views/admin/users.html.erb @@ -26,9 +26,9 @@  
- +
- + <%= sort_header_tag('login', :caption => l(:field_login)) %> <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %> <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %> @@ -40,16 +40,25 @@ + + + + + + + + + <% for user in @users -%> "> - - - - - - - + + + + + + + diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index b237c7d25..06bf45012 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -12,8 +12,16 @@ <% end %> <% end %> + -<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %> +<%= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> <%= file_field_tag 'attachments[dummy][file]', :id => '_file', diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 2009d1252..6797bc9eb 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -8,7 +8,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) %> <%= 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 %>
@@ -106,7 +106,7 @@ + + +
<%= l(:label_task_plural)%>(<%= @homework_list.count%>) - <%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %> + <%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %> 项目得分:  ;"> - <%= homework.project.nil? ? "N/A" : project_score(homework.project) %> + <%= homework.project.nil? ? "N/A" : project_scores(homework.project) %> 提交文件:  <% if is_evaluation || is_teacher%> - <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework, :remote => true%> + <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%> <% else %> 未开启互评功能作业不允许下载 <% end %> diff --git a/app/views/contestnotifications/show.html.erb b/app/views/contestnotifications/show.html.erb index eea4cc204..b6ac88008 100644 --- a/app/views/contestnotifications/show.html.erb +++ b/app/views/contestnotifications/show.html.erb @@ -69,7 +69,21 @@ - + + @@ -43,7 +43,7 @@ diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index f4857bd22..e44578243 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -1,63 +1,80 @@ -<%= labelled_fields_for :issue, @issue do |f| %> - - - -<% if @issue.safe_attribute? 'custom_field_values' %> -<%= render :partial => 'issues/form_custom_fields' %> -<% end %> - -<% end %> - -<% include_calendar_headers_tags %> +<%= labelled_fields_for :issue, @issue do |f| %> + + + +<% if @issue.safe_attribute? 'custom_field_values' %> +<%= render :partial => 'issues/form_custom_fields' %> +<% end %> + +<% end %> + +<% include_calendar_headers_tags %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index fa20bdff6..004aabc51 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -1,3 +1,4 @@ + <% @nav_dispaly_project_label = 1 @nav_dispaly_forum_label = 1 %> <% #@nav_dispaly_project_label = 1 %> @@ -62,37 +63,10 @@ <%= link_to @project.name, project_path(@project)%>
- - <% issue_count = @project.issues.count %> - <% issue_journal_count = @project.issue_changes.count %> - <% issue_score = issue_count * 0.2 %> - <% issue_journal_score = issue_journal_count * 0.1 %> - <% finall_issue_score = issue_score + issue_journal_score %> - - <% new_count = @project.news.count %> - <% new_score = new_count * 0.1 %> - <% finall_new_score = new_score %> - - <% document_count = @project.documents.count %> - <% file_score = document_count * 0.1 %> - <% finall_file_score = file_score %> - - <% changeset_count = @project.changesets.count %> - <% code_submit_score = changeset_count * 0.3 %> - <% finall_code_submit_score = code_submit_score %> - - <% board_message_count = 0 %> - <% @project.boards.each do |board| %> - <% board_message_count += board.messages_count %> - <% end %> - <% topic_score = board_message_count * 0.1 %> - <% finall_topic_score = topic_score %> - - <% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %> <% if @project.project_type == 0 %> <%= l(:label_project_grade)%> : - <%= link_to(format("%.2f" , finall_project_score ).to_f, {:controller => 'projects', + <%= link_to(format("%.2f" , project_scores(@project) ).to_i, {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id diff --git a/app/views/memos/_reply_box.html.erb b/app/views/memos/_reply_box.html.erb index e0c6acf13..9dddf5be4 100644 --- a/app/views/memos/_reply_box.html.erb +++ b/app/views/memos/_reply_box.html.erb @@ -2,6 +2,9 @@ <%= f.hidden_field :subject, :required => true, value: @memo.subject %> <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> <%= f.hidden_field :parent_id, :required => true, value: @memo.id %> +
+ + <%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %> <%= label_tag(l(:label_reply_plural)) %>: <%= f.text_area :content, :cols => 80, :rows => 15, :class => 'wiki-edit', :id => 'editor01', :value => @content %>

diff --git a/app/views/memos/quote.js.erb b/app/views/memos/quote.js.erb index 73e36ee82..d2e8c1d17 100644 --- a/app/views/memos/quote.js.erb +++ b/app/views/memos/quote.js.erb @@ -1,2 +1,4 @@ -ckeditor.setData("<%= raw escape_javascript(@content) %>"); +//ckeditor.setData("<%= raw escape_javascript(@content) %>"); +$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>"); +$('#quote').val("<%= raw escape_javascript(@content) %>"); showAndScrollTo("new_memo", "cke_editor01"); \ No newline at end of file diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 243406a3c..4db903b88 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -104,6 +104,8 @@
<%= textilizable(@topic, :content) %> <%= link_to_attachments @topic, :author => false %> + <%# options = {:author => true, :deletable => @topic.author.eql?(User.current)} %> + <%#= render :partial => 'attachments/app_link', :locals => {:attachments => @topi.attachments, :options => options} %>
<%= authoring @topic.created_on, @topic.author %>
diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb index c7c557f9a..4208d3061 100644 --- a/app/views/messages/_form.html.erb +++ b/app/views/messages/_form.html.erb @@ -32,7 +32,9 @@ <%= f.select :board_id, boards_options_for_select(@message.course.boards) %>

<% end %> <% end %> +
+ <%= text_area :quote,:quote,:style => 'display:none' %>

<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %> <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %>

diff --git a/app/views/messages/quote.js.erb b/app/views/messages/quote.js.erb index fe4bed91a..f8ec37d75 100644 --- a/app/views/messages/quote.js.erb +++ b/app/views/messages/quote.js.erb @@ -1,4 +1,7 @@ $('#message_subject').val("<%= raw escape_javascript(@subject) %>"); -$('#message_content').val("<%= raw escape_javascript(@content) %>"); +$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>"); +//$('#message_content').val("<#%= raw escape_javascript(@content) %>"); +$('#quote_quote').html("<%= raw escape_javascript(@content) %>"); + showAndScrollTo("reply", "message_content"); $('#message_content').scrollTop = $('#message_content').scrollHeight - $('#message_content').clientHeight; diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 3ed947cbf..6a937b376 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -82,7 +82,7 @@ diff --git a/app/views/projects/_code_submit_score_index.html.erb b/app/views/projects/_code_submit_score_index.html.erb index 238993afe..802779967 100644 --- a/app/views/projects/_code_submit_score_index.html.erb +++ b/app/views/projects/_code_submit_score_index.html.erb @@ -1,7 +1,4 @@ -<% changeset_count = @project.changesets.count %> -<% code_submit_score = changeset_count * 0.3 %> -<% finall_code_submit_score = code_submit_score %> -
<%= l(:label_code_submit_number) %> * 0.3 = <%= changeset_count %> * 0.3 = <%= format("%.2f" , code_submit_score).to_f %>
-
<%= l(:label_code_submit_score) %> = <%= format("%.2f" , finall_code_submit_score).to_f %>
+
<%= l(:label_code_submit_number) %> * 4 = <%= changesets_num(@project) %> * 4 = <%= format("%.2f" , changesets_score(@project)).to_i %>
+
<%= l(:label_code_submit_score) %> = <%= format("%.2f" , changesets_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_file_score_index.html.erb b/app/views/projects/_file_score_index.html.erb index 3b4810f65..ce80ddbd2 100644 --- a/app/views/projects/_file_score_index.html.erb +++ b/app/views/projects/_file_score_index.html.erb @@ -1,7 +1,4 @@ -<% document_count = @project.documents.count %> -<% file_score = document_count * 0.1 %> -<% finall_file_score = file_score %> -
<%= l(:label_file_number) %> * 0.1 = <%= document_count %> * 0.1 = <%= format("%.2f" , file_score).to_f %>
-
<%= l(:label_file_score) %> = <%= format("%.2f" , finall_file_score).to_f %>
+
<%= l(:label_file_number) %> * 4 = <%= document_num(@project) %> * 4 = <%= format("%.2f" , document_score(@project)).to_i %>
+
<%= l(:label_file_score) %> = <%= format("%.2f" , document_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 47a87f441..7c84bf84b 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -8,10 +8,13 @@

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;" %>

-

<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH %> + +

<%= f.text_field :identifier, :required => true, :size => 60, :style => "width:488px;", :disabled => @project.identifier_frozen?, :maxlength => Project::IDENTIFIER_MAX_LENGTH, + value:"#{User.current.id.to_s + '_' +format_time(Time.now).to_s}" %> <% unless @project.identifier_frozen? %> <%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %> <% end %>

+

<%= f.check_box :is_public, :style => "margin-left:10px;" %>

<%= f.check_box :hidden_repo, :style => "margin-left:10px;" %>

diff --git a/app/views/projects/_issue_score_index.html.erb b/app/views/projects/_issue_score_index.html.erb index 8ca3d240c..7353ce5a3 100644 --- a/app/views/projects/_issue_score_index.html.erb +++ b/app/views/projects/_issue_score_index.html.erb @@ -1,11 +1,6 @@ -<% issue_count = @project.issues.count %> -<% issue_journal_count = @project.issue_changes.count %> -<% issue_score = issue_count * 0.2 %> -<% issue_journal_score = issue_journal_count * 0.1 %> -<% finall_issue_score = issue_score + issue_journal_score %> -
<%= l(:label_issue_number) %> * 0.2 = <%= issue_count %> * 0.2 = <%= format("%.2f" , issue_score).to_f %>
-
<%= l(:label_issue_journal_number) %> * 0.1 = <%= issue_journal_count %> * 0.1 = <%= format("%.2f" , issue_journal_score).to_f %>
-
<%= l(:label_issue_score) %> = <%= format("%.2f" , issue_score).to_f %> + <%= format("%.2f" , issue_journal_score).to_f %> - = <%= format("%.2f" , finall_issue_score).to_f %>
+
<%= l(:label_issue_number) %> * 4 = <%= issue_num(@project) %> * 4 = <%= format("%.2f" , issue_num(@project) * 4).to_i %>
+
<%= l(:label_issue_journal_number) %> * 1 = <%= issue_journal_num(@project) %> * 1 = <%= format("%.2f" , issue_journal_num(@project)).to_i %>
+
<%= l(:label_issue_score) %> = <%= format("%.2f" , issue_num(@project) * 4).to_i %> + <%= format("%.2f" , issue_journal_num(@project)).to_i %> + = <%= format("%.2f" , issue_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_news_score_index.html.erb b/app/views/projects/_news_score_index.html.erb index 0f374b871..b3d66efeb 100644 --- a/app/views/projects/_news_score_index.html.erb +++ b/app/views/projects/_news_score_index.html.erb @@ -1,7 +1,5 @@ -<% new_count = @project.news.count %> -<% new_score = new_count * 0.1 %> -<% finall_new_score = new_score %> -
<%= l(:label_new_number) %> * 0.1 = <%= new_count %> * 0.1 = <%= format("%.2f" , new_score).to_f %>
-
<%= l(:label_news_score) %> = <%= format("%.2f" , finall_new_score).to_f %>
+ +
<%= l(:label_new_number) %> * 1 = <%= news_num(@project) %> * 1 = <%= format("%.2f" , news_score(@project)).to_i %>
+
<%= l(:label_news_score) %> = <%= format("%.2f" , news_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index 41ad2a62c..e9a733ece 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -18,37 +18,37 @@

-

<%= link_to_user(notificationcomment.author) if notificationcomment.respond_to?(:author) %> <%= l(:label_project_newadd) %><%= l(:label_comment_plural) %> + + <%= link_to_user(notificationcomment.author) if notificationcomment.respond_to?(:author) %> + + + <%= l(:label_project_newadd) %> + + <%= l(:label_comment_plural) %> + + <% if notificationcomment.author==User.current|| User.current.admin? %> + <%= link_to(l(:label_bid_respond_delete), contest_contestnotification_notificationcomment_path(@contest, @contestnotification,notificationcomment), + :method => :delete,:confirm => l(:text_are_you_sure), :title => l(:button_delete)) %> + <% end %> +
diff --git a/app/views/contests/_form_contest.html.erb b/app/views/contests/_form_contest.html.erb index 5dc824d28..79c531969 100644 --- a/app/views/contests/_form_contest.html.erb +++ b/app/views/contests/_form_contest.html.erb @@ -23,12 +23,12 @@

<%= l(:label_bids_form_contest_new_description) %>

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Contest::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %>

-

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %>

+

<%= f.text_area :description, :rows => 5, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %>

<%= f.text_field :password, :size => 60, :style => "width:488px;margin-left: 10px;" %>

- <%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %> + <%= f.text_area :budget, :required => true, :size => 60,:rows => 4,:maxlength => Contest::DESCRIPTION_LENGTH_LIMIT, :style => "width:490px;", :placeholder => l(:label_bids_reward_what) %>

diff --git a/app/views/courses/_course.html.erb b/app/views/courses/_course.html.erb index 8e1a7950d..ddf08c3fb 100644 --- a/app/views/courses/_course.html.erb +++ b/app/views/courses/_course.html.erb @@ -44,7 +44,7 @@

<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %> <%#= content_tag('span', l(:label_x_member, :count => @course.members.count)) %> - <%= content_tag('span', l(:label_x_member, :count => studentCount(@course)+teacherCount(@course))) %> + <%= content_tag('span', l(:label_x_member, :count => memberCount(@course))) %>

diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 8b713476e..deb590d1f 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -2,7 +2,7 @@

- <%= 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_from), :end => format_date(@date_to - 1)) %>

<% @events_by_day.keys.sort.reverse.each do |day| %> diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index b7740c951..2964a06ba 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -1,5 +1,5 @@
- +
<% if User.current.allowed_to?(:edit_documents, @project) %> <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %> diff --git a/app/views/files/_course_show_all_attachment.html.erb b/app/views/files/_course_show_all_attachment.html.erb index f94ddc20b..76112bc78 100644 --- a/app/views/files/_course_show_all_attachment.html.erb +++ b/app/views/files/_course_show_all_attachment.html.erb @@ -21,7 +21,7 @@ <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %> - +
<%= number_to_human_size(file.filesize) %> - <%= file.attachmentstype.typeName %> + <%= file.attachmentstype.typeName unless file.attachmentstype.nil? %> <%= render :partial => 'attachments/course_type_edit', :locals => {:attachmenttypes => attachmenttypes, :attachment => file, :contentype => selContentType} %> diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index 8c624d176..838153c78 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -21,7 +21,7 @@ <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %> - +
+
- - - - - - - - @@ -124,37 +124,11 @@
- <% issue_count = @project.issues.count %> - <% issue_journal_count = @project.issue_changes.count %> - <% issue_score = issue_count * 0.2 %> - <% issue_journal_score = issue_journal_count * 0.1 %> - <% finall_issue_score = issue_score + issue_journal_score %> - - <% new_count = @project.news.count %> - <% new_score = new_count * 0.1 %> - <% finall_new_score = new_score %> - - <% document_count = @project.documents.count %> - <% file_score = document_count * 0.1 %> - <% finall_file_score = file_score %> - - <% changeset_count = @project.changesets.count %> - <% code_submit_score = changeset_count * 0.3 %> - <% finall_code_submit_score = code_submit_score %> - - <% board_message_count = 0 %> - <% @project.boards.each do |board| %> - <% board_message_count += board.messages_count %> - <% end %> - <% topic_score = board_message_count * 0.1 %> - <% finall_topic_score = topic_score %> - - <% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %> <% if @project.project_type !=1 %> <%= l(:label_project_grade)%>: - <%= link_to(format("%.2f" , finall_project_score ).to_f, + <%= link_to(format("%.2f" , project_scores(@project) ).to_i, {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id}, :style=>"color: #EC6300;") %> diff --git a/app/views/projects/_project_score_index.html.erb b/app/views/projects/_project_score_index.html.erb index ab0dc18ca..4a94867fc 100644 --- a/app/views/projects/_project_score_index.html.erb +++ b/app/views/projects/_project_score_index.html.erb @@ -1,36 +1,10 @@ -<% issue_count = @project.issues.count %> -<% issue_journal_count = @project.issue_changes.count %> -<% issue_score = issue_count * 0.2 %> -<% issue_journal_score = issue_journal_count * 0.1 %> -<% finall_issue_score = issue_score + issue_journal_score %> - -<% new_count = @project.news.count %> -<% new_score = new_count * 0.1 %> -<% finall_new_score = new_score %> - -<% document_count = @project.documents.count %> -<% file_score = document_count * 0.1 %> -<% finall_file_score = file_score %> - -<% changeset_count = @project.changesets.count %> -<% code_submit_score = changeset_count * 0.3 %> -<% finall_code_submit_score = code_submit_score %> - -<% board_message_count = 0 %> -<% @project.boards.each do |board| %> -<% board_message_count += board.messages_count %> -<% end %> -<% topic_score = board_message_count * 0.1 %> -<% finall_topic_score = topic_score %> - -<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %> <%= l(:label_projects_score) %>
= <%= l(:label_issue_score) %> + <%= l(:label_news_score) %> + <%= l(:label_file_score) %> + <%= l(:label_code_submit_score) %> + <%= l(:label_topic_score) %>
-
= <%= format("%.2f" , finall_issue_score).to_f %> + <%= format("%.2f" , finall_new_score).to_f %> + - <%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , finall_code_submit_score).to_f %> + - <%= format("%.2f" , topic_score).to_f %>
-
= <%= format("%.2f" , finall_project_score).to_f %>
+
= <%= format("%.2f" , issue_score(@project)).to_i %> + <%= format("%.2f" , news_score(@project)).to_i %> + + <%= format("%.2f" , document_score(@project)).to_i %> + <%= format("%.2f" , changesets_score(@project)).to_i %> + + <%= format("%.2f" , board_message_score(@project)).to_i %>
+
= <%= format("%.2f" , project_scores(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_projects_topic_score_index.html.erb b/app/views/projects/_projects_topic_score_index.html.erb index 1e059007a..909f93a09 100644 --- a/app/views/projects/_projects_topic_score_index.html.erb +++ b/app/views/projects/_projects_topic_score_index.html.erb @@ -1,10 +1,4 @@ -<% board_message_count = 0 %> -<% @project.boards.each do |board| %> -<% board_message_count += board.messages_count %> -<% end %> -<% topic_score = board_message_count * 0.1 %> -<% finall_topic_score = topic_score %> -
<%= l(:label_topic_number) %> * 0.1 = <%= board_message_count %> * 0.1 = <%= topic_score %>
-
<%= l(:label_topic_score) %> = <%= format("%.2f" , finall_topic_score).to_f %>
+
<%= l(:label_topic_number) %> * 2 = <%= board_message_num(@project) %> * 2 = <%= board_message_score(@project) %>
+
<%= l(:label_topic_score) %> = <%= format("%.2f" , board_message_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_show_projects_score.html.erb b/app/views/projects/_show_projects_score.html.erb index d135cfbdb..95c93d520 100644 --- a/app/views/projects/_show_projects_score.html.erb +++ b/app/views/projects/_show_projects_score.html.erb @@ -1,30 +1,4 @@ -<% issue_count = @project.issues.count %> -<% issue_journal_count = @project.issue_changes.count %> -<% issue_score = issue_count * 0.2 %> -<% issue_journal_score = issue_journal_count * 0.1 %> -<% finall_issue_score = issue_score + issue_journal_score %> - -<% new_count = @project.news.count %> -<% new_score = new_count * 0.1 %> -<% finall_new_score = new_score %> - -<% document_count = @project.documents.count %> -<% file_score = document_count * 0.1 %> -<% finall_file_score = file_score %> - -<% changeset_count = @project.changesets.count %> -<% code_submit_score = changeset_count * 0.3 %> -<% finall_code_submit_score = code_submit_score %> - -<% board_message_count = 0 %> -<% @project.boards.each do |board| %> -<% board_message_count += board.messages_count %> -<% end %> -<% topic_score = board_message_count * 0.1 %> -<% finall_topic_score = topic_score %> - -<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %>

<%= l(:label_projects_score) %>

@@ -40,7 +14,7 @@
@@ -51,27 +25,27 @@
  • <%= link_to l(:label_projects_score), {:controller => 'projects', :action => 'show_projects_score', :remote => true}%> : - <%= format("%.2f" , finall_project_score ).to_f %> + <%= format("%.2f" , project_scores(@project) ).to_i %>
  • <%= link_to l(:label_issue_score), {:controller => 'projects', :action => 'issue_score_index', :remote => true}%> : - <%= format("%.2f" , finall_issue_score).to_f %> + <%= format("%.2f" , issue_score(@project)).to_i %>
  • <%= link_to l(:label_news_score), {:controller => 'projects', :action => 'news_score_index', :remote => true}%> : - <%= format("%.2f" , finall_new_score).to_f %> + <%= format("%.2f" , news_score(@project)).to_i %>
  • <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> : - <%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , document_score(@project)).to_i %>
  • <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> : - <%= format("%.2f" , finall_code_submit_score).to_f %> + <%= format("%.2f" , changesets_score(@project)).to_i %>
  • <%= link_to l(:label_topic_score), {:controller => 'projects', :action => 'projects_topic_score_index', :remote => true}%> : - <%= format("%.2f" , finall_topic_score).to_f %> + <%= format("%.2f" , board_message_score(@project)).to_i %>
diff --git a/app/views/projects/settings/_repositories.html.erb b/app/views/projects/settings/_repositories.html.erb index bb42e7a54..4ad14bf84 100644 --- a/app/views/projects/settings/_repositories.html.erb +++ b/app/views/projects/settings/_repositories.html.erb @@ -15,7 +15,7 @@ <% @project.repositories.sort.each do |repository| %> @@ -25,12 +25,12 @@ <%else %> <% end %> - + @@ -67,27 +42,27 @@
  • <%= link_to l(:label_projects_score), {:controller => 'projects', :action => 'show_projects_score', :remote => true}%> : - <%= format("%.2f" , finall_project_score ).to_f %> + <%= format("%.2f" , project_scores(@project) ).to_i %>
  • <%= link_to l(:label_issue_score), {:controller => 'projects', :action => 'issue_score_index', :remote => true}%> : - <%= format("%.2f" , finall_issue_score).to_f %> + <%= format("%.2f" , issue_score(@project)).to_i %>
  • <%= link_to l(:label_news_score), {:controller => 'projects', :action => 'news_score_index', :remote => true}%> : - <%= format("%.2f" , finall_new_score).to_f %> + <%= format("%.2f" , news_score(@project)).to_i %>
  • <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> : - <%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , document_score(@project)).to_i %>
  • <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> : - <%= format("%.2f" , finall_code_submit_score).to_f %> + <%= format("%.2f" , changesets_score(@project)).to_i %>
  • <%= link_to l(:label_topic_score), {:controller => 'projects', :action => 'projects_topic_score_index', :remote => true}%> : - <%= format("%.2f" , finall_topic_score).to_f %> + <%= format("%.2f" , board_message_score(@project)).to_i %>
diff --git a/app/views/repositories/_form.html.erb b/app/views/repositories/_form.html.erb index 7ecbb7ddb..b9a3a6c83 100644 --- a/app/views/repositories/_form.html.erb +++ b/app/views/repositories/_form.html.erb @@ -1,32 +1,34 @@ -<%= error_messages_for 'repository' %> - -
-

-<%= label_tag('repository_scm', l(:label_scm)) %> - -<%= select_tag('repository_scm', - options_for_select(["Subversion"],@repository.class.name.demodulize), - :data => {:remote => true, :method => 'get'})%> - -

- -

<%= f.check_box :is_default, :label => :field_repository_is_default %>

-

<%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen? %> -<% unless @repository.identifier_frozen? %> - <%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %> -<% end %>

- - -

<%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url') %> - <%= "#{l(:label_exist_repository_path)}" %> -

-

<%= f.text_field :login, :size => 30 %>

-

<%= f.password_field :password, :size => 30, :name => 'ignore', :value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)), - :onfocus => "this.value=''; this.name='repository[password]';", - :onchange => "this.name='repository[password]';" %>

-
- -

- <%= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save)) %> - <%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %> -

+<%= error_messages_for 'repository' %> + +
+

+<%= label_tag('repository_scm', l(:label_scm)) %> + +<%= select_tag('repository_scm', + options_for_select(["Subversion"],@repository.class.name.demodulize), + :data => {:remote => true, :method => 'get'})%> + +

+ +

<%= f.check_box :is_default, :label => :field_repository_is_default %>

+

<%= f.text_field :identifier, :required => true, :disabled => @repository.identifier_frozen?, + value:"#{User.current.id.to_s + '_' +format_time(Time.now).to_s}"%> +<% unless @repository.identifier_frozen? %> + <%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %> +<% end %>

+ + +

<%= f.text_field :url, :size => 60, :required => true, :disabled => !@repository.safe_attribute?('url'), :id => "url_text_field" %> + <%= "#{l(:label_exist_repository_path)}" %> +

+

<%= f.text_field :login, :size => 30 %>

+

<%= f.password_field :password, :size => 30, :name => 'ignore', :value => ((@repository.new_record? || @repository.password.blank?) ? '' : ('x'*15)), + :onfocus => "this.value=''; this.name='repository[password]';", + :onchange => "this.name='repository[password]';" %>

+
+ +

+ <%#= submit_tag(@repository.new_record? ? l(:button_create) : l(:button_save)) %> + + <%= link_to l(:button_cancel), settings_project_path(@project, :tab => 'repositories') %> +

diff --git a/app/views/repositories/_form_create.html.erb b/app/views/repositories/_form_create.html.erb index 669f47071..d8c30143e 100644 --- a/app/views/repositories/_form_create.html.erb +++ b/app/views/repositories/_form_create.html.erb @@ -5,7 +5,12 @@ background-color:gray; border:none } - + <%= error_messages_for 'repository' %>
@@ -22,7 +27,10 @@ border:none <% end %>

<%= f.check_box :is_default, :label => :field_repository_is_default %>

-

<%= f.text_field :identifier, :required=>true, :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name)%> + +

+ +<%= f.text_field :identifier,:required=>true,:type=>"hidden", :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name)%> <% unless @repository.identifier_frozen? %> <%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_repository_identifier_info).html_safe %> diff --git a/app/views/repositories/new.html.erb b/app/views/repositories/new.html.erb index 31a44a921..4127458b3 100644 --- a/app/views/repositories/new.html.erb +++ b/app/views/repositories/new.html.erb @@ -1,5 +1,23 @@ -

<%= l(:label_repository_new) %>

- -<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %> - <%= render :partial => 'form', :locals => {:f => f} %> -<% end %> +

<%= l(:label_repository_new) %>

+ +<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> diff --git a/app/views/repositories/newrepo.html.erb b/app/views/repositories/newrepo.html.erb index 0461d5768..0c95a0335 100644 --- a/app/views/repositories/newrepo.html.erb +++ b/app/views/repositories/newrepo.html.erb @@ -2,5 +2,5 @@

<%= l(:label_repository_new_repos) %>

<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form'} do |f| %> <%= render :partial => 'form_create', :locals => {:f => f} %> - + <% end %> \ No newline at end of file diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 47ac3f968..6c1eafd6d 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -71,6 +71,12 @@ }) } + + function word_keydown(e){ + if(e&& e.keyCode==13){ + ssearch(); + } + }
@@ -85,7 +91,7 @@
  • 请选择省份:
  • -
  • +
  • diff --git a/app/views/softapplications/_form.html.erb b/app/views/softapplications/_form.html.erb index 17cb20598..4e38981f8 100644 --- a/app/views/softapplications/_form.html.erb +++ b/app/views/softapplications/_form.html.erb @@ -113,7 +113,7 @@ <%= render :partial => 'attachments/form' %>

    1、<%=l(:label_upload_softapplication_packets_mustpacketed)%>
    2、<%=l(:label_upload_softapplication_photo_condition)%>

    -

    <%=l(:label_updated_caution)%>

    +
    diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index c4e0ef98d..20f64dc3f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -43,289 +43,295 @@ <% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %> <% act = e.act %> <% unless act.nil? %> -
    + <%= link_to @project.watcher_users.count, project_watcherlist_path(project)%> + <%= content_tag('span', l(:label_x_follow_people,:count =>@project.watcher_users.count)) %>
    + <%= link_to "#{@project.members.count}", project_member_path(@project)%> + <%= content_tag('span', l(:label_x_current_contributors, :count => @project.users.count)) %>
    + <%= content_tag('span', "#{(@project.repository.nil? || @project.repository.changesets[0].nil?) ? '0' : distance_of_time_in_words(Time.now, @project.repository.changesets[0].committed_on)}", :class => "info") %> + <%= content_tag('span', l(:label_since_last_commits)) %>
    + <% #find_project_repository @project %> <%= content_tag('span', "#{@project.repository.nil? || @project.project_status.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %> + <%= content_tag('span', l(:label_commit_on)) %>
    - +
    <%= l(:label_projects_score) %>
    <%= format("%.2f" , finall_project_score ).to_f %>
    <%= format("%.2f" , project_scores(@project) ).to_i %>
    - <%= link_to repository.identifier, + <%= link_to repository.identifier, {:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %> <%= checked_image repository.is_default? %><%=h repository.url %> <% if repository.scm_name=="Subversion"%> <%if User.current.allowed_to?(:manage_repository, @project) %> <%= link_to(l(:label_user_plural), committers_repository_path(repository), - :class => 'icon icon-user') %> + :class => 'icon icon-user') %> <%= link_to(l(:button_edit), edit_repository_path(repository), :class => 'icon icon-edit') %> <%= delete_link repository_path(repository) %> @@ -61,6 +61,6 @@ <% end %> <% if User.current.allowed_to?(:manage_repository, @project) %> -

    <%= l(:label_repository_no) %> +

    <%= l(:label_repository_no) %> <%= link_to l(:label_repository_new_repos), newrepo_project_repository_path(@project, :course => course_tag), :class => 'icon icon-add' %>

    <% end %> \ No newline at end of file diff --git a/app/views/projects/show_projects_score.html.erb b/app/views/projects/show_projects_score.html.erb index 95a7085d4..94f3dfaf8 100644 --- a/app/views/projects/show_projects_score.html.erb +++ b/app/views/projects/show_projects_score.html.erb @@ -1,30 +1,5 @@ -<% issue_count = @project.issues.count %> -<% issue_journal_count = @project.issue_changes.count %> -<% issue_score = issue_count * 0.2 %> -<% issue_journal_score = issue_journal_count * 0.1 %> -<% finall_issue_score = issue_score + issue_journal_score %> -<% new_count = @project.news.count %> -<% new_score = new_count * 0.1 %> -<% finall_new_score = new_score %> - -<% document_count = @project.documents.count %> -<% file_score = document_count * 0.1 %> -<% finall_file_score = file_score %> - -<% changeset_count = @project.changesets.count %> -<% code_submit_score = changeset_count * 0.3 %> -<% finall_code_submit_score = code_submit_score %> - -<% board_message_count = 0 %> -<% @project.boards.each do |board| %> - <% board_message_count += board.messages_count %> -<% end %> -<% topic_score = board_message_count * 0.1 %> -<% finall_topic_score = topic_score %> - -<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %> <%= h html_title %> @@ -56,7 +31,7 @@
    - +
    <%= l(:label_projects_score) %>
    <%= format("%.2f" , finall_project_score ).to_f %>
    <%= format("%.2f" , project_scores(@project) ).to_i %>
    - - - + <% when 'Changeset' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Message' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Principal' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'News' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Issue' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + + + + + + <% when 'Contest' %> + + <% if e.user == User.current && @show_contest == 1%> + + <% else %> + + <% end %> + + + + + + + <% else %> + <%# f=1 %> + <% end %> +
    <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> - - <% case e.act_type %> - <% when 'JournalsForMessage' %> - <% if User.current.login == e.user.try(:login) %> - <%# if e.user_id == act.jour.id %> - - - - <%# else %> - - <%# end %> - <% else %> + <% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest'%> +
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %> - <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> -
    - - - <% end %> - - + - -
    - <%= link_to("#{e.user.name}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %><%= - link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> -
    -

    <%= textilizable act.notes %>

    +
    <%= image_tag(url_to_avatar(e.user), :class => "avatar") %> + + <% case e.act_type %> + <% when 'JournalsForMessage' %> + <% if User.current.login == e.user.try(:login) %> + <%# if e.user_id == act.jour.id %> + + + + <%# else %> + + <%# end %> + <% else %> + + + + <% end %> + + - +
    <%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %> +
    + + - - - - <% when 'Bid' %> - - <% if act.reward_type == 3 && @show_course == 1%> - <% if e.user == User.current %> - + - <% else %> - + <% when 'Bid' %> + + <% if act.reward_type == 3 && @show_course == 1%> + <% if e.user == User.current %> + + <% else %> + + <% end %> + <% else %> + <% if e.user == User.current %> + + <% else %> + + <% end %> + <% end %> + + + + + + - <% end %> - <% else %> - <% if e.user == User.current %> - + <% when 'Journal' %> + + <% if e.user == User.current %> + + <% else %> + + <% end %> + + + <% if act.notes.nil? %> + <% desStr = '' %> + <% else %> + <% desStr=act.notes.html_safe %> + <% end %> + - <% else %> - + + - <% end %> - <% end %> - - - - - - - - <% when 'Journal' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - <% if act.notes.nil? %> - <% desStr = '' %> - <% else %> - <% desStr=act.notes.html_safe %> - <% end %> - - - - - - <% when 'Changeset' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Message' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Principal' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'News' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Issue' %> - - <% if e.user == User.current %> - - <% else %> - - <% end %> - - - - - - - - <% when 'Contest' %> - - <% if e.user == User.current && @show_contest == 1%> - - <% else %> - - <% end %> - - - - - - - <% else %> - <% f=1 %> - <% end %> -
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %> + <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> +
    + <%= link_to("#{e.user.name}", user_path(e.user_id)) %> <%= l(:label_have_feedback) %><%= + link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %> +
    +

    <%= textilizable act.notes %>

    -
    <%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %> -
    -
    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
    +

    <%= act.description.html_safe %>

    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    + <%= link_to l(:label_find_all_comments), respond_path(e.act_id) %><%= l(:label_comments_count, :count => e.act.commit) %> +
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> +

    <%= desStr %>

    - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %>  <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> +
    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    -

    <%= act.description.html_safe %>

    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    - <%= link_to l(:label_find_all_comments), respond_path(e.act_id) %><%= l(:label_comments_count, :count => e.act.commit) %> -
    -
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> -

    <%= desStr %>

    -
    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> -
    -

    <%= act.long_comments.html_safe %>

    -
    - <%= format_time(e.act.committed_on) %> -
    -
    - <%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %><%= l(:label_comments_count, :count => e.act.count) %> -
    -
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> -
    -

    <%= h act.content.truncate(240, omission: '...') %>

    -
    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_new_user) %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_user) %> -

    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    -
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> -
    -

    <%= act.description.html_safe %>

    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    - <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.comments_count) %> -
    -
    - - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> -   - - <%= l(:label_i_new_activity) %> -   - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> - - - <%= link_to(h(e.user), user_path(e.user_id)) %> -   - - <%= l(:label_new_activity) %> -   - <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> -
    -
    -
    - <%= textilizable act, :description %> -
    -
    - -
    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    - <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.journals.count) %> -
    -
    - <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> - - <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> -

    <%= h act.description %>

    -
    -
    - <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> -
    -
    -
    +
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> +
    +

    <%= act.long_comments.html_safe %>

    +
    + <%= format_time(e.act.committed_on) %> +
    +
    + <%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %><%= l(:label_comments_count, :count => e.act.count) %> +
    +
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> +
    +

    <%= h act.content.truncate(240, omission: '...') %>

    +
    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    +
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_new_user) %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_user) %> +

    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    +
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> +
    +

    <%= act.description.html_safe %>

    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    + <%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.comments_count) %> +
    +
    + + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> +   + + <%= l(:label_i_new_activity) %> +   + <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> + + + <%= link_to(h(e.user), user_path(e.user_id)) %> +   + + <%= l(:label_new_activity) %> +   + <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> +
    + + <%= textilizable act, :description %> + +
    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    + <%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.journals.count) %> +
    +
    + <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> + + <%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %> +

    <%= h act.description %>

    +
    +
    + <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %> +
    +
    +
    + <% end %> <% end %> <% end %> diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 27afed749..f2140fd9b 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -157,7 +157,7 @@
    <% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %> - +
  • <%= image_tag('/images/contest1.png')%> @@ -173,7 +173,7 @@ <% end %>
    -
    +
    <%=contest.description.truncate(100, omission: '...')%>

    diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index 3aca2c350..9d5037107 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -92,15 +92,15 @@
      -

      <% if User.current.logged? %> +

      该学校未开设任何课程,您可以查看其他学校课程

      +

      <% end %> -

      <% find_all_new_hot_course(9, @school_id).map do |course| %>
    • /,"") %>>
      @@ -123,7 +123,7 @@
      [<%= get_course_term course %>] <%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> - (<%= "#{studentCount(course)}人" %>) + (<%= "#{memberCount(course)}人" %>) <% files_count = course.attachments.count.to_s %> (<%= link_to "#{files_count}份", course_files_path(course) %>资料)
      @@ -164,18 +164,20 @@
      [<%= get_course_term course %>] <%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> - (<%= "#{studentCount(course)}人" %>) + (<%= "#{memberCount(course)}人" %>) <% files_count = course.attachments.count.to_s %> (<%= link_to "#{files_count}份", course_files_path(course) %>资料)
      -
    • <%end%> <% end; reset_cycle %> @@ -209,7 +211,7 @@
      [<%= get_course_term course %>] <%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %> - (<%= "#{studentCount(course)}人" %> ) + (<%= "#{memberCount(course)}人" %> ) <% files_count = course.attachments.count.to_i.to_s %> (<%= link_to "#{files_count}份", course_files_path(course) %>资料)
      diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index f8c7f880d..31fb0432a 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -79,33 +79,7 @@ <%=project.description.truncate(100, omission: '...')%>
    - <%# issue_count = project.issues.count %> - <%# issue_journal_count = project.issue_changes.count %> - <%# issue_score = issue_count * 0.2 %> - <%# issue_journal_score = issue_journal_count * 0.1 %> - <%# finall_issue_score = issue_score + issue_journal_score %> - - <%# new_count = project.news.count %> - <%# new_score = new_count * 0.1 %> - <%# finall_new_score = new_score %> - - <%# document_count = project.documents.count %> - <%# file_score = document_count * 0.1 %> - <%# finall_file_score = file_score %> - - <%# changeset_count = project.changesets.count %> - <%# code_submit_score = changeset_count * 0.3 %> - <%# finall_code_submit_score = code_submit_score %> - - <%# board_message_count = 0 %> - <%# project.boards.each do |board| %> - <%# board_message_count += board.messages_count %> - <%# end %> - <%# topic_score = board_message_count * 0.1 %> - <%# finall_topic_score = topic_score %> - - <%# finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %> - <%= content_tag "span", l(:label_project_score)+ ":" + project_score(project), + <%= content_tag "span", l(:label_project_score)+ ":" + project_scores(project).to_s, :style => "cursor: pointer; display: inline-block; float: right; color: #ec6300;", :title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度", :class => "tooltip", diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index 14b863f53..85b964a9b 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -16,6 +16,9 @@ <%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %> + + <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %> <%= fields_for @page do |fp| %>

    diff --git a/app/views/wiki/rename.html.erb b/app/views/wiki/rename.html.erb index ee0e49594..1ce11ee83 100644 --- a/app/views/wiki/rename.html.erb +++ b/app/views/wiki/rename.html.erb @@ -1,5 +1,10 @@ <%= wiki_page_breadcrumb(@page) %> - +

    <%= h @original_title %>

    <%= error_messages_for 'page' %> @@ -9,7 +14,7 @@ :html => { :method => :post } do |f| %>

    <%= f.text_field :title, :required => true, :size => 100 %>

    -

    <%= f.check_box :redirect_existing_links %>

    +

    <%= f.check_box :redirect_existing_links %>

    <%= f.select :parent_id, content_tag('option', '', :value => '') + wiki_page_options_for_select( diff --git a/config/locales/en.yml b/config/locales/en.yml index e1b93f649..e69de29bb 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,1801 +0,0 @@ -en: - # Text direction: Left-to-Right (ltr) or Right-to-Left (rtl) - direction: ltr - date: - formats: - # Use the strftime parameters for formats. - # When no format has been given, it uses default. - # You can provide other formats here if you like! - default: "%m/%d/%Y" - short: "%b %d" - long: "%B %d, %Y" - - day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday] - abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat] - - # Don't forget the nil at the beginning; there's no such thing as a 0th month - month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December] - abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] - # Used in date_select and datime_select. - order: - - :year - - :month - - :day - - time: - formats: - default: "%m/%d/%Y %I:%M %p" - time: "%I:%M %p" - short: "%d %b %H:%M" - long: "%B %d, %Y %H:%M" - am: "am" - pm: "pm" - - datetime: - distance_in_words: - half_a_minute: "half a minute" - less_than_x_seconds: - one: "less than 1 second" - other: "less than %{count} seconds" - x_seconds: - one: "1 second" - other: "%{count} seconds" - less_than_x_minutes: - one: "less than a minute" - other: "less than %{count} minutes" - x_minutes: - one: "1 minute" - other: "%{count} minutes" - about_x_hours: - one: "about 1 hour" - other: "about %{count} hours" - x_hours: - one: "1 hour" - other: "%{count} hours" - x_days: - one: "1 day" - other: "%{count} days" - about_x_months: - one: "about 1 month" - other: "about %{count} months" - x_months: - one: "1 month" - other: "%{count} months" - about_x_years: - one: "about 1 year" - other: "about %{count} years" - over_x_years: - one: "over 1 year" - other: "over %{count} years" - almost_x_years: - one: "almost 1 year" - other: "almost %{count} years" - - number: - format: - separator: "." - delimiter: "" - precision: 3 - - human: - format: - delimiter: "" - precision: 3 - storage_units: - format: "%n %u" - units: - byte: - one: "Byte" - other: "Bytes" - kb: "KB" - mb: "MB" - gb: "GB" - tb: "TB" - -# Used in array.to_sentence. - support: - array: - sentence_connector: "and" - skip_last_comma: false - - activerecord: - errors: - template: - header: - one: "1 error prohibited this %{model} from being saved" - other: "%{count} errors prohibited this %{model} from being saved" - messages: - inclusion: "is not included in the list" - exclusion: "is reserved" - invalid: "is invalid" - confirmation: "doesn't match confirmation" - accepted: "must be accepted" - empty: "can't be empty" - blank: "can't be blank" - too_long: "is too long (maximum is %{count} characters)" - too_short: "is too short (minimum is %{count} characters)" - wrong_length: "is the wrong length (should be %{count} characters)" - taken: "has already been taken" - not_a_number: "is not a number" - not_a_date: "is not a valid date" - greater_than: "must be greater than %{count}" - greater_than_or_equal_to: "must be greater than or equal to %{count}" - equal_to: "must be equal to %{count}" - less_than: "must be less than %{count}" - less_than_or_equal_to: "must be less than or equal to %{count}" - odd: "must be odd" - even: "must be even" - greater_than_start_date: "must be greater than start date" - not_same_project: "doesn't belong to the same project" - 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" - - actionview_instancetag_blank_option: Please select - - 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' - general_text_yes: 'yes' - general_lang_name: 'English' - general_csv_separator: ',' - general_csv_decimal_separator: '.' - general_csv_encoding: ISO-8859-1 - general_pdf_encoding: UTF-8 - general_first_day_of_week: '7' - - label_approve: Approve - label_refusal: Refusal - notice_account_updated: Account was successfully updated. - notice_account_invalid_creditentials: Invalid user or password - notice_account_password_updated: Password was successfully updated. - notice_account_wrong_password: Wrong password - notice_account_register_done: Account was successfully created. To activate your account, click on the link that was emailed to you. - notice_account_unknown_email: Unknown user. - notice_can_t_change_password: This account uses an external authentication source. Impossible to change the password. - notice_account_lost_email_sent: An email with instructions to choose a new password has been sent to you. - notice_account_activated: Your account has been activated. You can now log in. - notice_successful_create: Successful creation. - notice_successful_update: Successful update. - notice_successful_delete: Successful deletion. - notice_failed_delete: Successful failure. - notice_successful_connection: Successful connection. - notice_file_not_found: The page you were trying to access doesn't exist or has been removed. - notice_locking_conflict: Data has been updated by another user. - notice_not_authorized: You are not authorized to access this page. - notice_not_authorized_archived_project: The project you're trying to access has been archived. - notice_email_sent: "An email was sent to %{value}" - notice_email_error: "An error occurred while sending mail (%{value})" - notice_feeds_access_key_reseted: Your RSS access key was reset. - notice_api_access_key_reseted: Your API access key was reset. - notice_failed_to_save_issues: "Failed to save %{count} issue(s) on %{total} selected: %{ids}." - notice_failed_to_save_time_entries: "Failed to save %{count} time entrie(s) on %{total} selected: %{ids}." - notice_failed_to_save_members: "Failed to save member(s): %{errors}." - notice_no_issue_selected: "No issue is selected! Please, check the issues you want to edit." - notice_account_pending: "Your account was created and is now pending administrator approval." - notice_default_data_loaded: Default configuration successfully loaded. - notice_unable_delete_version: Unable to delete version. - notice_unable_delete_time_entry: Unable to delete time log entry. - notice_issue_done_ratios_updated: Issue done ratios updated. - notice_gantt_chart_truncated: "The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})" - notice_issue_successful_create: "Issue %{id} created." - notice_issue_update_conflict: "The issue has been updated by an other user while you were editing it." - notice_account_deleted: "Your account has been permanently deleted." - notice_user_successful_create: "User %{id} created." - - error_attachment_empty: "error in add file" - error_class_period_only_num: "class period can only digital" - error_can_t_load_default_data: "Default configuration could not be loaded: %{value}" - error_scm_not_found: "The entry or revision was not found in the repository." - error_scm_command_failed: "An error occurred when trying to access the repository: %{value}" - error_scm_annotate: "The entry does not exist or cannot be annotated." - error_scm_annotate_big_text_file: "The entry cannot be annotated, as it exceeds the maximum text file size." - error_issue_not_found_in_project: 'The issue was not found or does not belong to this project' - error_no_tracker_in_project: 'No tracker is associated to this project. Please check the Project settings.' - error_no_default_issue_status: 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").' - error_can_not_delete_custom_field: Unable to delete custom field - error_can_not_delete_tracker: "This tracker contains issues and cannot be deleted." - error_can_not_remove_role: "This role is in use and cannot be deleted." - error_can_not_reopen_issue_on_closed_version: 'An issue assigned to a closed version cannot be reopened' - error_can_not_archive_project: This project cannot be archived - error_issue_done_ratios_not_updated: "Issue done ratios not updated." - error_workflow_copy_source: 'Please select a source tracker or role' - error_workflow_copy_target: 'Please select target tracker(s) and role(s)' - error_unable_delete_issue_status: 'Unable to delete issue status' - error_unable_to_connect: "Unable to connect (%{value})" - error_attachment_too_big: "This file cannot be uploaded because it exceeds the maximum allowed file size (%{max_size})" - error_session_expired: "Your session has expired. Please login again." - warning_attachments_not_saved: "%{count} file(s) could not be saved." - - mail_subject_lost_password: "Your %{value} password" - mail_body_lost_password: 'To change your password, click on the following link:' - mail_subject_register: "Your %{value} account activation" - mail_body_register: 'To activate your account, click on the following link:' - mail_body_account_information_external: "You can use your %{value} account to log in." - mail_body_account_information: Your account information - mail_subject_account_activation_request: "%{value} account activation request" - mail_body_account_activation_request: "A new user (%{value}) has registered. The account is pending your approval:" - mail_subject_reminder: "%{count} issue(s) due in the next %{days} days" - mail_body_reminder: "%{count} issue(s) that are assigned to you are due in the next %{days} days:" - mail_subject_wiki_content_added: "'%{id}' wiki page has been added" - mail_body_wiki_content_added: "The '%{id}' wiki page has been added by %{author}." - mail_subject_wiki_content_updated: "'%{id}' wiki page has been updated" - mail_body_wiki_content_updated: "The '%{id}' wiki page has been updated by %{author}." - - field_name: Name - field_description: Description - field_summary: Summary - field_is_required: Required - field_firstname: First name - field_lastname: Last name - field_mail: Email - 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_updated_on: Updated - field_closed_on: Closed - field_field_format: Format - field_is_for_all: For all projects - field_possible_values: Possible values - field_regexp: Regular expression - field_min_length: Minimum length - field_max_length: Maximum length - field_value: Value - field_category: Category - field_title: Title - field_project: Project - field_issue: Issue - field_status: Status - field_notes: Notes - field_is_closed: Issue closed - field_is_default: Default value - field_tracker: Tracker - field_subject: Subject - field_due_date: Due date - field_assigned_to: Assignee - field_priority: Priority - field_fixed_version: Target version - field_user: User - field_principal: Principal - field_role: Role - field_homepage: Homepage - field_is_public: Public - field_parent: Subproject of - field_is_in_roadmap: Issues displayed in roadmap - field_login: Account/Email - field_mail_notification: Email notifications - field_admin: Administrator - field_last_login_on: Last connection - field_language: Language - field_effective_date: Date - field_password: Password - field_new_password: New password - field_password_confirmation: Confirmation - field_version: Version - field_type: Type - field_host: Host - field_port: Port - field_account: Account - field_base_dn: Base DN - field_attr_login: Login attribute - field_attr_firstname: Firstname attribute - field_attr_lastname: Lastname attribute - field_attr_mail: Email attribute - field_onthefly: On-the-fly user creation - field_start_date: Start date - field_done_ratio: "% Done" - field_auth_source: Authentication mode - field_hide_mail: Hide my email address - field_comments: Comment - field_url: URL - field_start_page: Start page - field_subproject: Subproject - field_hours: Hours - field_activity: Activity - field_spent_on: Date - field_identifier: Identifier - field_is_filter: Used as a filter - field_issue_to: Related issue - field_delay: Delay - field_assignable: Issues can be assigned to this role - field_redirect_existing_links: Redirect existing links - field_estimated_hours: Estimated time - field_column_names: Columns - field_time_entries: Log time - field_time_zone: Time zone - field_searchable: Searchable - field_default_value: Default value - field_comments_sorting: Display comments - field_parent_title: Parent page - field_editable: Editable - field_watcher: Watcher - field_identity_url: OpenID URL - field_content: Content - field_group_by: Group results by - field_sharing: Sharing - field_parent_issue: Parent task - field_member_of_group: "Assignee's group" - field_assigned_to_role: "Assignee's role" - field_text: Text field - field_visible: Visible - field_warn_on_leaving_unsaved: "Warn me when leaving a page with unsaved text" - field_issues_visibility: Issues visibility - field_is_private: Private - field_commit_logs_encoding: Commit messages encoding - field_scm_path_encoding: Path encoding - field_path_to_repository: Path to repository - field_root_directory: Root directory - field_cvsroot: CVSROOT - field_cvs_module: Module - field_repository_is_default: Main repository - field_multiple: Multiple values - field_auth_source_ldap_filter: LDAP filter - field_core_fields: Standard fields - field_timeout: "Timeout (in seconds)" - field_board_parent: Parent forum - field_private_notes: Private notes - field_inherit_members: Inherit members - - setting_app_title: Application title - setting_app_subtitle: Application subtitle - setting_welcome_text: Welcome text - setting_default_language: Default language - setting_login_required: Authentication required - setting_self_registration: Self-registration - setting_attachment_max_size: Maximum attachment size - setting_issues_export_limit: Issues export limit - setting_mail_from: Emission email address - setting_bcc_recipients: Blind carbon copy recipients (bcc) - setting_plain_text_mail: Plain text mail (no HTML) - setting_host_name: Host name and path - setting_text_formatting: Text formatting - setting_wiki_compression: Wiki history compression - setting_feeds_limit: Maximum number of items in Atom feeds - setting_default_projects_public: New projects are public by default - setting_autofetch_changesets: Fetch commits automatically - setting_sys_api_enabled: Enable WS for repository management - setting_commit_ref_keywords: Referencing keywords - setting_commit_fix_keywords: Fixing keywords - setting_autologin: Autologin - setting_date_format: Date format - setting_time_format: Time format - setting_cross_project_issue_relations: Allow cross-project issue relations - setting_cross_project_subtasks: Allow cross-project subtasks - setting_issue_list_default_columns: Default columns displayed on the issue list - setting_repositories_encodings: Attachments and repositories encodings - setting_emails_header: Email header - setting_emails_footer: Email footer - setting_protocol: Protocol - setting_per_page_options: Objects per page options - setting_user_format: Users display format - setting_activity_days_default: Days displayed on project activity - setting_display_subprojects_issues: Display subprojects issues on main projects by default - setting_enabled_scm: Enabled SCM - setting_mail_handler_body_delimiters: "Truncate emails after one of these lines" - setting_mail_handler_api_enabled: Enable WS for incoming emails - setting_mail_handler_api_key: API key - setting_sequential_project_identifiers: Generate sequential project identifiers - setting_gravatar_enabled: Use Gravatar user icons - setting_gravatar_default: Default Gravatar image - setting_diff_max_lines_displayed: Maximum number of diff lines displayed - setting_file_max_size_displayed: Maximum size of text files displayed inline - setting_repository_log_display_limit: Maximum number of revisions displayed on file log - setting_openid: Allow OpenID login and registration - setting_password_min_length: Minimum password length - setting_new_project_user_role_id: Role given to a non-admin user who creates a project - setting_default_projects_modules: Default enabled modules for new projects - setting_issue_done_ratio: Calculate the issue done ratio with - setting_issue_done_ratio_issue_field: Use the issue field - setting_issue_done_ratio_issue_status: Use the issue status - setting_start_of_week: Start calendars on - setting_rest_api_enabled: Enable REST web service - setting_cache_formatted_text: Cache formatted text - setting_default_notification_option: Default notification option - setting_commit_logtime_enabled: Enable time logging - setting_commit_logtime_activity_id: Activity for logged time - setting_gantt_items_limit: Maximum number of items displayed on the gantt chart - setting_issue_group_assignment: Allow issue assignment to groups - setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues - setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed - setting_unsubscribe: Allow users to delete their own account - setting_session_lifetime: Session maximum lifetime - setting_session_timeout: Session inactivity timeout - setting_thumbnails_enabled: Display attachment thumbnails - setting_thumbnails_size: Thumbnails size (in pixels) - setting_non_working_week_days: Non-working days - setting_jsonp_enabled: Enable JSONP support - setting_default_projects_tracker_ids: Default trackers for new projects - - permission_add_project: Create project - permission_add_subprojects: Create subprojects - permission_edit_project: Edit project - permission_close_project: Close / reopen the project - permission_select_project_modules: Select project modules - permission_manage_members: Manage members - permission_manage_project_activities: Manage project activities - permission_manage_versions: Manage versions - permission_manage_categories: Manage issue categories - permission_view_issues: View Issues - permission_add_issues: Add issues - permission_edit_issues: Edit issues - permission_manage_issue_relations: Manage issue relations - permission_set_issues_private: Set issues public or private - permission_set_own_issues_private: Set own issues public or private - permission_add_issue_notes: Add notes - permission_edit_issue_notes: Edit notes - permission_edit_own_issue_notes: Edit own notes - permission_view_private_notes: View private notes - permission_set_notes_private: Set notes as private - permission_move_issues: Move issues - permission_delete_issues: Delete issues - permission_manage_public_queries: Manage public queries - permission_save_queries: Save queries - permission_view_gantt: View gantt chart - permission_view_calendar: View calendar - permission_view_issue_watchers: View watchers list - permission_add_issue_watchers: Add watchers - permission_delete_issue_watchers: Delete watchers - permission_log_time: Log spent time - permission_view_time_entries: View spent time - permission_edit_time_entries: Edit time logs - permission_edit_own_time_entries: Edit own time logs - permission_manage_news: Manage news - permission_comment_news: Comment news - permission_view_documents: View documents - permission_add_documents: Add documents - permission_edit_documents: Edit documents - permission_delete_documents: Delete documents - permission_manage_files: Manage files - permission_view_files: View files - permission_manage_wiki: Manage wiki - permission_rename_wiki_pages: Rename wiki pages - permission_delete_wiki_pages: Delete wiki pages - permission_view_wiki_pages: View wiki - permission_view_wiki_edits: View wiki history - permission_edit_wiki_pages: Edit wiki pages - permission_delete_wiki_pages_attachments: Delete attachments - permission_protect_wiki_pages: Protect wiki pages - permission_manage_repository: Manage repository - permission_browse_repository: Browse repository - permission_view_changesets: View changesets - permission_commit_access: Commit access - permission_manage_boards: Manage forums - permission_view_messages: View messages - permission_add_messages: Post messages - permission_edit_messages: Edit messages - permission_edit_own_messages: Edit own messages - permission_delete_messages: Delete messages - permission_delete_own_messages: Delete own messages - permission_export_wiki_pages: Export wiki pages - permission_manage_subtasks: Manage subtasks - permission_manage_related_issues: Manage related issues - permission_view_journals_for_messages: View journals messages - permission_view_courses: View courses - permission_new_course: Create course - permission_configure_course: Configure course - permission_close_course: Close/open course - permission_new_assignment: Create assignment - permission_edit_assignment: Edit assignment - permission_delete_assignment: Delete assignment - permission_new_placeholder: Create placeholder - permission_edit_placeholder: Edit placeholder - permission_delete_placeholder: Delete placeholder - permission_commit_content: Commit content - permission_new_course_notify: Create course notify - permission_edit_course_notify: Eidt course notify - permission_delete_course_notify: Delete course notify - permission_view_assignment: View assignment - permission_view_placeholder: View placeholder - permission_view_course_messages: View course messages - permission_view_real_name: View real name - permission_view_students: View students - permission_export_homeworks: Export homeworks - - project_module_issue_tracking: Issue tracking - project_module_time_tracking: Time tracking - project_module_news: News - project_module_documents: Documents - project_module_files: Files - project_module_wiki: Wiki - project_module_repository: Repository - project_module_boards: Forums - project_module_calendar: Calendar - project_module_gantt: Gantt - - label_user: User - label_user_plural: Users - label_user_new: New user - label_user_anonymous: Anonymous - label_project: Project - label_activity_project: 'Project: ' #added by bai - label_project_new: New project - label_project_plural: Projects - label_project_deposit: Projects - label_x_projects: - zero: no projects - one: 1 project - other: "%{count} projects" - label_project_all: All Projects - label_project_latest: Latest projects - label_issue: Issue - label_issue_new: New issue - label_issue_plural: Issues - label_issue_view_all: View all issues - label_issues_by: "Issues by %{value}" - label_issue_added: Issue added - label_issue_updated: Issue updated - label_issue_note_added: Note added - label_issue_status_updated: Status updated - label_issue_priority_updated: Priority updated - label_document: Document - label_document_new: New document - label_document_plural: Documents - label_document_added: Document added - label_document_public_info: "If you don't choose public, only the project's members can see the document." - label_role: Role - label_role_plural: Roles - label_role_new: New role - label_role_and_permissions: Roles and permissions - label_role_anonymous: Anonymous - label_role_non_member: Non member - label_member: Members - label_member_new: New member - label_member_plural: Members - label_tracker: Tracker - label_tracker_plural: Trackers - label_tracker_new: New tracker - label_workflow: Workflow - label_issue_status: Issue status - label_issue_status_plural: Issue statuses - label_issue_status_new: New status - label_issue_category: Issue category - label_issue_category_plural: Issue categories - label_issue_category_new: New category - label_custom_field: Custom field - label_custom_field_plural: Custom fields - label_custom_field_new: New custom field - label_enumerations: Enumerations - label_enumeration_new: New value - label_information: Information - label_information_plural: Information - label_please_login: Please log in - label_register: Sign up - label_login_with_open_id_option: or login with OpenID - label_password_lost: Lost password - label_home: Home - label_my_page: My page - label_my_account: My account - label_my_message: My messages - label_my_projects: My projects - label_my_page_block: My page block - label_administration: Administration - label_login: Login - label_logout: Sign out - label_help: Help - label_reported_issues: Reported issues - label_assigned_to_me_issues: Issues assigned to me - label_last_login: Last connection - label_registered_on: Registered on - label_activity: Activities - label_overall_activity: Overall activity - label_user_activity: "%{value}'s activity" - label_new: New - label_new_user: registered a new account - label_logged_as: Logged in as - label_environment: Environment - label_authentication: Authentication - label_auth_source: Authentication mode - label_auth_source_new: New authentication mode - label_auth_source_plural: Authentication modes - label_subproject_plural: Subprojects - label_subproject_new: New subproject - label_and_its_subprojects: "%{value} and its subprojects" - label_min_max_length: Min - Max length - label_list: List - label_date: Date - label_integer: Integer - label_float: Float - label_boolean: Boolean - label_string: Text - label_text: Long text - label_attribute: Attribute - label_attribute_plural: Attributes - label_no_data: No data to display - label_change_status: Change status - label_history: History - 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 - label_news: News - label_news_new: Add news - label_news_plural: News - label_news_latest: Latest news - label_news_view_all: View all news - label_news_added: News added - label_news_comment_added: Comment added to a news - label_settings: Settings - label_overview: Activities - label_version: Version - label_version_new: New version - label_version_plural: Versions - label_close_versions: Close completed versions - label_confirmation: Confirmation - label_export_to: 'Also available in:' - label_read: Read... - label_public_projects: Public projects - label_open_issues: open - label_open_issues_plural: open - label_closed_issues: closed - label_closed_issues_plural: closed - label_x_open_issues_abbr_on_total: - zero: 0 open / %{total} - one: 1 open / %{total} - other: "%{count} open / %{total}" - label_x_open_issues_abbr: - zero: 0 open - one: 1 open - other: "%{count} open" - label_x_closed_issues_abbr: - zero: 0 closed - one: 1 closed - other: "%{count} closed" - label_x_issues: - zero: 0 issues - one: 1 issue - other: "%{count} issues" - label_total: Total - label_total_time: Total time - label_permissions: Permissions - label_current_status: Current status - label_new_statuses_allowed: New statuses allowed - label_all: all - label_any: any - label_none: none - label_nobody: nobody - label_next: Next - label_previous: Previous - label_used_by: Used by - label_details: Details - label_add_note: Add a note - label_per_page: Per page - label_calendar: Calendar - label_months_from: months from - label_gantt: Gantt - label_internal: Internal - label_last_changes: "last %{count} changes" - label_change_view_all: View all changes - label_personalize_page: Personalize this page - label_comment: Comment - label_comment_plural: Comments - label_x_comments: - zero: no comments - one: 1 comment - other: "%{count} comments" - label_comment_add: Add a comment - label_comment_added: Comment added - label_comment_delete: Delete comments - label_query: Custom query - label_query_plural: Custom queries - label_query_new: New query - label_my_queries: My custom queries - label_filter_add: Add filter - label_filter_plural: Query condition - label_equals: is - label_not_equals: is not - label_in_less_than: in less than - label_in_more_than: in more than - label_in_the_next_days: in the next - label_in_the_past_days: in the past - label_in_users: 'in the user ' - label_greater_or_equal: '>=' - label_less_or_equal: '<=' - label_between: between - label_in: in - label_today: today - label_all_time: all time - label_yesterday: yesterday - label_this_week: this week - label_last_week: last week - label_last_n_weeks: "last %{count} weeks" - label_last_n_days: "last %{count} days" - label_this_month: this month - label_last_month: last month - label_this_year: this year - label_date_range: Date range - label_less_than_ago: less than days ago - label_more_than_ago: more than days ago - label_ago: days ago - label_contains: contains - label_not_contains: doesn't contain - label_any_issues_in_project: any issues in project - label_any_issues_not_in_project: any issues not in project - label_no_issues_in_project: no issues in project - label_day_plural: days - label_repository: Repository - #add by tan - label_repository_new: Repository setting - label_repository_no: Have no repository? - label_repository_new_repos: New repository - #end - label_repository_plural: Repositories - label_browse: Browse - label_branch: Branch - label_tag: Tag - label_revision: Revision - label_revision_plural: Revisions - label_revision_id: "Revision %{value}" - label_associated_revisions: Associated revisions - label_added: added - label_modified: modified - label_copied: copied - label_renamed: renamed - label_deleted: deleted - label_latest_revision: Latest revision - label_latest_revision_plural: Latest revisions - label_view_revisions: View revisions - label_view_all_revisions: View all revisions - label_max_size: Maximum size - label_sort_highest: Move to top - label_sort_higher: Move up - label_sort_lower: Move down - label_sort_lowest: Move to bottom - label_roadmap: Roadmap - label_roadmap_due_in: "Due in %{value}" - label_roadmap_overdue: "%{value} late" - label_roadmap_no_issues: No issues for this version - label_search: Search - label_result_plural: Results - label_all_words: All words - label_wiki: Wiki - label_wiki_edit: Wiki edit - label_wiki_edit_plural: Wiki edits - label_wiki_page: Wiki page - label_wiki_page_plural: Wiki pages - label_index_by_title: Index by title - label_index_by_date: Index by date - label_current_version: Current version - label_preview: Preview - label_feed_plural: Feeds - label_changes_details: Details of all changes - label_issue_tracking: Issue tracking - label_spent_time: Spent time - label_overall_spent_time: Overall spent time - label_f_hour: "%{value} hour" - label_f_hour_plural: "%{value} hours" - label_time_tracking: Time tracking - label_change_plural: Changes - label_statistics: Statistics - label_commits_per_month: Commits per month - label_commits_per_author: Commits per author - label_diff: diff - label_view_diff: View differences - label_diff_inline: inline - label_diff_side_by_side: side by side - label_options: Options - label_copy_workflow_from: Copy workflow from - label_permissions_report: Permissions report - label_watched_issues: Watched issues - label_related_issues: Related issues - label_applied_status: Applied status - label_loading: Loading... - label_relation_new: New relation - label_relation_delete: Delete relation - label_relates_to: Related to - label_duplicates: Duplicates - label_duplicated_by: Duplicated by - label_blocks: Blocks - label_blocked_by: Blocked by - label_precedes: Precedes - label_follows: Follows - label_copied_to: Copied to - label_copied_from: Copied from - label_end_to_start: end to start - label_end_to_end: end to end - label_start_to_start: start to start - label_start_to_end: start to end - label_stay_logged_in: Stay logged in - label_disabled: disabled - label_show_completed_versions: Show completed versions - label_me: me - label_board: Forums - label_board_description: Bring together the wisdom of crowds, and solve problems for you! - label_board_new: New forum - label_board_plural: Forums - label_board_locked: Locked - label_board_sticky: Sticky - label_topic_plural: Topics - field_sticky: '' - field_locked: '' - field_lock: '' - label_message_plural: Messages - label_message_last: Last message - label_message_new: New message - label_message_posted: Message added - label_reply_plural: Replies - label_send_information: Send account information to the user - label_year: Year - label_month: Month - label_week: Week - label_date_from: From - label_date_to: To - label_language_based: Based on user's language - label_sort_by: "Sort by %{value}" - label_send_test_email: Send a test email - label_feeds_access_key: RSS access key - label_missing_feeds_access_key: Missing a RSS access key - label_feeds_access_key_created_on: "RSS access key created %{value} ago" - label_module_plural: Modules - label_added_time_by: "Added by %{author} %{age} ago" - label_updated_time_by: "Updated by %{author} %{age} ago" - label_updated_time: "Updated %{value} ago" - label_jump_to_a_project: Jump to a project... - label_file_plural: Files - label_changeset_plural: Changesets - label_default_columns: Default columns - label_no_change_option: (No change) - label_bulk_edit_selected_issues: Bulk edit selected issues - label_bulk_edit_selected_time_entries: Bulk edit selected time entries - label_theme: Theme - label_default: Default - label_search_titles_only: Search titles only - label_user_mail_option_all: "For any event on all my projects" - label_user_mail_option_selected: "For any event on the selected projects only..." - label_user_mail_option_none: "No events" - label_user_mail_option_only_my_events: "Only for things I watch or I'm involved in" - label_user_mail_option_only_assigned: "Only for things I am assigned to" - label_user_mail_option_only_owner: "Only for things I am the owner of" - label_user_mail_no_self_notified: "I don't want to be notified of changes that I make myself" - label_registration_activation_by_email: account activation by email - label_registration_manual_activation: manual account activation - label_registration_automatic_activation: automatic account activation - label_display_per_page: "Per page: %{value}" - label_age: Age - label_change_properties: Change properties - label_general: General - label_more: More - label_scm: SCM - label_plugins: Plugins - label_ldap_authentication: LDAP authentication - label_downloads_abbr: D/L - label_optional_description: Optional description - label_add_another_file: Add another file - label_preferences: Preferences - label_chronological_order: In chronological order - label_reverse_chronological_order: In reverse chronological order - label_planning: Planning - label_incoming_emails: Incoming emails - label_generate_key: Generate a key - label_issue_watchers: Watchers - label_example: Example - label_display: Display - label_sort: Sort - label_ascending: Ascending - label_descending: Descending - label_date_from_to: From %{start} to %{end} - label_wiki_content_added: Wiki page added - label_wiki_content_updated: Wiki page updated - label_group: Group - label_group_plural: Groups - label_group_new: New group - label_time_entry_plural: Spent time - label_version_sharing_none: Not shared - label_version_sharing_descendants: With subprojects - label_version_sharing_hierarchy: With project hierarchy - label_version_sharing_tree: With project tree - label_version_sharing_system: With all projects - label_update_issue_done_ratios: Update issue done ratios - label_copy_source: Source - label_copy_target: Target - label_copy_same_as_target: Same as target - label_display_used_statuses_only: Only display statuses that are used by this tracker - label_api_access_key: API access key - label_missing_api_access_key: Missing an API access key - label_api_access_key_created_on: "API access key created %{value} ago" - label_profile: Profile - label_subtask_plural: Subtasks - label_project_copy_notifications: Send email notifications during the project copy - label_principal_search: "Search for user or group:" - label_user_search: "Search for user:" - label_additional_workflow_transitions_for_author: Additional transitions allowed when the user is the author - label_additional_workflow_transitions_for_assignee: Additional transitions allowed when the user is the assignee - label_issues_visibility_all: All issues - label_issues_visibility_public: All non private issues - label_issues_visibility_own: Issues created by or assigned to the user - label_git_report_last_commit: Report last commit for files and directories - label_parent_revision: Parent - label_child_revision: Child - label_export_options: "%{export_format} export options" - label_copy_attachments: Copy attachments - label_copy_subtasks: Copy subtasks - label_item_position: "%{position} of %{count}" - label_completed_versions: Completed versions - label_search_for_watchers: Search for watchers to add - label_session_expiration: Session expiration - label_show_closed_projects: View closed projects - label_status_transitions: Status transitions - label_fields_permissions: Fields permissions - label_readonly: Read-only - label_required: Required - label_attribute_of_project: "Project's %{name}" - label_attribute_of_issue: "Issue's %{name}" - label_attribute_of_author: "Author's %{name}" - label_attribute_of_assigned_to: "Assignee's %{name}" - label_attribute_of_user: "User's %{name}" - label_attribute_of_fixed_version: "Target version's %{name}" - label_cross_project_descendants: With subprojects - label_cross_project_tree: With project tree - 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_login: Login - button_submit: Submit - button_save: Save - button_check_all: Check all - button_uncheck_all: Uncheck all - button_collapse_all: Collapse all - button_expand_all: Expand all - button_delete: Delete - button_create: Create - button_create_and_continue: Create and continue - button_test: Test - button_edit: Edit - button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}" - button_add: Add - button_change: Change - button_apply: Query - button_clear: Cancel query - button_lock: Lock - button_unlock: Unlock - button_download: Download - button_list: List - button_view: View - button_move: Move - button_move_and_follow: Move and follow - button_back: Back - button_cancel: Cancel - button_activate: Activate - button_sort: Sort - button_log_time: Log time - button_rollback: Rollback to this version - button_watch: Watch - button_unwatch: Unwatch - button_reply: Reply - button_archive: Archive - button_unarchive: Unarchive - button_reset: Reset - button_rename: Rename - button_change_password: Change password - button_copy: Copy - button_copy_and_follow: Copy and follow - button_annotate: Annotate - button_update: Update - button_configure: Configure - button_quote: Quote - button_duplicate: Duplicate - button_show: Show - button_hide: Hide - button_edit_section: Edit this section - button_export: Export - button_delete_my_account: Delete my account - button_close: Close - button_reopen: Reopen - - status_active: active - status_registered: registered - status_locked: locked - - project_status_active: active - project_status_closed: closed - project_status_archived: archived - - version_status_open: open - version_status_locked: locked - version_status_closed: closed - - field_active: Active - - text_select_mail_notifications: Select actions for which email notifications should be sent. - text_regexp_info: eg. ^[A-Z0-9]+$ - text_min_max_length_info: 0 means no restriction - text_project_destroy_confirmation: Are you sure you want to delete this project and related data? - text_subprojects_destroy_warning: "Its subproject(s): %{value} will be also deleted." - text_workflow_edit: Select a role and a tracker to edit the workflow - text_are_you_sure: Are you sure? - text_journal_changed: "%{label} changed from %{old} to %{new}" - text_journal_changed_no_detail: "%{label} updated" - text_journal_set_to: "%{label} set to %{value}" - text_journal_deleted: "%{label} deleted (%{old})" - text_journal_added: "%{label} %{value} added" - text_tip_issue_begin_day: issue beginning this day - text_tip_issue_end_day: issue ending this day - text_tip_issue_begin_end_day: issue beginning and ending this day - text_project_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed, must start with a lower case letter.
    Once saved, the identifier cannot be changed.' - text_caracters_maximum: "%{count} characters maximum." - text_caracters_minimum: "Must be at least %{count} characters long." - text_length_between: "Length between %{min} and %{max} characters." - text_tracker_no_workflow: No workflow defined for this tracker - text_unallowed_characters: Unallowed characters - text_comma_separated: Multiple values allowed (comma separated). - text_line_separated: Multiple values allowed (one line for each value). - text_issues_ref_in_commit_messages: Referencing and fixing issues in commit messages - text_issue_added: "Issue %{id} has been reported by %{author}." - text_issue_updated: "Issue %{id} has been updated by %{author}." - text_wiki_destroy_confirmation: Are you sure you want to delete this wiki and all its content? - text_issue_category_destroy_question: "Some issues (%{count}) are assigned to this category. What do you want to do?" - text_issue_category_destroy_assignments: Remove category assignments - text_issue_category_reassign_to: Reassign issues to this category - text_user_mail_option: "For unselected projects, you will only receive notifications about things you watch or you're involved in (eg. issues you're the author or assignee)." - text_no_configuration_data: "Roles, trackers, issue statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded." - text_load_default_configuration: Load the default configuration - text_status_changed_by_changeset: "Applied in changeset %{value}." - text_time_logged_by_changeset: "Applied in changeset %{value}." - text_issues_destroy_confirmation: 'Are you sure you want to delete the selected issue(s)?' - text_issues_destroy_descendants_confirmation: "This will also delete %{count} subtask(s)." - text_time_entries_destroy_confirmation: 'Are you sure you want to delete the selected time entr(y/ies)?' - text_select_project_modules: 'Select modules to enable for this project:' - text_default_administrator_account_changed: Default administrator account changed - text_file_repository_writable: Attachments directory writable - text_plugin_assets_writable: Plugin assets directory writable - text_rmagick_available: RMagick available (optional) - text_destroy_time_entries_question: "%{hours} hours were reported on the issues you are about to delete. What do you want to do?" - text_destroy_time_entries: Delete reported hours - text_assign_time_entries_to_project: Assign reported hours to the project - text_reassign_time_entries: 'Reassign reported hours to this issue:' - text_user_wrote: "%{value} wrote:" - text_enumeration_destroy_question: "%{count} objects are assigned to this value." - text_enumeration_category_reassign_to: 'Reassign them to this value:' - text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/configuration.yml and restart the application to enable them." - text_repository_usernames_mapping: "Select or update the Trustie user mapped to each username found in the repository log.\nUsers with the same Trustie and repository username or email are automatically mapped." - text_diff_truncated: '... This diff was truncated because it exceeds the maximum size that can be displayed.' - text_custom_field_possible_values_info: 'One line for each value' - text_wiki_page_destroy_question: "This page has %{descendants} child page(s) and descendant(s). What do you want to do?" - text_wiki_page_nullify_children: "Keep child pages as root pages" - text_wiki_page_destroy_children: "Delete child pages and all their descendants" - text_wiki_page_reassign_children: "Reassign child pages to this parent page" - text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?" - text_zoom_in: Zoom in - text_zoom_out: Zoom out - text_warn_on_leaving_unsaved: "The current page contains unsaved text that will be lost if you leave this page." - text_scm_path_encoding_note: "Default: UTF-8" - text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo) - text_mercurial_repository_note: Local repository (e.g. /hgrepo, c:\hgrepo) - text_scm_command: Command - text_scm_command_version: Version - text_scm_config: You can configure your SCM commands in config/configuration.yml. Please restart the application after editing it. - text_scm_command_not_available: SCM command is not available. Please check settings on the administration panel. - text_issue_conflict_resolution_overwrite: "Apply my changes anyway (previous notes will be kept but some changes may be overwritten)" - text_issue_conflict_resolution_add_notes: "Add my notes and discard my other changes" - text_issue_conflict_resolution_cancel: "Discard all my changes and redisplay %{link}" - text_account_destroy_confirmation: "Are you sure you want to proceed?\nYour account will be permanently deleted, with no way to reactivate it." - text_session_expiration_settings: "Warning: changing these settings may expire the current sessions including yours." - text_project_closed: This project is closed and read-only. - text_turning_multiple_off: "If you disable multiple values, multiple values will be removed in order to preserve only one value per item." - text_applied_project: "User %{id} Apply Join Project %{project}" - - default_role_manager: Manager - default_role_developer: Developer - default_role_reporter: Reporter - default_tracker_bug: Bug - default_tracker_feature: Feature - default_tracker_support: Support - default_issue_status_new: New - default_issue_status_in_progress: In Progress - default_issue_status_resolved: Resolved - default_issue_status_feedback: Feedback - default_issue_status_closed: Closed - default_issue_status_rejected: Rejected - default_doc_category_user: User documentation - default_doc_category_tech: Technical documentation - default_priority_low: Low - default_priority_normal: Normal - default_priority_high: High - default_priority_urgent: Urgent - default_priority_immediate: Immediate - default_activity_design: Design - default_activity_development: Development - - enumeration_issue_priorities: Issue priorities - enumeration_doc_categories: Document categories - enumeration_activities: Activities - enumeration_system_activity: System Activity - description_filter: Filter - description_search: Searchfield - description_choose_project: Projects - description_project_scope: Search scope - description_notes: Notes - description_message_content: Message content - description_query_sort_criteria_attribute: Sort attribute - description_query_sort_criteria_direction: Sort direction - description_user_mail_notification: Mail notification settings - description_available_columns: Available Columns - description_selected_columns: Selected Columns - description_all_columns: All Columns - description_issue_category_reassign: Choose issue category - description_wiki_subpages_reassign: Choose new parent page - description_date_range_list: Choose range from list - description_date_range_interval: Choose range by selecting start and end date - description_date_from: Enter start date - description_date_to: Enter end date - text_repository_identifier_info: 'Only lower case letters (a-z), numbers, dashes and underscores are allowed.
    Once saved, the identifier cannot be changed.' - - #modify by mkz - #by young - label_requirement: Calls - label_requirement_focus: Calls # modified by bai - label_developer: Users - label_investor: Investor: - label_theme: Theme - label_logged_as_new: Current user - button_register: Register - issue_list: Issue list - lastest_respond: Lastest reply - label_news_lastest: Lastest news - label_version_display_settings: Display settings - label_versions_progress: Complete schedule - label_versions_description: Versions description - label_my_photo: My photo - label_documents_sort: Order setting: - label_activities_settings: Display settings - #end - - label_joined_course: Joined Courses - label_created_course: Created Courses - label_borad_course: Course Borad - - #huang - label_file_new: Download - label_user_edit: "Edit information" - label_user_info: "User information" #huang 添加 - label_user_watcher: "Following" # huang添加的 # modified by bai - label_user_fans: "Followed by" # modified by bai - - # modify by men - label_x_user_fans: - zero: fan - one: fan - other: fans - #end - label_user_commits: "Code commits" - label_user_watchered: "Followed by" # huang添加的 - label_user_newfeedback: "Messages" ## huang添加的 # modified by bai - label_user_login: "Last login:" - label_user_mail: "E-mail:" - label_user_joinin: "Join date:" - label_user_activities: "You have no activities,come and join us!" - label_user_activities_other: The user has no activities now! - label_project_overview: "Overview" - label_project_tool: "Tool" - label_project_issues: "Issues" - label_project_newother: "See other comments" - label_project_newshare: "has shared" - label_project_newadd: "added" - label_project_unadd: "No project,go to creat it!" - label_project_un: "You haven't joined any project!" - #end by huang - - #added by liuping - button_unfollow: Unfollow - button_follow: Follow - label_delete_confirm: Confirm delete? - label_more_tags: More - label_tags_bid: Call name - label_tags_bid_description: call description - label_tags_issue_description: issue description - label_tags_all_objects: all objects - label_apply_project: Apply Project - label_apply_project_waiting: "Application has been submitted, please wait for administrator review." - label_unapply_project: Unsubscribe - - #fq - button_leave_meassge: Submit - label_leave_message_to: leave %{name} a message - label_leave_message: Message content - label_message: message board - field_add: Add before %{time} - button_more: More - label_user_response: Feedback # modified by bai - label_bidding_project: projects - button_bidding: I will participate in it - label_new_call: New call - label_user_information: My informations - - #Customer added!Added by nie - label_create_time: Created time - label_current_contributors: current contributors - #modify by men - label_x_current_contributors: - zero: current contributor - one: current contributor - other: current contributors - #end - label_lines_of_code: lines of code - label_since_last_commits: since last commit - label_users_on_trustie: User - label_front: first page - label_commit_on: commit times - #modify by men - label_x_commit_on: - zero: commit time - one: commit time - other: commit times - #end - label_follow_people: following # modified by bai - #modify by men - label_x_follow_people: - zero: Follower - one: Follower - other: Followers - #end - label_member_since: joined - label_contribute_to: Participates %{project_count} projects: - #modify by men - label_x_contribute_to: - zero: Participates %{count} project: - one: Participates %{count} project: - other: Participates %{count} projects: - #end - label_total_commit: Totally %{total_commit} commits # modified by bai - #modify by men - label_x_total_commit: - zero: Totally %{count} commit - one: Totally %{count} commit - other: Totally %{count} commits - #end - label_upload_profile: Upload avatar - label_type_as: Type as - label_status_as: Status as - label_priority_as: Priority as - label_member_list: Member list - label_author_name: Posted by %{author_name} - label_comments_count: (%{count} comments) - label_post_on: posts on - label_find_all_comments: view all comments - label_updated_time_on: " Updated on %{value} " - label_call_list: Calls list - - label_requirement_list: Requirement list - label_x_biding_project: #modify by men - zero: project - one: project - other: projects - #end - label_x_responses: #modify by men - zero: comment - one: comment - other: comments - #end - label_x_followers: #modified by men - zero: Follower - one: Follower - other: Followers - #end - - - - label_price: price: - label_RMB_sign: ¥ - label_investment_budget: Investment budget: - label_investment_time_limit: Investment time limit: - label_my_respond: Feedbacks: # modified by bai - label_respond_requirement: has commented this call - label_deadline: deadline yyyy-mm-dd - label_requirement_name: give your requirement a name ~~ - label_requirement_description: content:descript your requirement - label_requirement_bargain_money: type in your rewards(ex. money, reward, grade) - label_wrong_budget: The error format of money - label_wrong_date: wrong date format, input right date yyyy-mm-dd - button_upload_photo: Upload photo - label_leave_me_message: left a message to me - label_leave_others_message: leave message to him/her - label_leave_a_message: Leave him/her a message: - label_leave_your_message: Leave a message to you - label_new_activities: ' has new activity in' # modified by bai - label_new_activity: ' has new activity in' - label_i_new_activity: ' have new activity in' - label_create_project: had participated in - label_praise: praise - label_cancel_praise: cancel praise - label_bid_reason: Please show your reason - default_tracker_task: Task - label_create_new_projects_description: Create a new project, you will open a magical journey of collaborative creation and development! - label_call_for_bids_description: Publish your call for anything, feel the excitement of hundreds respond to a single call! - label_create_course_description: Create a new course, let us share the public resources in the course community which are more than you can imagine! - label_news: News - label_news_description: Track the latest activities of projects, and obtain the latest information! - label_milestone: Milestone - label_milestone_description: Review the commits, branches and versions of your project! - label_features: Features - label_has_praisers: praisers(%{count}) - label_has_watchers: following(%{count}) # modified by bai - label_has_fans: followed by(%{count}) # modified by bai - #modify by men - label_x_has_fans: - zero: fan(%{count}) - one: fan(%{count}) - other: fans(%{count}) - #end - label_me: me - label_my: my - label_i: I - label_join_bidding: joined the bidding - label_bidding_user: Bidding user: - label_bidding_reason: Bidding reason: - label_username: username: - label_password: password: - label_about_requirement: about requirement: - label_about_issue: about issue: - label_quote_my_words: ' quoted my words' - label_have_respond: had a respond - label_welcome: Welcome - - label_goto: Go to>> - label_join: join Trustie! - label_repository_new: link to existing SVN repository - label_repository_path: path of repository - label_repository_new_repos: create a new repository - label_repository_no: have no repository? - label_welcome_page_to: Participate %{project_count} projects! - label_repository_path_not_null: repository path can't be null - label_password_not_null: password can't be blank - label_exist_repository_path: Define exist repository's path of URL and format must be file:///, http://, https://, svn:// - label_project_no_activity: The project has no activities now! - label_follow_no_requirement: You don't have followed any requirements! - label_no_user_respond_you: There is no respond for you! - label_tags_issue: issue: - label_tags_project_name: Project name: - label_tags_project_description: Project description: - label_tags_user_mail: User E-mail: - label_tags_user_name: User Name: - label_tags_numbers: Tag numbers: - label_max_number: Open label nickname is displayed on the web site of your,Must be at most 25 characters long. - label_all_revisions: All revisions: - label_repository_name: Repository name - label_upassword_info: The password can be shared in the group - label_how_commit_code: How to commit code: - label_how_commit_code_chinese: Chinese - label_welcome_leave_message: Hi!The platform is currently in beta version.If you have any comments and suggestions, please - label_welcome_click_me: Click me - label_issue_praise: Good question,praise! - label_issue_tread: Poor question,tread! - label_issue_praise_over: Praised over! - label_issue_tread_over: Treaded over! - label_issue_appraise_over: Appraised over! - label_welcome_my_respond: Please leave your comments and suggestions here! - label_no_current_fans: the user has no fans now - label_no_current_watchers: the user hasn't watched others - label_project_tool_response: Response - label_course_feedback: Feedback - label_tags_search_result: Search Results - label_active_call: call - label_tags_call: Calls - label_user_extensions: Other information - label_boy: Man - label_girl: Woman - field_gender: Gender - field_birthday: Birthday - field_brief_introduction: Info - field_location: Location - field_occupation: Position - field_work_experience: Work experience(year) - field_zip_code: Zip code - label_reward: reward: - label_credit: credit: - label_choose_reward: choose reward - label_money: money - label_reward_1: others - label_bids_credit: credit - label_bids_credit_number: points - field_budget: reward - field_deadline: deadline - label_tags_selected: Selected Tags - label_tags_related: Related Tags - button_project_tags_add: Add - label_issue_query_condition: Query condition - label_homework_source: Task - label_issue_query: Query - label_issue_cancel_query: Cancel query - field_reward_type: The type of reward - label_tags_no: no tags now! - label_bid_publish: published - label_bid_project: projects - label_project_no_follow: The project hasn't been followed now! - label_no_bid_project: has no participate project - label_bids_reward_method: Reward: - label_bids_reward_what: input what for reward - label_call_bonus: bonus - label_bids_form_new_description: Publish a requirement,a competition or a course work. - label_bids_new_money: input the award money,such as 500,2.5 etc. - label_bids_new_credit: input the work corresponding course credits,such as 3,2.5 etc. - label_bids_new_content: input the award content,such as certificate,things etc. - label_user_login_tips: You havn't logged in,for leaving message please login first - label_user_login_new: login - label_project_sort: the way of sorting - #modified by bai - label_sort_by_time: sorted by time - label_sort_by_active: sorted by active - label_sort_by_influence: sorted by influence - #end - label_bids_published: published - label_bids_published_ago: ago - label_welcome_trustie: Trustie - label_welcome_trustie_project: Online projects hosting platform - label_welcome_trustie_course: Online Courses practice platform - label_welcome_trustie_contest: Online Contests practice platform - label_welcome_trustie_project_description: Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange. - label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research. - label_welcome_trustie_contest_description: Software for Chinese college students and practitioners to provide social-oriented contest management, code hosting, resource sharing, cooperation and exchange. - label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs. - label_user_project: Projects - label_bid_respond_quote: Respond - label_bid_if_agreement: If you like me, please press me #bai - label_bid_respond_delete: Delete - label_newfeedback_message: messages - label_newfeedback_quote: Respond - label_newfeedback_delete: Delete - label_user_all_activity: All activities - label_user_activity_myself: About me - label_user_all_respond: All replies - label_layouts_feedback: Messages - label_have_feedback: Have - label_of_feedback: Of - label_welcome_participate: participates - #modify by men - label_x_welcome_participate: - zero: participate - one: participate - other: participates - #end - label_welcome_participate_project: projects - label_projects_feedback: responded to the project - label_projects_feedback_respond: Respond - label_projects_feedback_respond_success: Respond success - button_projects_feedback_respond: Respond - label_projects_feedback_respond_content: Please input your words - label_in_issues: in the issue: - label_in_bids: in the call: - label_in_users: in the user: - label_user_create_project: has created - -#added by bai - label_identity: Identity - label_teacher: Teacher - label_student: Student - label_school_all: Schools - label_school_not_fount: Not found by your input query condition. - label_other: Other - label_gender: Gender - label_gender_male: male - label_gender_female: female - label_location: Location -#end - label_course: Course - label_course_new: New course - label_public_info: "If you don't choose public, only the project's members can see the project." - label_course_public_info: "If you don't choose public, only the course's members can see the course." - label_course_student: Student - label_homework: Task - label_course_new_homework: New homework - label_course_homework_list: Homework List - label_course_homework_new: new homework - - label_x_course_data: - zero: File - one: File - other: Files - - label_x_base_courses_student: - zero: student - one: students - other: students - label_x_base_courses_teacher: - zero: teacher - one: teachers - other: teachers - #add by men - label_brief_introduction: Personality words - label_technical_title: Title - label_technicl_title_professor: Professor - label_technicl_title_associate_professor: Associate professor - label_technicl_title_lecturer: Lecturer - label_technicl_title_teaching_assistant: Teaching assistant - label_account_identity_teacher: Teacher - label_account_identity_student: Student - label_account_identity_developer: Developer - label_account_identity_enterprise: Enterprise - label_account_identity_choose: --Please choose your identity-- - label_enter_college: College Entrance - lable_enter_enterprise: Enterprise Entrance - label_homework_info: Status - label_question_student: Feedback - label_student_response: Feedback - label_my_question: Please raise your questions here! - label_teacher_homework: "Teacher's name" - label_course_homework: Corresponding courses - label_course_done: finished courses - label_course_doing: Doing course - label_limit_time: Deadline - label_commit_homework: Submitted Task - label_no_course_project: No submitted work! - button_clear_requirement: Cancel -#end - label_x_bids_responses: #modify by huang - zero: response - one: response - other: responses - #end - label_teaching_course: My Courses - label_release_homework: Released Tasks - label_term: Term - label_spring: spring term - label_summer: summer term - label_autumn: autumn term - label_winter: winter term - text_command: The password is required when applying a course, and it will be released by the teacher of. - label_enterprise_into: Enterprise Entrance - label_college_into: College Entrance - label_user_course: Courses - label_new_course: Courses - field_tea_name: Teacher - label_course_college: College - label_x_task: - zero: Task - one: Task - other: Tasks - label_project_course_unadd: You have no course,creat one now! - label_my_create_honework_no_homework: no task now! - label_my_homework_no_homework: no task now! - label_x_member: - zero: member - one: member - other: members - label_x_data: - zero: file - one: file - other: files - label_bid_show_course_name: Course - label_bid_show_teacher_name: Teacher - label_bid_contest_show_course_name: Course - label_bid_contest_show_teacher_name: Teacher - label_x_homework_project: - zero: submitted task - one: submitted task - other: submitted tasks - label_new_homework: Tasks - label_new_contest: Contests - label_contest_list: Contests list - label_newtype_contest: Release contest - label_question_requirement: introduce a question! - label_contest_requirement: has commented this contest - button_bidding_homework: To take part in contest - label_bids_form_contest_new_description: Enterprise or college can release a contest here. - label_contest_name: Input the name of the contest - label_contest_description: Content:description your contest - label_main_teacher: Main teacher - label_main_term: Term - label_teacher_work_unit: Position - label_course_overview: Status - label_course_file: File - label_stores_index: Resource search - label_course_news: News - #wang - label_contest_userresponse: Userresponse - label_contest_joincontest: Joincontest - label_contest_notification: Notification - #end - label_x_base_courses_member: - zero: member - one: member - other: members - - label_bids_task_list: Tasks list - label_join_course: join course - label_exit_course: exit course - label_new_join: Join - label_new_join_order: Please input the course order. - label_homeworks_form_new_description: Release a task,the submit form of the task may be accessory or project,setting in the task form. - label_course_settings: Setting - field_homework_type: Submit form - label_task_submit_form_accessory: Submitted as accessory - label_task_submit_form_project: Submitted as project - label_news_notice: Release course news - - role_of_course: Role - label_student: student - label_teacher: teacher - label_ta: teacher assistant - label_in_course: in course - label_assign_homework: assigned homewok - label_noawards: No awards - label_user_location: Location - label_requirement_enterprise: Requirements - label_requirement_enterprise_list: Requirements List - label_contest_innovate: Competition community - label_software_user: Users - label_course_practice: Courses - label_course_all: Teacher - label_teacher_all: Student - label_user_home: User Space - - field_hidden_repo: code protected - label_newbie_faq: newbie FAQ - label_hot_project: 'HOT Projects' - label_memo_create_succ: Memo was successfully created. - label_memo_create_fail: Memo was failures created. - label_forum_create_succ: Forum was successfully created. - label_forum_create_fail: Forum was failures created. - label_forum_edit: Editing forum - label_memo_create: publish - label_memo_new: new memo - label_memo_edit: edit memo - label_project_module_forums: Forums - label_forum: Forum - label_tags_forum_description: Forum description - label_tags_forum: Call forum - label_memo_locked: 'Topic is locked' - label_downloads_list: enter file list. - label_sumbit_empty: search bar need container. - label_reply_empty: Reply Cann't Empty. - label_setup_time: Start date - label_endup_time: Over date - label_class_period: Class hour - label_class_hour: period - label_activity_time: publish date - - label_your_course: your course - label_have_message : have a new message - label_login_prompt: Email/NickName - :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_my_question: My-question - label_my_feedback: My-feedback - label_release_time: Release-time - label_question_sponsor: Sponsor - label_final_reply: Final-reply - label_reply: Reply - label_weixin: WeiXin - label_search_intimation: please input the keywords - label_work_quantity: work - label_projects_management_platform: Projects-platform - label_courses_management_platform: Courses-platform - label_contests_management_platform: Competitions-platform - label_contest_work: Competition work - label_contests_reward_method: Reward method - label_attendingcontestwork_developers: Developers - label_attendingcontestwork_release_time: Release time - label_attendingcontestwork_belongs_contest: Contesting - label_attendingcontestwork_belongs_type: Work-type - label_attendingcontestwork_release_person: Release person - label_attendingcontestwork_adaptive_system: Adaptive-system - label_attendingcontestwork_download: Work download - label_attendingcontestwork_average_scores: Average score - label_attendingcontestwork_deposit_project: Deposit project - label_attendingcontestwork_sorting_intimation: You can re-scoring, but just record the last scoring result! - - label_upload_files: Files-upload - label_upload_softwarepackage: Softwarepackage-upload - label_upload_cuttingphoto: Photo-upload - label_system_platform: Platform - label_nextstep: Next - label_participate: Participate - label_setting: Setting - label_contest_project: Competition-project - label_contest_softapplication: Competition-application - label_contest_response: Feedback - label_contest_watchers: Watchers - label_contest_work: Competition-work - button_contesting_as_project: Competition(New-project) - button_contesting_as_application: Competition(Release-app) - label_release_softapplication: Release-application - label_upload_softapplication_packets: Upload-apppacket - label_upload_softapplication_photo: Upload-appphoto - label_upload_softapplication_packets_mustpacketed: Works code and ralated-document must be packaged before upload. - label_upload_softapplication_photo_condition: Need upload 0~4 works screenshot, each is less than 5M, photo format such as gif,jpg,png etc. - label_updated_caution: Note:if you edit the work, the uploaded screenshot and package will be deleted, please re-load! - label_softapplication_name: App-name - label_work_name: Work name - label_softapplication_description: App-description - label_work_description: Work description - label_work_scores: Work score - label_work_rating: Work rating - label_work_tishi: You can re-scoring, but just record the last scoring result! - label_work_scores_proportion: Score porportion - label_softapplication_type: App-type - label_work_type: Work type - label_work_photo: Work photo - label_work_comment: Work comment - label_softapplication_version_available: Version - label_running_platform: Running platform - label_softapplication_developer: Upload person - label_softapplication_developers: Developers - label_work_deposit_project_url: Deposit url - label_work_deposit_project: Deposit project - label_softapplication_name_condition: Less than 50 characters - label_softapplication_description_condition: Less than 250 characters - label_user_login_softapplication_board: You are not logged in, please log in and then participate in the evaluation! - label_user_login_attending_contest: You are not logged in, please log in and then join the competition! - label_contest_description_no: No description - label_no_contest_softapplication: No application - label_button_ok: Ok - label_tags_contest: Competition tag - label_final_scores: Final scores - label_rating_person_amount: Rating person - label_tags_contest_description: Contest description - label_release_add_contest_succeed: The application succeed released and added! - label_add_contest_succeed_fail: Added fails, the application has been joined the competition! - label_no_ftapplication: No application - label_edit_softapplication: Edit application - label_edit_work: Edit work - label_contest_delete: Delete contest - label_noawards_current: No awards - label_softapplication: Application software - label_attending_contest: Joining - label_new_attendingcontest_work: New competition work - label_workname_lengthlimit: Less than 50 characters - label_workdescription_lengthlimit: Less than 250 characters - label_please_input_password: Please input the competition password! - label_please_select_project: Please select the project! - label_upload_softworkpacket_photo: Upload work package and screenshots - label_reward: Reward - label_please_select_contestingsoftapplication: Please select the competition application! - label_attendingcontest_time: Join-contest time - label_attendingcontest_spoksman: Join-contest representive - label_wellmeaning_intimation_contentone: Note:if you are ready attenging contest, please click"New competition work"! - label_wellmeaning_intimation_contenttwo: if you have already completed the development, and just release your work, you can not select"Deposit project"! - label_wellmeaning_intimation_contentthree: if you want to deposit the competition data and code, and want to keep track of the development and code-submission,please selcet a created project from"Deposit project", if you have no project, please click"New project"! - - notice_attendingcontest_work_successfully_created: Congratulations, competition work successfully created! - notice_softapplication_was_successfully_updated: Congratulations, competition work successfully updated! - - label_contest_notification: Notice - lable_contest_user: Release person - label_contest_innovate_community: Competition community - - label_user_login_score_and_comment: You are not logged in, please log in and then score and comment the work! - label_user_login_notificationcomment: You are not logged in, please log in and then comment the notification! - label_contest_work_list: Competition work list - - - label_borad_project: Project-borad - label_search_intimation: please input the searching keywords! - label_update_time: Update time - label_project_notice: release the notice - label_no_file_uploaded: No file uploaded - label_forum_new: New forum - label_memo_new_from_forum: Release memo - - label_user_grade: Individual score - label_active_homework: homework - label_course_term: Semester - label_comment_time: Comment time - label_bidding_user_studentcode: Student ID - - label_organizers: Organizer - label_organizers_information: National Key Laboratory of Parallel and Distributed Processing, NUDT - label_organizers_information_institute: Department of Computer Sciencer and Technology - label_copyright: Copyright - label_contact_us: Contact us - label_record: 湘ICP备09019772 - label_check_comment: Check comment - label_notification: Notification -#end - - # ajax异步验证 - modal_valid_passing: can be used. diff --git a/config/locales/zh.yml b/config/locales/zh.yml index daf356e7d..65dc9eef3 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -630,7 +630,7 @@ zh: #by huang # modified by bai label_college: 高校进入 label_enter_college: 进入高校 - label_enterprise: 企业进入 + #label_enterprise: 企业进入 lable_enter_enterprise: 进入企业 label_term: 开课学期 label_spring: 春季学期 @@ -1557,7 +1557,7 @@ zh: label_welcome_page_to: 参与了 %{project_count} 个项目! label_repository_path_not_null: 库路径 不能为空字符 label_password_not_null: 密码不能设置为空。 - label_exist_repository_path: 定义已有版本库URL路径,定义格式file:///, http://, https://, svn:// + label_exist_repository_path: 定义已有版本库URL路径,定义格式file://, http://, https://, svn:// label_project_no_activity: 该项目暂无动态! label_course_homework_un: 暂未发布任何作业 label_follow_no_requirement: 暂未关注任何需求! @@ -1975,7 +1975,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, 每张小于5M label_updated_caution: 注意:若编辑参赛作品,则之前上传的软件包和截图都将被删除,请重新上传! label_softapplication_name: 应用名称 label_work_name: 作品名称 @@ -2016,6 +2016,7 @@ zh: label_contest_work_list: 参赛作品列表 label_attending_contest: 我要参赛 label_contest_notification: 竞赛通知 + label_company_name: 企业名 label_coursefile_sharingarea: 课程资源共享区 label_sort_by_activity: 按动态数排序 diff --git a/config/routes.rb b/config/routes.rb index af70b76da..1e75ac23a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -83,6 +83,10 @@ RedmineApp::Application.routes.draw do end end + #resources :notificationcomments do + # + #end + #resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy] # match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post # match '/contestnotifications/:id/notificationcomments/:notificationcomment_id', :to => 'notificationcomments#destroy', :via => :delete @@ -91,7 +95,9 @@ RedmineApp::Application.routes.draw do resources :contests, only: [:index] do resources :contestnotifications do # get 'preview', on: :collection - resources :notificationcomments + resources :notificationcomments do + + end end collection do diff --git a/db/migrate/20140801034242_change_boards_name.rb b/db/migrate/20140801034242_change_boards_name.rb new file mode 100644 index 000000000..3f4593710 --- /dev/null +++ b/db/migrate/20140801034242_change_boards_name.rb @@ -0,0 +1,20 @@ +# -*coding:utf-8 -*- +class ChangeBoardsName < ActiveRecord::Migration + def up + boards = Board.where("project_id <> -1 and name like '%课程讨论区%'") + boards.each do |board| + board.name = "项目讨论区" + board.description = "项目讨论区" + board.save(:validate => false) + end + end + + def down + boards = Board.where("project_id <> -1 and name like '%项目讨论区%'") + boards.each do |board| + board.name = " 课程讨论区" + board.description = " 课程讨论区" + board.save(:validate => false) + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 72e6ccba9..292ca9d05 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 => 20140730024419) do +ActiveRecord::Schema.define(:version => 20140801034242) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -177,6 +177,58 @@ ActiveRecord::Schema.define(:version => 20140730024419) do add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + end + + create_table "code_review_user_settings", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "mail_notification", :default => 0, :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "code_reviews", :force => true do |t| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + create_table "comments", :force => true do |t| t.string "commented_type", :limit => 30, :default => "", :null => false t.integer "commented_id", :default => 0, :null => false @@ -795,18 +847,18 @@ ActiveRecord::Schema.define(:version => 20140730024419) do create_table "relative_memos", :force => true do |t| t.integer "osp_id" t.integer "parent_id" - t.string "subject", :null => false - t.text "content", :null => false + t.string "subject", :null => false + t.text "content", :limit => 16777215, :null => false t.integer "author_id" - t.integer "replies_count", :default => 0 + t.integer "replies_count", :default => 0 t.integer "last_reply_id" - t.boolean "lock", :default => false - t.boolean "sticky", :default => false - t.boolean "is_quote", :default => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.integer "viewed_count_crawl", :default => 0 - t.integer "viewed_count_local", :default => 0 + t.boolean "lock", :default => false + t.boolean "sticky", :default => false + t.boolean "is_quote", :default => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.integer "viewed_count_crawl", :default => 0 + t.integer "viewed_count_local", :default => 0 t.string "url" t.string "username" t.string "userhomeurl" @@ -880,10 +932,11 @@ ActiveRecord::Schema.define(:version => 20140730024419) do t.string "url" t.string "title" t.integer "share_type" - 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 "project_id" t.integer "user_id" + t.string "description" end create_table "softapplications", :force => true do |t| @@ -989,8 +1042,8 @@ ActiveRecord::Schema.define(:version => 20140730024419) do t.integer "zip_code" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.integer "identity" t.string "technical_title" + t.integer "identity" t.string "student_id" t.string "teacher_realname" t.string "student_realname" @@ -1048,9 +1101,6 @@ ActiveRecord::Schema.define(:version => 20140730024419) do t.integer "active" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false - t.integer "level" - t.integer "file" - t.integer "issue" end create_table "user_statuses", :force => true do |t| diff --git a/lib/tasks/project_score.rake b/lib/tasks/project_score.rake new file mode 100644 index 000000000..5a1f7955f --- /dev/null +++ b/lib/tasks/project_score.rake @@ -0,0 +1,17 @@ +# -*coding:utf-8 -*- +desc "project score Initialize" +task :project_score do + puts "project_score sync." +end + +namespace :project_score do + desc "calculating first page" + task :calculate => :environment do + include ProjectScoreHelper + Project.where("project_type != 1").all.each do |project| + result = project_scores(project) + puts "score of #{project.name} is #{result}" + end + puts "calculate completed" + end +end \ No newline at end of file diff --git a/plugins/redmine_code_review/app/controllers/code_review_controller.rb b/plugins/redmine_code_review/app/controllers/code_review_controller.rb index 33f5a203a..83a2602fd 100644 --- a/plugins/redmine_code_review/app/controllers/code_review_controller.rb +++ b/plugins/redmine_code_review/app/controllers/code_review_controller.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class CodeReviewController < ApplicationController + layout "project_base" unloadable before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 3a6c53223..9baa5526c 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -489,6 +489,7 @@ color: #000000; margin-bottom: 30px; border-right:1px solid #C6E9F1; overflow:auto; + word-wrap:break-word; /*by young*/ -moz-box-shadow:#C6E9F1 1px 1px 2px; -webkit-box-shadow:2px 2px 0px -2px #C6E9F1; @@ -903,6 +904,7 @@ hr p { font-size: 13px; + word-break: break-all; /*position: static;/*gcm*/ } /*end*/ @@ -1068,10 +1070,10 @@ overflow: hidden; .information { margin-top: 20px; - margin-left: 607px; + margin-left: 690px; float: left; height: auto; - width: 300px; + width: 280px; font-family: '微软雅黑',helvetica,arial,sans-serif; /*modify by men*/ color: rgb(0, 0, 0); font-size: 13px; @@ -1230,7 +1232,7 @@ p.stats { .licences { float: left; height: 18px; - width: 260px; + width: 200px; font-size: 13px; font-family: '微软雅黑',helvetica,arial,sans-serif; /*modify by men*/ line-height: 18px;