Merge branch 'szzh' into develop
This commit is contained in:
commit
d66dc65cca
137
ReadMe.txt
137
ReadMe.txt
|
@ -1,65 +1,72 @@
|
|||
===================================[2014-04-09]=================================
|
||||
kw: 域名, 二级域名, subdomain, forge, course, contest
|
||||
域名跳转(forge/course/contest)这几个设置在settings.yml中
|
||||
但是跳转在development模式下会导致无法开发
|
||||
|
||||
app/models/setting.rb :165
|
||||
# fixed domain url in development. tantantan's bug
|
||||
if Rails.env.development?
|
||||
methods.map do |m|
|
||||
define_singleton_method m do; nil; end if m.to_s =~ /([a-zA-Z]+_domain)$/
|
||||
end
|
||||
end
|
||||
程序部分链接中制定了subdomain参数,使链接在二级域名中来回跳转。
|
||||
为了开发方便,使之功能在development模式下失效。
|
||||
|
||||
|
||||
===================================[2014-04-09]=================================
|
||||
kw: 菜单, 导航栏, layout
|
||||
网页上方的导航条没有用Redmine::MenuManager
|
||||
MenuManager的样式无法定制,菜单显示条件if中的proc执行行为没有了解
|
||||
|
||||
#导航栏匹配域名显示和改变
|
||||
app\helper\application_helper.rb
|
||||
render_dynamic_nav 方法中,利用变量,可以设置在layout中具体显示哪些条目
|
||||
|
||||
app\views\layouts\_base_header.html.erb
|
||||
需要显示的条目,由具体的实例变量设置(在各个layout中)
|
||||
|
||||
|
||||
===================================[2014-04-09]=================================
|
||||
kw: home_path, 首页, 跳转, 二级域名, welcome
|
||||
#首页根据域名匹配进入不同的页面
|
||||
app\controller\welcome_controller.rb
|
||||
#entry_select 放射设置二级域名所显示的首页
|
||||
|
||||
|
||||
|
||||
===================================[2014-06-06]=================================
|
||||
kw: user_scores
|
||||
user_scores表结构有问题,需要运行
|
||||
bundle exec rake db:migrate:down VERSION=20140410021724
|
||||
bundle exec rake db:migrate:up VERSION=20140410021724
|
||||
|
||||
|
||||
|
||||
===================================[2014-07-08]=================================
|
||||
kw: CKEditor, 富文本, 编辑器
|
||||
CKEditor插件加载方法
|
||||
1.把插件文件夹拷入plugins文件夹,确保文件夹名为redmine_ckeditor
|
||||
2.运行 bundle install --without development test
|
||||
3.运行 rake redmine:plugins:migrate RAILS_ENV=production
|
||||
4.启动服务器
|
||||
5.配置CKEditor插件(Administration > Plugins > Configure)
|
||||
6.把文本格式 (Administration > Settings > General > Text formatting)改为CKEditor
|
||||
注意:一定要先配置CKEditor插件再见文本格式更改,不然,数据库不会生成对应记录,会报错。。
|
||||
|
||||
|
||||
|
||||
===================================[2014-07-19]=================================
|
||||
kw: 首页, 定制, forge, course, contest, 排序
|
||||
若遇到首页定制报错问题请尝试如下操作
|
||||
如果运行迁移文件有报错与‘sort_type’相关 先运行 bundle exec rake db:migrate:down version=20140716021202 bundle exec rake db:migrate:up version=20140716021202
|
||||
在按如下步骤执行,未报与之相关的则直接按如下步骤执行
|
||||
1.运行 bundle exec rake db:migrate:down version=20140719080032
|
||||
2.运行 bundle exec rake db:migrate:up version=20140719080032
|
||||
===================================[2014-04-09]=================================
|
||||
kw: 域名, 二级域名, subdomain, forge, course, contest
|
||||
域名跳转(forge/course/contest)这几个设置在settings.yml中
|
||||
但是跳转在development模式下会导致无法开发
|
||||
|
||||
app/models/setting.rb :165
|
||||
# fixed domain url in development. tantantan's bug
|
||||
if Rails.env.development?
|
||||
methods.map do |m|
|
||||
define_singleton_method m do; nil; end if m.to_s =~ /([a-zA-Z]+_domain)$/
|
||||
end
|
||||
end
|
||||
程序部分链接中制定了subdomain参数,使链接在二级域名中来回跳转。
|
||||
为了开发方便,使之功能在development模式下失效。
|
||||
|
||||
|
||||
===================================[2014-04-09]=================================
|
||||
kw: 菜单, 导航栏, layout
|
||||
网页上方的导航条没有用Redmine::MenuManager
|
||||
MenuManager的样式无法定制,菜单显示条件if中的proc执行行为没有了解
|
||||
|
||||
#导航栏匹配域名显示和改变
|
||||
app\helper\application_helper.rb
|
||||
render_dynamic_nav 方法中,利用变量,可以设置在layout中具体显示哪些条目
|
||||
|
||||
app\views\layouts\_base_header.html.erb
|
||||
需要显示的条目,由具体的实例变量设置(在各个layout中)
|
||||
|
||||
|
||||
===================================[2014-04-09]=================================
|
||||
kw: home_path, 首页, 跳转, 二级域名, welcome
|
||||
#首页根据域名匹配进入不同的页面
|
||||
app\controller\welcome_controller.rb
|
||||
#entry_select 放射设置二级域名所显示的首页
|
||||
|
||||
|
||||
|
||||
===================================[2014-06-06]=================================
|
||||
kw: user_scores
|
||||
user_scores表结构有问题,需要运行
|
||||
bundle exec rake db:migrate:down VERSION=20140410021724
|
||||
bundle exec rake db:migrate:up VERSION=20140410021724
|
||||
|
||||
|
||||
|
||||
===================================[2014-07-08]=================================
|
||||
kw: CKEditor, 富文本, 编辑器
|
||||
CKEditor插件加载方法
|
||||
1.把插件文件夹拷入plugins文件夹,确保文件夹名为redmine_ckeditor
|
||||
2.运行 bundle install --without development test
|
||||
3.运行 rake redmine:plugins:migrate RAILS_ENV=production
|
||||
4.启动服务器
|
||||
5.配置CKEditor插件(Administration > Plugins > Configure)
|
||||
6.把文本格式 (Administration > Settings > General > Text formatting)改为CKEditor
|
||||
注意:一定要先配置CKEditor插件再见文本格式更改,不然,数据库不会生成对应记录,会报错。。
|
||||
|
||||
|
||||
|
||||
===================================[2014-07-19]=================================
|
||||
kw: 首页, 定制, forge, course, contest, 排序
|
||||
若遇到首页定制报错问题请尝试如下操作
|
||||
如果运行迁移文件有报错与‘sort_type’相关
|
||||
先运行 bundle exec rake db:migrate:down version=20140716021202 bundle exec rake db:migrate:up version=20140716021202
|
||||
在按如下步骤执行,未报与之相关的则直接按如下步骤执行
|
||||
1.运行 bundle exec rake db:migrate:down version=20140719080032
|
||||
2.运行 bundle exec rake db:migrate:up version=20140719080032
|
||||
===================================[2014-07-30]=================================
|
||||
kw: 首页, 定制, forge, course, contest, 排序,image_width
|
||||
|
||||
undefined image_width 问题
|
||||
bundle exec rake db:migrate:down version=20140725062302
|
||||
bundle exec rake db:migrate:up version=20140725062302
|
||||
|
|
|
@ -153,6 +153,8 @@ class AdminController < ApplicationController
|
|||
@first_page.image_width = params[:image_width]
|
||||
@first_page.image_height = params[:image_height]
|
||||
@first_page.sort_type = params[:sort_type]
|
||||
@first_page.show_course = params[:show_course]
|
||||
@first_page.show_contest = params[:show_contest]
|
||||
if @first_page.save
|
||||
respond_to do |format|
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
|
|
|
@ -41,6 +41,7 @@ class ApplicationController < ActionController::Base
|
|||
cookies.delete(autologin_cookie_name)
|
||||
end
|
||||
|
||||
before_filter :find_first_page
|
||||
before_filter :session_expiration, :user_setup, :check_if_login_required, :set_localization
|
||||
before_filter :user_agent
|
||||
|
||||
|
@ -720,4 +721,11 @@ class ApplicationController < ActionController::Base
|
|||
raise RuntimeError, 'unknow type, Please input you type into this helper.'
|
||||
end
|
||||
end
|
||||
|
||||
#查找首页相关信息
|
||||
def find_first_page
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
@show_course = @first_page.show_course
|
||||
@show_contest = @first_page.show_contest
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,6 +26,7 @@ class AttachmentsController < ApplicationController
|
|||
accept_api_auth :show, :download, :upload
|
||||
require 'iconv'
|
||||
|
||||
|
||||
def show
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
|
@ -41,6 +42,13 @@ class AttachmentsController < ApplicationController
|
|||
render :action => 'diff'
|
||||
elsif @attachment.is_text? && @attachment.filesize <= Setting.file_max_size_displayed.to_i.kilobyte
|
||||
@content = File.new(@attachment.diskfile, "rb").read
|
||||
# 编码为非 UTF-8先进行间接转码
|
||||
# 部分unicode编码不直接支持转为 UTF-8
|
||||
# modify by nwb
|
||||
if @content.encoding.name != 'UTF-8'
|
||||
@content = @content.force_encoding('GBK')
|
||||
@content = @content.encode('UTF-8')
|
||||
end
|
||||
render :action => 'file'
|
||||
else
|
||||
download
|
||||
|
@ -173,8 +181,11 @@ class AttachmentsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
# modify by nwb
|
||||
if !@attachment.container.nil? && (@attachment.container.is_a?(Course) || @attachment.container.course)
|
||||
if @course.nil?
|
||||
if !@attachment.container.nil? &&
|
||||
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) ||@attachment.container.has_attribute?(:course_id) ) && @attachment.container.course ) )
|
||||
if @attachment.container.is_a?(News)
|
||||
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
||||
elsif @course.nil?
|
||||
format.html { redirect_to_referer_or forum_memo_path(@attachment.container.forum, @attachment.container) }
|
||||
else
|
||||
format.html { redirect_to_referer_or course_path(@course) }
|
||||
|
@ -206,6 +217,17 @@ class AttachmentsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#删除竞赛作品的附件
|
||||
def delete_softapplications
|
||||
@attachment = Attachment.find params[:id]
|
||||
@softapplication = @attachment.container if @attachment!=nil
|
||||
@attachment.container.attachments.delete(@attachment) if @attachment!=nil
|
||||
respond_to do |format|
|
||||
format.html { redirect_to_referer_or edit_softapplication_path(@softapplication) }
|
||||
#format.js
|
||||
end
|
||||
end
|
||||
|
||||
def autocomplete
|
||||
# modify by nwb
|
||||
if params[:project_id]
|
||||
|
@ -233,6 +255,9 @@ class AttachmentsController < ApplicationController
|
|||
attach_copied_obj.container = obj
|
||||
attach_copied_obj.created_on = Time.now
|
||||
attach_copied_obj.author_id = User.current.id
|
||||
if attach_copied_obj.attachtype == nil
|
||||
attach_copied_obj.attachtype = 1
|
||||
end
|
||||
@obj = obj
|
||||
@save_flag = attach_copied_obj.save
|
||||
@save_message = attach_copied_obj.errors.full_messages
|
||||
|
@ -262,6 +287,9 @@ class AttachmentsController < ApplicationController
|
|||
attach_copied_obj.container = obj
|
||||
attach_copied_obj.created_on = Time.now
|
||||
attach_copied_obj.author_id = User.current.id
|
||||
if attach_copied_obj.attachtype == nil
|
||||
attach_copied_obj.attachtype = 4
|
||||
end
|
||||
@obj = obj
|
||||
@save_flag = attach_copied_obj.save
|
||||
@save_message = attach_copied_obj.errors.full_messages
|
||||
|
|
|
@ -7,6 +7,9 @@ class BidsController < ApplicationController
|
|||
menu_item :project, :only => [:show_project,:show_results, :new_submit_homework]
|
||||
menu_item :homework_respond, :only => :homework_respond
|
||||
menu_item :homework_statistics, :only => :homework_statistics
|
||||
|
||||
before_filter :can_show_course,only: []
|
||||
before_filter :can_show_contest,only: []
|
||||
#Ended by young
|
||||
before_filter :find_bid, :only => [:show, :show_project, :create,:destroy,:more,:back,:add,:delete,:new,:show_results,:set_reward, :add_homework, :fork, :create_fork,
|
||||
:show_course, :show_courseEx,:show_bid_project, :show_bid_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings]
|
||||
|
@ -983,5 +986,21 @@ class BidsController < ApplicationController
|
|||
render_403 unless currentUser.member_of_course?(@bid.courses.first)
|
||||
end
|
||||
|
||||
#验证是否显示课程
|
||||
def can_show_course
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
if @first_page.show_course == 2
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
#验证是否显示竞赛
|
||||
def can_show_contest
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
if @first_page.show_contest == 2
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@ class ContestsController < ApplicationController
|
|||
menu_item :application, :only => :show_softapplication
|
||||
menu_item :attendingcontests, :only => :show_attendingcontest
|
||||
menu_item :contestnotifications, :only => :index
|
||||
|
||||
before_filter :can_show_contest,except: []
|
||||
before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :index, :set_reward_project, :set_reward_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward,
|
||||
:show_contest_project, :show_contest_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings]
|
||||
|
||||
|
@ -27,8 +29,9 @@ class ContestsController < ApplicationController
|
|||
# @contests = Contest.visible
|
||||
# @contests ||= []
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
@contests = Contest.visible
|
||||
@contests = @contests.like(params[:name]) if params[:name].present?
|
||||
#@contests = Contest.visible
|
||||
#@contests = @contests.like(params[:name]) if params[:name].present?
|
||||
@contests = Contest.visible.where("name like '%#{params[:name]}%'")
|
||||
if params[:contests_search]
|
||||
(redirect_to contests_path, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||
end
|
||||
|
@ -645,5 +648,13 @@ end
|
|||
render_404
|
||||
end
|
||||
|
||||
#验证是否显示竞赛
|
||||
def can_show_contest
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
if @first_page.show_contest == 2
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ class CoursesController < ApplicationController
|
|||
menu_item l(:label_sort_by_active), :only => :index
|
||||
menu_item l(:label_sort_by_influence), :only => :index
|
||||
|
||||
before_filter :can_show_course, :except => []
|
||||
before_filter :find_course, :except => [ :index, :search,:list, :new,:join,:unjoin, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches]
|
||||
before_filter :authorize_course, :only => [:show, :settings, :edit, :update, :modules, :close, :reopen, :view_homework_attaches, :course]
|
||||
before_filter :authorize_course_global, :only => [:view_homework_attaches, :new,:create]
|
||||
|
@ -494,7 +495,7 @@ class CoursesController < ApplicationController
|
|||
if (User.current.logged? && User.current.member_of_course?(Course.find params[:id] ))
|
||||
render :layout => 'base_courses'
|
||||
else
|
||||
render_404
|
||||
render_403
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -711,7 +712,13 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
#验证是否显示课程
|
||||
def can_show_course
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
if @first_page.show_course == 2
|
||||
render_404
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ class HomeworkAttachController < ApplicationController
|
|||
layout "course_base"
|
||||
include CoursesHelper
|
||||
###############################
|
||||
before_filter :can_show_course,except: []
|
||||
#判断当前角色权限时需先找到当前操作的project
|
||||
before_filter :find_course_by_bid_id, :only => [:new]
|
||||
before_filter :find_course_by_hoemwork_id, :only => [:edit,:update,:destroy,:show,:add_homework_users,:destory_homework_users]
|
||||
|
@ -352,5 +353,13 @@ class HomeworkAttachController < ApplicationController
|
|||
}
|
||||
end
|
||||
end
|
||||
|
||||
#验证是否显示课程
|
||||
def can_show_course
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
if @first_page.show_course == 2
|
||||
render_404
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
class MessagesController < ApplicationController
|
||||
menu_item :boards
|
||||
default_search_scope :messages
|
||||
before_filter :find_board, :only => [:new, :preview]
|
||||
before_filter :find_board, :only => [:new, :preview,:edit]
|
||||
before_filter :find_attachments, :only => [:preview]
|
||||
before_filter :find_message, :except => [:new, :preview]
|
||||
before_filter :authorize, :except => [:preview, :edit, :destroy, :new]
|
||||
|
@ -85,7 +85,7 @@ class MessagesController < ApplicationController
|
|||
@reply.board = @board
|
||||
@reply.safe_attributes = params[:reply]
|
||||
@topic.children << @reply
|
||||
@topic.update_attribute(:updated_on, Time.now)
|
||||
#@topic.update_attribute(:updated_on, Time.now)
|
||||
if !@reply.new_record?
|
||||
call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply})
|
||||
attachments = Attachment.attach_files(@reply, params[:attachments])
|
||||
|
@ -107,7 +107,15 @@ class MessagesController < ApplicationController
|
|||
flash[:notice] = l(:notice_successful_update)
|
||||
@message.reload
|
||||
redirect_to board_message_path(@message.board, @message.root, :r => (@message.parent_id && @message.id))
|
||||
elsif request.get?
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
layout_file = @project ? 'base_projects' : 'base_courses'
|
||||
render :layout => layout_file
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# Delete a messages
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
class ProjectsController < ApplicationController
|
||||
layout :select_project_layout
|
||||
|
||||
menu_item :overview
|
||||
menu_item :roadmap, :only => :roadmap
|
||||
menu_item :settings, :only => :settings
|
||||
|
@ -102,6 +103,8 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def index
|
||||
#调用存储过程更新提交次数
|
||||
ActiveRecord::Base.connection.execute("CALL sp_project_status_cursor();")
|
||||
#Modified by nie
|
||||
@project_type = params[:project_type].to_i
|
||||
per_page_option = 10
|
||||
|
@ -149,6 +152,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
@projects = @projects.offset(@project_pages.offset).limit(@project_pages.per_page)
|
||||
|
||||
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => 'base'
|
||||
|
@ -447,24 +451,10 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@project_type = params[:project_type] ||= params[:course]
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
|
||||
case @project_type
|
||||
when '0' # Project
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
when '1' # Course
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
@course_tag = params[:course]
|
||||
@course = Course.new
|
||||
@course.safe_attributes = params[:course]
|
||||
else # default Project
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
end
|
||||
@project = Project.new
|
||||
@project.safe_attributes = params[:project]
|
||||
render :layout => 'base'
|
||||
end
|
||||
|
||||
|
@ -478,128 +468,43 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
|
||||
@course_tag = params[:project][:project_type]
|
||||
if(@course_tag=="1")
|
||||
if User.current.user_extensions.identity#.include?(UserExtensions::TEACHER,UserExtensions::DEVELOPER)
|
||||
@course = Course.new
|
||||
@course.extra='course' + DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d_%H-%M-%S').to_s
|
||||
@course.safe_attributes = params[:project][:course]
|
||||
@course.tea_id = User.current.id
|
||||
# added by bai
|
||||
@course.term = params[:term]
|
||||
@course.time = params[:time]
|
||||
#@course.school_id = params[:occupation]
|
||||
@course.school_id = User.current.user_extensions.school_id
|
||||
@course.setup_time = params[:setup_time]
|
||||
@course.endup_time = params[:endup_time]
|
||||
@course.class_period = params[:class_period]
|
||||
end
|
||||
end
|
||||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@project = Project.new
|
||||
@project.user_id = User.current.id
|
||||
@project.dts_test = params[:project][:dts_test]
|
||||
@project.safe_attributes = params[:project]
|
||||
if @course_tag == '1'
|
||||
@project.identifier = @course.extra
|
||||
end
|
||||
if @course_tag == '1'
|
||||
if User.current.user_extensions.identity == 0
|
||||
if@course.save
|
||||
if validate_parent_id && @project.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
# Add current user as a project member if he is not admin
|
||||
unless User.current.admin?
|
||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||
m = Member.new(:user => User.current, :roles => [r])
|
||||
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
|
||||
user_grades = UserGrade.create(:user_id => User.current.id, :project_id => @project.id)
|
||||
if params[:project][:is_public] == '1'
|
||||
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :grade => 0, :project_type => @course_tag)
|
||||
end
|
||||
@project.members << m
|
||||
@project.project_infos << project
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
if params[:continue]
|
||||
attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}
|
||||
redirect_to new_project_path(attrs, :course => '0')
|
||||
#Added by young
|
||||
|
||||
elsif params[:course_continue]
|
||||
redirect_to new_project_path(:course => '1')
|
||||
#Ended by young
|
||||
else
|
||||
redirect_to settings_project_path(@project,:project_type => 1)
|
||||
end
|
||||
}
|
||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) }
|
||||
end
|
||||
if validate_parent_id && @project.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
# Add current user as a project member if he is not admin
|
||||
#unless User.current.admin?
|
||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||
m = Member.new(:user => User.current, :roles => [r])
|
||||
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)
|
||||
Rails.logger.debug "ProjectStatus created: #{project_status.to_json}"
|
||||
end
|
||||
@project.members << m
|
||||
@project.project_infos << project_info
|
||||
#end
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
if params[:continue]
|
||||
attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}
|
||||
redirect_to new_project_path(attrs, :course => '0')
|
||||
else
|
||||
@course.destroy
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base'}#Added by young
|
||||
format.api { render_validation_errors(@project) }
|
||||
end
|
||||
redirect_to settings_project_path(@project)
|
||||
end
|
||||
else
|
||||
if validate_parent_id && @project.save
|
||||
@project.delete
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base'}#Added by young
|
||||
format.api { render_validation_errors(@project) }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base'}#Added by young
|
||||
format.api { render_validation_errors(@project) }
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) }
|
||||
end
|
||||
else
|
||||
#@project.memberships.create
|
||||
if validate_parent_id && @project.save
|
||||
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
||||
# Add current user as a project member if he is not admin
|
||||
#unless User.current.admin?
|
||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||
m = Member.new(:user => User.current, :roles => [r])
|
||||
project = ProjectInfo.new(:user_id => User.current.id, :project_id => @project.id)
|
||||
user_grades = UserGrade.create(:user_id => User.current.id, :project_id => @project.id)
|
||||
if params[:project][:is_public] == '1' || @course_tag=="1"
|
||||
project_status = ProjectStatus.create(:project_id => @project.id, :watchers_count => 0, :changesets_count => 0, :project_type => @project.project_type)
|
||||
end
|
||||
@project.members << m
|
||||
@project.project_infos << project
|
||||
#end
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
if params[:continue]
|
||||
attrs = {:parent_id => @project.parent_id}.reject {|k,v| v.nil?}
|
||||
redirect_to new_project_path(attrs, :course => '0')
|
||||
#Added by young
|
||||
|
||||
elsif params[:course_continue]
|
||||
redirect_to new_project_path(:course => '1')
|
||||
#Ended by young
|
||||
else
|
||||
redirect_to settings_project_path(@project)
|
||||
end
|
||||
}
|
||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'projects', :action => 'show', :id => @project.id) }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base'}#Added by young
|
||||
format.api { render_validation_errors(@project) }
|
||||
end
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html { render :action => 'new', :layout => 'base'}#Added by young
|
||||
format.api { render_validation_errors(@project) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -833,7 +738,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def update
|
||||
@project.safe_attributes = params[:project]
|
||||
@project.dts_test = params[:project][:dts_test]
|
||||
#@project.dts_test = params[:project][:dts_test]
|
||||
if validate_parent_id && @project.save
|
||||
@course = Course.find_by_extra(@project.identifier)
|
||||
unless @course.nil?
|
||||
|
|
|
@ -172,8 +172,8 @@ class SoftapplicationsController < ApplicationController
|
|||
# PUT /softapplications/1.json
|
||||
def update
|
||||
# @softapplication = Softapplication.find(params[:id])
|
||||
@softapplication.attachments.map{|attach| attach.destroy }
|
||||
@softapplication.save_attachments(params[:attachments])
|
||||
#@softapplication.attachments.map{|attach| attach.destroy }
|
||||
@softapplication.save_attachments(params[:attachments]) if params[:attachments]
|
||||
#@softapplication.deposit_project = params[:project]
|
||||
@softapplication.project = Project.find_by_id(params[:project])
|
||||
|
||||
|
@ -304,6 +304,36 @@ class SoftapplicationsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def search
|
||||
@softapplications = Softapplication.where("name like '%#{params[:name]}%'")
|
||||
|
||||
#new added fenyefunction
|
||||
@limit = 5
|
||||
@softapplication_count = @softapplications.count
|
||||
@softapplication_pages = Paginator.new @softapplication_count, @limit, params['page']
|
||||
@offset ||= @softapplication_pages.offset
|
||||
|
||||
#new added sort
|
||||
if params[:softapplication_sort_type].present?
|
||||
case params[:softapplication_sort_type]
|
||||
when '0'
|
||||
@softapplications = @softapplications[@offset, @limit]
|
||||
@s_state = 0
|
||||
when '1'
|
||||
@softapplications = @softapplications.sort { |x, y| y[:created_at] <=> x[:created_at]}[@offset, @limit]
|
||||
@s_state = 1
|
||||
end
|
||||
else
|
||||
@softapplications = @softapplications.sort { |x, y| y[:created_at] <=> x[:created_at]}[@offset, @limit]
|
||||
@s_state = 1
|
||||
end
|
||||
#new added end
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def find_softapplication
|
||||
@softapplication = Softapplication.find_by_id(params[:id])
|
||||
|
|
|
@ -71,8 +71,8 @@ class TagsController < ApplicationController
|
|||
@projects_results,
|
||||
@issues_results,
|
||||
@bids_results,
|
||||
@forums_results,
|
||||
attachments_results,
|
||||
@forums_results,
|
||||
@attachments_results,
|
||||
@contests_results,
|
||||
@courses_results,
|
||||
@open_source_projects_results= refresh_results(@obj_id,@obj_flag,@selected_tags)
|
||||
|
@ -107,8 +107,8 @@ class TagsController < ApplicationController
|
|||
@projects_results,
|
||||
@issues_results,
|
||||
@bids_results,
|
||||
@forums_results,
|
||||
attachments_results,
|
||||
@forums_results,
|
||||
@attachments_results,
|
||||
@contests_results,
|
||||
@courses_results,
|
||||
@open_source_projects_results= refresh_results(@obj_id,@show_flag)
|
||||
|
@ -130,8 +130,8 @@ class TagsController < ApplicationController
|
|||
@projects_results,
|
||||
@issues_results,
|
||||
@bids_results,
|
||||
@forums_results,
|
||||
attachments_results,
|
||||
@forums_results,
|
||||
@attachments_results,
|
||||
@contests_results,
|
||||
@courses_results,
|
||||
@open_source_projects_results= refresh_results(@obj_id,@show_flag)
|
||||
|
@ -199,7 +199,7 @@ class TagsController < ApplicationController
|
|||
@bids_results = nil
|
||||
@contests_results = nil
|
||||
@forums_results = nil
|
||||
attachments_results = nil
|
||||
@attachments_results = nil
|
||||
@open_source_projects_results = nil
|
||||
@obj_pages = nil
|
||||
@obj = nil
|
||||
|
@ -228,8 +228,9 @@ class TagsController < ApplicationController
|
|||
|
||||
# modifed by Long Jun
|
||||
# this is used to find the attachments that came from the same project and tagged with the same tag.
|
||||
@result = get_attachments_by_project_tag(selected_tags, @obj)
|
||||
@obj_pages, attachments_results, @results_count = for_pagination(@result)
|
||||
#@result = get_attachments_by_project_tag(selected_tags, @obj)
|
||||
@result = get_attachments_by_tag(selected_tags)
|
||||
@obj_pages, @attachments_results, @results_count = for_pagination(@result)
|
||||
when '7'
|
||||
@obj = Contest.find_by_id(obj_id)
|
||||
@obj_pages,@contests_results,@results_count = for_pagination(get_contests_by_tag(selected_tags))
|
||||
|
@ -249,8 +250,8 @@ class TagsController < ApplicationController
|
|||
@projects_results,
|
||||
@issues_results,
|
||||
@bids_results,
|
||||
@forums_results,
|
||||
attachments_results,
|
||||
@forums_results,
|
||||
@attachments_results,
|
||||
@contests_results,
|
||||
@courses_results,
|
||||
@open_source_projects_results]
|
||||
|
|
|
@ -29,7 +29,7 @@ class UsersController < ApplicationController
|
|||
|
||||
#Ended by young
|
||||
|
||||
|
||||
before_filter :can_show_course, :only => [:user_courses,:user_homeworks]
|
||||
before_filter :require_admin, :except => [:show, :index, :search, :tag_save, :tag_saveEx,:user_projects, :user_newfeedback, :user_comments, :watch_bids, :watch_contests, :info,
|
||||
:user_watchlist, :user_fanslist,:update, :user_courses, :user_homeworks, :watch_projects, :show_score, :topic_score_index, :project_score_index,
|
||||
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
||||
|
@ -41,6 +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
|
||||
accept_api_auth :index, :show, :create, :update, :destroy,:tag_save , :tag_saveEx
|
||||
|
||||
#william
|
||||
|
@ -54,6 +55,7 @@ class UsersController < ApplicationController
|
|||
include AvatarHelper
|
||||
include WordsHelper
|
||||
include GitlabHelper
|
||||
include UserScoreHelper
|
||||
|
||||
# added by liuping 关注
|
||||
|
||||
|
@ -263,9 +265,6 @@ class UsersController < ApplicationController
|
|||
sort_init 'login', 'asc'
|
||||
sort_update %w(login firstname lastname mail admin created_on last_login_on)
|
||||
|
||||
# Deprecation
|
||||
@project_type = params[:project_type]
|
||||
|
||||
case params[:format]
|
||||
when 'xml', 'json'
|
||||
@offset, @limit = api_offset_and_limit({:limit => 15})
|
||||
|
@ -274,16 +273,9 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
# retrieve all users
|
||||
scope = UserStatus.visible
|
||||
|
||||
# if role has something, change scope.
|
||||
case params[:role]
|
||||
when 'teacher'
|
||||
scope = UserStatus.teacher
|
||||
when 'student'
|
||||
scope = UserStatus.student
|
||||
else
|
||||
end
|
||||
# 先内连一下statuses 保证排序之后数量一致
|
||||
scope = User.visible.
|
||||
joins("INNER JOIN user_statuses ON users.id = user_statuses.user_id")
|
||||
|
||||
# unknow
|
||||
scope = scope.in_group(params[:group_id]) if params[:group_id].present?
|
||||
|
@ -295,25 +287,32 @@ class UsersController < ApplicationController
|
|||
# users classify
|
||||
case params[:user_sort_type]
|
||||
when '0'
|
||||
# 创建时间排序
|
||||
@s_type = 0
|
||||
@us_ordered = scope.
|
||||
joins("LEFT JOIN users ON user_statuses.user_id = users.id").
|
||||
reorder('users.created_on DESC')
|
||||
@users = scope.reorder('users.created_on DESC')
|
||||
when '1'
|
||||
# 活跃度排序, 就是所谓的得分情况
|
||||
@s_type = 1
|
||||
@us_ordered = scope.reorder('user_statuses.grade DESC')
|
||||
@users = scope.
|
||||
joins("LEFT JOIN user_scores ON users.id = user_scores.user_id").
|
||||
reorder('user_scores.active DESC')
|
||||
when '2'
|
||||
# 粉丝数排序
|
||||
@s_type = 2
|
||||
@us_ordered = scope.reorder('user_statuses.watchers_count DESC')
|
||||
@users = scope.
|
||||
#joins("INNER JOIN user_statuses ON users.id = user_statuses.user_id").
|
||||
reorder('user_statuses.watchers_count DESC')
|
||||
|
||||
else
|
||||
# 默认活跃度排序
|
||||
@s_type = 1
|
||||
@us_ordered = scope.reorder('user_statuses.grade DESC')
|
||||
@users = scope.
|
||||
joins("LEFT JOIN user_scores ON users.id = user_scores.user_id").
|
||||
reorder('user_scores.active DESC')
|
||||
end
|
||||
|
||||
# limit and offset
|
||||
@users_statuses = @us_ordered.offset(@user_pages.offset).limit(@user_pages.per_page)
|
||||
# get users ActiveRecord
|
||||
@users = @users_statuses.includes(:user).map(&:user)
|
||||
@users = @users.limit(@user_pages.per_page).offset(@user_pages.offset)
|
||||
|
||||
@user_base_tag = params[:id] ? 'base_users':'users_base'
|
||||
respond_to do |format|
|
||||
|
@ -784,4 +783,25 @@ class UsersController < ApplicationController
|
|||
redirect_to my_account_path
|
||||
end
|
||||
end
|
||||
|
||||
#重置用户得分
|
||||
def rest_user_score
|
||||
memo_num(@user)
|
||||
messges_for_issue_num(@user)
|
||||
issues_status_num(@user)
|
||||
replay_for_memo_num(@user)
|
||||
tread_num(@user)
|
||||
praise_num(@user)
|
||||
changeset_num(@user)
|
||||
document_num(@user)
|
||||
|
||||
end
|
||||
|
||||
#验证是否显示课程
|
||||
def can_show_course
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
if @first_page.show_course == 2
|
||||
render_404
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,12 +18,14 @@
|
|||
class WelcomeController < ApplicationController
|
||||
include ApplicationHelper
|
||||
include WelcomeHelper
|
||||
|
||||
caches_action :robots
|
||||
# before_filter :fake, :only => [:index, :course]
|
||||
before_filter :entry_select, :only => [:index]
|
||||
|
||||
def index
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
#@show_course = @first_page.show_course
|
||||
if @first_page.nil? || @first_page.sort_type.nil?
|
||||
@projects = find_miracle_project(10, 3,"grade desc")
|
||||
else
|
||||
|
@ -146,16 +148,27 @@ class WelcomeController < ApplicationController
|
|||
private
|
||||
# 判断网站的入口,是课程 course 则跳过index去渲染 course 方法
|
||||
def entry_select
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
url = request.original_url
|
||||
if url.include?("course.trustie.net")
|
||||
course
|
||||
render :course
|
||||
if url.include?(Setting.host_course)
|
||||
if @first_page.show_course == 1
|
||||
course
|
||||
render :course
|
||||
else
|
||||
render_404
|
||||
end
|
||||
|
||||
return 0
|
||||
elsif url.include?("contest.trustie.net")
|
||||
contest
|
||||
render :contest
|
||||
elsif url.include?(Setting.host_contest)
|
||||
if @first_page.show_contest == 1
|
||||
contest
|
||||
render :contest
|
||||
else
|
||||
render_404
|
||||
end
|
||||
|
||||
return 0
|
||||
elsif url.include?("user.trustie.net")
|
||||
elsif url.include?(Setting.host_user)
|
||||
redirect_to(:controller => "users", :action => "index")
|
||||
end
|
||||
|
||||
|
|
|
@ -68,6 +68,10 @@ module ApplicationHelper
|
|||
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller] || params[:controller], options[:action])
|
||||
end
|
||||
|
||||
def link_to_if_authorized_course(name, options = {}, html_options = nil, *parameters_for_method_reference)
|
||||
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for_course(options[:controller] || params[:controller], options[:action])
|
||||
end
|
||||
|
||||
def link_to_if_authorized_contest(name, options = {}, html_options = nil, *parameters_for_method_reference)
|
||||
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for_contest(options[:controller] || params[:controller], options[:action])
|
||||
end
|
||||
|
@ -823,8 +827,11 @@ module ApplicationHelper
|
|||
def select_option_helper option
|
||||
tmp = Hash.new
|
||||
tmp={"" => ""}
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.id
|
||||
if option.nil?
|
||||
else
|
||||
option.each do |project|
|
||||
tmp[project.name] = project.id
|
||||
end
|
||||
end
|
||||
tmp
|
||||
end
|
||||
|
@ -1168,25 +1175,27 @@ module ApplicationHelper
|
|||
objects = objects.first
|
||||
end
|
||||
# end
|
||||
objects = objects.map {|o| o.is_a?(String) ? instance_variable_get("@#{o}") : o}.compact
|
||||
errors = objects.map {|o| o.errors.full_messages}.flatten
|
||||
if errors.any?
|
||||
html << "<div id='errorExplanation'><ul>\n"
|
||||
errors.each do |error|
|
||||
if objects != nil
|
||||
objects = objects.map {|o| o.is_a?(String) ? instance_variable_get("@#{o}") : o}.compact
|
||||
errors = objects.map {|o| o.errors.full_messages}.flatten
|
||||
if errors.any?
|
||||
html << "<div id='errorExplanation'><ul>\n"
|
||||
errors.each do |error|
|
||||
###by xianbo
|
||||
if(error!=l(:label_repository_path_not_null))
|
||||
html << "<li>#{h error}</li>\n"
|
||||
end
|
||||
###xianbo
|
||||
end
|
||||
###by xianbo
|
||||
if(error!=l(:label_repository_path_not_null))
|
||||
html << "<li>#{h error}</li>\n"
|
||||
unless params[:repository].nil?
|
||||
if params[:repository][:upassword]==""
|
||||
html << "<li>"+ l(:label_password_not_null) +"</li>\n"
|
||||
end
|
||||
end
|
||||
###xianbo
|
||||
html << "</ul></div>\n"
|
||||
end
|
||||
###by xianbo
|
||||
unless params[:repository].nil?
|
||||
if params[:repository][:upassword]==""
|
||||
html << "<li>"+ l(:label_password_not_null) +"</li>\n"
|
||||
end
|
||||
end
|
||||
###xianbo
|
||||
html << "</ul></div>\n"
|
||||
end
|
||||
html.html_safe
|
||||
end
|
||||
|
@ -1729,18 +1738,18 @@ module ApplicationHelper
|
|||
|
||||
#@nav_dispaly_project_label
|
||||
nav_list = Array.new
|
||||
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label
|
||||
nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label
|
||||
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label
|
||||
nav_list.push(school_all_school_link) if @nav_dispaly_course_all_label && @show_course == 1
|
||||
nav_list.push(course_all_course_link) if @nav_dispaly_course_all_label && @show_course == 1
|
||||
nav_list.push(course_teacher_all_link) if @nav_dispaly_teacher_all_label && @show_course == 1
|
||||
|
||||
nav_list.push(main_project_link) if @nav_dispaly_main_project_label
|
||||
nav_list.push(main_course_link) if @nav_dispaly_main_course_label
|
||||
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label
|
||||
nav_list.push(main_course_link) if @nav_dispaly_main_course_label && @show_course == 1
|
||||
nav_list.push(main_contest_link) if @nav_dispaly_main_contest_label && @show_contest == 1
|
||||
|
||||
nav_list.push(courses_link) if @nav_dispaly_course_label
|
||||
nav_list.push(courses_link) if @nav_dispaly_course_label && @show_course == 1
|
||||
nav_list.push(projects_link) if @nav_dispaly_project_label
|
||||
nav_list.push(users_link) if @nav_dispaly_user_label
|
||||
nav_list.push(contest_link) if @nav_dispaly_contest_label
|
||||
nav_list.push(contest_link) if @nav_dispaly_contest_label && @show_contest == 1
|
||||
nav_list.push(bids_link) if @nav_dispaly_bid_label
|
||||
nav_list.push(forum_link) if @nav_dispaly_forum_label
|
||||
nav_list.push(stores_link) if @nav_dispaly_store_all_label
|
||||
|
|
|
@ -87,8 +87,9 @@ module AttachmentsHelper
|
|||
@project_id = obj.container_id
|
||||
|
||||
end
|
||||
Attachment.tagged_with(tag_name).order('created_on desc').where("(container_id = :project_id and container_type = 'Project') or
|
||||
attachments = Attachment.tagged_with(tag_name).order('created_on desc').where("(container_id = :project_id and container_type = 'Project') or
|
||||
(container_id in (select id from versions where project_id =:project_id) and container_type = 'Version')", {:project_id => @project_id})
|
||||
return attachments
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -408,19 +408,47 @@ module UserScoreHelper
|
|||
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
|
||||
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
|
||||
|
||||
end
|
||||
|
||||
#更新对缺陷留言数
|
||||
def update_messges_for_issue(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
option_number.messages_for_issues = Journal.includes(:user).where("user_id = '#{user.id}'").all.count
|
||||
option_number.messages_for_issues = Journal.includes(:user).where("user_id = '#{user.id}' and notes != '' and notes is not null").all.count
|
||||
update_score(option_number)
|
||||
end
|
||||
|
||||
def messges_for_issue_num(user,project=nil)
|
||||
if project.nil?
|
||||
Journal.includes(:user).where("user_id = '#{user.id}' and notes != '' and notes is not null").all.count
|
||||
else
|
||||
Journal.includes(:user).joins(:issue).where("#{Journal.table_name}.user_id = '#{user.id}' and #{Issue.table_name}.project_id = '#{project.id}' and #{Journal.table_name}.notes != '' and #{Journal.table_name}.notes is not null").all.count
|
||||
end
|
||||
end
|
||||
|
||||
#更新更改缺陷状态状态次数
|
||||
def update_issues_status(user,type)
|
||||
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
|
||||
update_score(option_number)
|
||||
end
|
||||
|
||||
def issues_status_num(user,project=nil)
|
||||
if project.nil?
|
||||
Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'status_id' 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 = 'status_id' and #{User.table_name}.id = '#{user.id}'").count
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#更新对留言的回复数量
|
||||
def update_replay_for_message(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
|
@ -428,13 +456,25 @@ module UserScoreHelper
|
|||
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
|
||||
end
|
||||
|
||||
#更新对帖子的回复数量
|
||||
def update_replay_for_memo(user,type)
|
||||
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 = 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
|
||||
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
|
||||
end
|
||||
|
||||
#更新被关注的人数
|
||||
def update_follow(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
|
@ -442,11 +482,15 @@ module UserScoreHelper
|
|||
update_score(option_number)
|
||||
end
|
||||
|
||||
def follow_num(user)
|
||||
Watcher.includes(:watchable).where("watchable_type = 'Principal' and watchable_id = '#{user.id}'").count
|
||||
end
|
||||
|
||||
#更新帖子踩各项数量
|
||||
def update_tread(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
option_number.tread = PraiseTread.where("praise_tread_object_type = 'Memo' || praise_tread_object_type = 'Message' and praise_or_tread = 0 and user_id = '#{user.id}'").all.count
|
||||
pts = PraiseTread.where("praise_tread_object_type = 'Memo' || praise_tread_object_type = 'Message' and praise_or_tread = 0").all
|
||||
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 = []
|
||||
|
@ -472,10 +516,64 @@ module UserScoreHelper
|
|||
update_score(option_number)
|
||||
end
|
||||
|
||||
def tread_num(user,project=nil)
|
||||
if project.nil?
|
||||
result0 = 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
|
||||
[:tread=>result0,:tead_by_one => result.count,:tread_by_two => result1.count,:tread_by_three =>result2.count]
|
||||
else
|
||||
result0 = 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
|
||||
if !(pt.praise_tread_object_type == "Issue" && obj.project.id == project.id) && !(pt.praise_tread_object_type == "Message" && obj.board.project.id == project.id)
|
||||
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
|
||||
[:tread=>result0,:tead_by_one => result.count,:tread_by_two => result1.count,:tread_by_three =>result2.count]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#更新帖子顶数量
|
||||
def update_praise(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
pts = PraiseTread.where("praise_tread_object_type = 'Memo' || praise_tread_object_type = 'Message' and praise_or_tread = 1").all
|
||||
pts = PraiseTread.where("praise_tread_object_type = 'Issue' || praise_tread_object_type = 'Message' and praise_or_tread = 1").all
|
||||
result = []
|
||||
result1 = []
|
||||
result2 = []
|
||||
|
@ -501,6 +599,58 @@ module UserScoreHelper
|
|||
update_score(option_number)
|
||||
end
|
||||
|
||||
def praise_num(user,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 = []
|
||||
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
|
||||
if !(pt.praise_tread_object_type == "Issue" && obj.project.id == project.id) && !(pt.praise_tread_object_type == "Message" && obj.board.project.id == project.id)
|
||||
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
|
||||
[:praise_by_one => result.count,:praise_by_two => result1.count,:praise_by_three => result2.count]
|
||||
else
|
||||
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
|
||||
[:praise_by_one => result.count,:praise_by_two => result1.count,:praise_by_three => result2.count]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#更新提交代码次数
|
||||
def update_changeset(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
|
@ -508,6 +658,15 @@ module UserScoreHelper
|
|||
update_score(option_number)
|
||||
end
|
||||
|
||||
def changeset_num(user,project=nil)
|
||||
if project.nil?
|
||||
Changeset.includes(:user).where("user_id = '#{user.id}'").all.count
|
||||
else
|
||||
Changeset.includes(:user).joins(:repository).where("#{Changeset.table_name}.user_id = '#{user.id}' and #{Repository.table_name}.project_id = #{project.id}").all.count
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#更新文档提交次数
|
||||
def update_document(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
|
@ -515,12 +674,30 @@ module UserScoreHelper
|
|||
update_score(option_number)
|
||||
end
|
||||
|
||||
def document_num(user,project=nil?)
|
||||
if project.nil?
|
||||
Document.includes(:user).where("user_id = '#{user.id}'").all.count
|
||||
else
|
||||
Document.includes(:user,:project).where("user_id = '#{user.id}' and project_id = '#{project.id}'").all.count
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#更新附件提交数量
|
||||
def update_attachment(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
option_number.attachment = 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
|
||||
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)
|
||||
|
@ -529,10 +706,18 @@ module UserScoreHelper
|
|||
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
|
||||
end
|
||||
|
||||
#更新发布缺陷次数
|
||||
def update_post_issue(user,type)
|
||||
option_number = get_option_number(user,type)
|
||||
option_number.post_issue = 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
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ class Contest < ActiveRecord::Base
|
|||
has_many :contesting_projects, :dependent => :destroy
|
||||
has_many :projects, :through => :contesting_projects
|
||||
has_many :contesting_softapplications, :dependent => :destroy
|
||||
has_many :softapplications, :through => :contesting_softapplications
|
||||
has_many :softapplications, :through => :contesting_softapplications, :dependent => :destroy
|
||||
has_many :projects_member, :class_name => 'User', :through => :projects
|
||||
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
||||
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
||||
|
|
|
@ -3,7 +3,7 @@ class ContestingSoftapplication < ActiveRecord::Base
|
|||
attr_accessible :contest_id, :description, :softapplication_id, :user_id
|
||||
|
||||
belongs_to :contest
|
||||
belongs_to :softapplication
|
||||
belongs_to :softapplication, :dependent => :destroy
|
||||
belongs_to :user
|
||||
|
||||
|
||||
|
|
|
@ -79,6 +79,7 @@ class Issue < ActiveRecord::Base
|
|||
# fq
|
||||
after_create :act_as_activity,:be_user_score_new_issue
|
||||
after_update :be_user_score
|
||||
before_destroy :down_user_score
|
||||
# after_create :be_user_score
|
||||
# end
|
||||
|
||||
|
@ -1524,5 +1525,19 @@ class Issue < ActiveRecord::Base
|
|||
update_post_issue(self.author,1)
|
||||
end
|
||||
|
||||
def down_user_score
|
||||
#缺陷完成度更新
|
||||
if self.done_ratio_changed?
|
||||
UserScore.project(:update_issue_ratio, User.current,self,{ issue_id: self.id })
|
||||
#update_issue_done_ratio(User.current,1)
|
||||
end
|
||||
#缺陷状态更改
|
||||
if self.status_id_changed?
|
||||
#协同得分
|
||||
UserScore.joint(:change_issue_status, User.current,nil,self, {issue_id: self.id})
|
||||
#update_issues_status(self.author , 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
class IssueOverdue < ActiveRecord::Base
|
||||
#缺陷到期后发送邮件提示
|
||||
#只监听已经提交的未到期的缺陷,已过期的缺陷默认已经发过邮件通知,不再提醒。
|
||||
def self.mail_issue
|
||||
threads = []
|
||||
issues = Issue.where("done_ratio <> 100 and closed_on is null and due_date is not null")
|
||||
puts issues
|
||||
issues.each do |issue|
|
||||
thread = Thread.new do
|
||||
while true
|
||||
cur_issue = Issue.find issue.id
|
||||
if cur_issue.done_ratio == 100 || cur_issue.closed_on != nil
|
||||
break
|
||||
end
|
||||
if Time.now < Time.parse(cur_issue.due_date.to_s)
|
||||
#休眠一个小时。。。
|
||||
puts cur_issue.id.to_s
|
||||
sleep 5
|
||||
else
|
||||
#发邮件
|
||||
#puts "11" + issue.id.to_s
|
||||
#Mailer.issue_expire(issue).deliver
|
||||
Mailer.issue_add(issue).deliver
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
threads << thread
|
||||
end
|
||||
puts threads
|
||||
return threads
|
||||
end
|
||||
end
|
|
@ -48,9 +48,9 @@ class Journal < ActiveRecord::Base
|
|||
# fq
|
||||
after_create :act_as_activity,:be_user_score
|
||||
# end
|
||||
|
||||
#after_destroy :down_user_score
|
||||
#before_save :be_user_score
|
||||
#before_destroy :down_user_score
|
||||
before_destroy :down_user_score
|
||||
|
||||
scope :visible, lambda {|*args|
|
||||
user = args.shift || User.current
|
||||
|
@ -158,19 +158,20 @@ class Journal < ActiveRecord::Base
|
|||
|
||||
# 更新用户分数 -by zjc
|
||||
def be_user_score
|
||||
#新建了缺陷留言且留言不为空,不为空白
|
||||
#新建了缺陷留言且留言不为空,不为空白
|
||||
if !self.notes.nil? && self.notes.gsub(' ','') != ''
|
||||
#协同得分加分
|
||||
UserScore.joint(:post_issue_message, User.current,self.issue.author,self, { message_id: self.id })
|
||||
update_messges_for_issue(User.current,1)
|
||||
UserScore.joint(:post_issue_message, self.user,self.issue.author,self, { message_id: self.id })
|
||||
end
|
||||
#update_messges_for_issue(User.current,1)
|
||||
end
|
||||
# 减少用户分数 -by zjc
|
||||
def down_user_score
|
||||
#删除有效缺陷留言
|
||||
if !self.notes.nil? && self.notes.gsub(' ','') != ''
|
||||
#协同得分减分
|
||||
UserScore.joint(:delete_issue_message, User.current,self.issue.author, { message_id: self.id })
|
||||
UserScore.joint(:delete_issue_message, self.user,self.issue.author,self, { message_id: self.id })
|
||||
end
|
||||
#update_messges_for_issue(User.current,1)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,6 +20,8 @@ class JournalDetail < ActiveRecord::Base
|
|||
belongs_to :journal
|
||||
before_save :normalize_values
|
||||
after_create :be_user_score
|
||||
#after_destroy :down_user_score
|
||||
before_destroy :down_user_score
|
||||
private
|
||||
|
||||
def normalize_values
|
||||
|
@ -42,11 +44,24 @@ class JournalDetail < ActiveRecord::Base
|
|||
|
||||
def be_user_score
|
||||
#更新缺陷完成度
|
||||
if self.prop_key = 'done_ratio'
|
||||
update_issue_done_ratio(User.current,1)
|
||||
if self.prop_key == 'done_ratio'
|
||||
#update_issue_done_ratio(User.current,1)
|
||||
#更新缺陷状态
|
||||
elsif self.prop_key = 'status_id'
|
||||
update_issues_status(User.current , 1)
|
||||
elsif self.prop_key == 'status_id'
|
||||
#update_issues_status(User.current , 1)
|
||||
end
|
||||
end
|
||||
|
||||
#更新用户分数
|
||||
def down_user_score
|
||||
#update_issue_done_ratio(User.current,1)
|
||||
#update_issues_status(User.current , 1)
|
||||
|
||||
if self.prop_key == 'done_ratio'
|
||||
|
||||
#更新缺陷状态
|
||||
elsif self.prop_key == 'status_id'
|
||||
UserScore.joint(:delete_issue_status, self.journal.user,nil,self, {issue_id: self.id})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def self.remove_by_user? user
|
||||
if( self.user == user ||
|
||||
|
@ -87,6 +88,15 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
def reference_user
|
||||
User.find(reply_id)
|
||||
end
|
||||
|
||||
def delete_by_user?user
|
||||
# 用户可删除自己的留言
|
||||
if self.user.id == user.id || user.admin?
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
def self.reference_message(user_id)
|
||||
@user = User.find(user_id)
|
||||
|
|
|
@ -104,7 +104,7 @@ class Mailer < ActionMailer::Base
|
|||
message_id issue
|
||||
@author = issue.author
|
||||
@issue = issue
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue)
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id)
|
||||
recipients = issue.recipients
|
||||
cc = issue.watcher_recipients - recipients
|
||||
mail :to => recipients,
|
||||
|
@ -167,12 +167,6 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
#缺陷到期邮件通知
|
||||
def issue_expire issue
|
||||
#@issues = issues
|
||||
#s = l(:text_issue_expire,:issue => "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}")
|
||||
#puts s + "////" + issue.assigned_to.mail
|
||||
#@issues_url = url_for(:controller => 'issues', :action => 'show',:id => issue.id)
|
||||
#mail :to => issue.assigned_to.mail,
|
||||
# :subject => s
|
||||
issue_id = issue.project_index
|
||||
redmine_headers 'Project' => issue.project.identifier,
|
||||
'Issue-Id' => issue_id,
|
||||
|
@ -181,12 +175,34 @@ class Mailer < ActionMailer::Base
|
|||
message_id issue
|
||||
@author = issue.author
|
||||
@issue = issue
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue)
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id)
|
||||
recipients = issue.recipients
|
||||
cc = issue.watcher_recipients - recipients
|
||||
s = l(:text_issue_expire,:issue => "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}")
|
||||
mail :to => recipients,
|
||||
:cc => cc,
|
||||
:subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
||||
:subject => s
|
||||
#########################################################################################################
|
||||
#@issues = issues
|
||||
#s = l(:text_issue_expire,:issue => "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}")
|
||||
#puts s + "////" + issue.assigned_to.mail
|
||||
#@issues_url = url_for(:controller => 'issues', :action => 'show',:id => issue.id)
|
||||
#mail :to => issue.assigned_to.mail,
|
||||
# :subject => s
|
||||
#########################################################################################################
|
||||
#issue_id = issue.project_index
|
||||
#redmine_headers 'Project' => issue.project.identifier,
|
||||
# 'Issue-Id' => issue_id,
|
||||
# 'Issue-Author' => issue.author.login
|
||||
#redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
||||
#message_id issue
|
||||
#@author = issue.author
|
||||
#@issue = issue
|
||||
#@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue)
|
||||
#recipients = issue.recipients
|
||||
#cc = issue.watcher_recipients - recipients
|
||||
#mail :to => recipients,
|
||||
# :cc => cc,
|
||||
# :subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
||||
######################################################################################################
|
||||
end
|
||||
|
||||
|
||||
|
@ -566,34 +582,7 @@ class Mailer < ActionMailer::Base
|
|||
end
|
||||
end
|
||||
|
||||
#缺陷到期后发送邮件提示
|
||||
def mail_issue
|
||||
threads = []
|
||||
issues = Issue.where("done_ratio <> 100 && closed_on is null && due_date is not null")
|
||||
issues.each do |issue|
|
||||
thread = Thread.start do
|
||||
while true
|
||||
cur_issue = Issue.find issue.id
|
||||
if cur_issue.done_ratio == 100 || cur_issue.closed_on != nil
|
||||
break
|
||||
end
|
||||
if Time.now < Time.parse(cur_issue.due_date.to_s)
|
||||
#休眠一个小时。。。
|
||||
sleep 3600
|
||||
else
|
||||
#发邮件
|
||||
puts issue.id.to_s
|
||||
Mailer.issue_expire(issue).deliver
|
||||
#Mailer.issue_add(issue).deliver
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
threads << thread
|
||||
end
|
||||
puts threads.count.to_s
|
||||
threads
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ class Memo < ActiveRecord::Base
|
|||
"parent_id",
|
||||
"replies_count"
|
||||
|
||||
after_create :add_author_as_watcher, :reset_counters!,:be_user_score
|
||||
after_create :add_author_as_watcher, :reset_counters!#,:be_user_score -- 公共区发帖暂不计入得分
|
||||
# after_update :update_memos_forum
|
||||
after_destroy :reset_counters!
|
||||
after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分
|
||||
# after_create :send_notification
|
||||
# after_save :plusParentAndForum
|
||||
# after_destroy :minusParentAndForum
|
||||
|
@ -157,4 +157,10 @@ class Memo < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
#被删除时更新用户分数
|
||||
def down_user_score
|
||||
update_memo_number(User.current,1)
|
||||
update_replay_for_memo(User.current,1)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -59,12 +59,12 @@ class Message < ActiveRecord::Base
|
|||
|
||||
after_create :add_author_as_watcher, :reset_counters!
|
||||
after_update :update_messages_board
|
||||
after_destroy :reset_counters!
|
||||
after_destroy :reset_counters!#,:down_user_score
|
||||
|
||||
# fq
|
||||
after_create :act_as_activity,:be_user_score
|
||||
#before_save :be_user_score
|
||||
#before_destroy :down_user_score
|
||||
before_destroy :down_user_score
|
||||
# end
|
||||
|
||||
scope :visible, lambda {|*args|
|
||||
|
@ -149,23 +149,24 @@ class Message < ActiveRecord::Base
|
|||
#更新用户分数 -by zjc
|
||||
def be_user_score
|
||||
#新建message且无parent的为发帖
|
||||
if self.parent_id.nil?
|
||||
UserScore.joint(:post_message, User.current,nil,self, { message_id: self.id })
|
||||
update_memo_number(User.current,1)
|
||||
if self.parent_id.nil? && !self.board.project.nil?
|
||||
UserScore.joint(:post_message, self.author,nil,self, { message_id: self.id })
|
||||
#update_memo_number(User.current,1)
|
||||
#新建message且有parent的为回帖
|
||||
elsif !self.parent_id.nil?
|
||||
UserScore.joint(:reply_posting, User.current,self.parent.author,self, { message_id: self.id })
|
||||
update_replay_for_memo(User.current,1)
|
||||
elsif !self.parent_id.nil? && !self.board.project.nil?
|
||||
UserScore.joint(:reply_posting, self.author,self.parent.author,self, { message_id: self.id })
|
||||
#update_replay_for_memo(User.current,1)
|
||||
end
|
||||
end
|
||||
|
||||
#减少用户分数
|
||||
def down_user_score
|
||||
#删除发帖
|
||||
if self.parent_id.nil?
|
||||
UserScore.joint(:delete_message, User.current,nil, { message_id: self.id })
|
||||
#删除留言
|
||||
else
|
||||
UserScore.joint(:reply_deleting, User.current,self.parent.author, { message_id: self.id })
|
||||
if self.parent_id.nil? && !self.board.project.nil?
|
||||
UserScore.joint(:delete_message, self.author,nil,self, { message_id: self.id })
|
||||
elsif !self.parent_id.nil? && !self.board.project.nil?
|
||||
UserScore.joint(:reply_deleting, self.author,self.parent.author,self, { message_id: self.id })
|
||||
end
|
||||
#update_memo_number(User.current,1)
|
||||
#update_replay_for_memo(User.current,1)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -758,6 +758,7 @@ class Project < ActiveRecord::Base
|
|||
'tracker_ids',
|
||||
'issue_custom_field_ids',
|
||||
'project_type',
|
||||
'dts_test',
|
||||
'attachmenttype'
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@ class Softapplication < ActiveRecord::Base
|
|||
belongs_to :project
|
||||
has_many :contests, :through => :contesting_softapplications
|
||||
|
||||
validates_length_of :name, :maximum => 125
|
||||
validates_length_of :application_developers, :maximum => 125
|
||||
validates_length_of :android_min_version_available, :maximum => 125
|
||||
|
||||
def add_jour(user, notes, reference_user_id = 0, options = {})
|
||||
if options.count == 0
|
||||
self.journals_for_messages << JournalsForMessage.new(:user_id => user.id, :notes => notes, :reply_id => reference_user_id)
|
||||
|
|
|
@ -69,10 +69,11 @@ class UserScore < ActiveRecord::Base
|
|||
end
|
||||
create_score_changed_details({:current_user_id => current_user.id ,:score_type => "collaboration",:score_action => "post_message",:user_id => current_user.id,:old_score => user_score.collaboration - 2,:new_score => user_score.collaboration,:current_user_level => UserLevels.get_level(current_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} posting a message. options => (#{options.to_s})"
|
||||
#when :delete_message # current_user 删帖了 Delete Message
|
||||
# user_score.collaboration = user_score.collaboration.to_i - 2
|
||||
# user_score.save
|
||||
# Rails.logger.info "[UserScore#joint] ===> User: #{current_user} deleting a message. options => (#{options.to_s})"
|
||||
when :delete_message # current_user 删帖了 Delete Message
|
||||
user_score.collaboration = user_score.collaboration.to_i - 2
|
||||
user_score.save
|
||||
create_score_changed_details({:current_user_id => current_user.id ,:score_type => "collaboration",:score_action => "post_message",:user_id => current_user.id,:old_score => user_score.collaboration + 2,:new_score => user_score.collaboration,:current_user_level => UserLevels.get_level(current_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} deleting a message. options => (#{options.to_s})"
|
||||
when :post_issue_message # current_user 对 target_user 的缺陷留言了 Add Journal
|
||||
user_score.collaboration = user_score.collaboration.to_i + 1
|
||||
user_score.save
|
||||
|
@ -81,11 +82,12 @@ class UserScore < ActiveRecord::Base
|
|||
user_grade.save
|
||||
end
|
||||
create_score_changed_details({:current_user_id => current_user.id ,:target_user_id =>target_user.id, :score_type => "collaboration",:score_action => "post_issue_message",:user_id => current_user.id,:old_score => user_score.collaboration - 1,:new_score => user_score.collaboration,:current_user_level => UserLevels.get_level(current_user),:target_user_level => UserLevels.get_level(target_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} posting a issue. options => (#{options.to_s})"
|
||||
#when :delete_issue_message # current_user 删除了 对 target_user 的缺陷留言了 Delete Journal
|
||||
# user_score.collaboration = user_score.collaboration.to_i - 1
|
||||
# user_score.save
|
||||
# Rails.logger.info "[UserScore#joint] ===> User: #{current_user} deleting a issue. options => (#{options.to_s})"
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} posting a issue message. options => (#{options.to_s})"
|
||||
when :delete_issue_message # current_user 删除了 对 target_user 的缺陷留言了 Delete Journal
|
||||
user_score.collaboration = user_score.collaboration.to_i - 1
|
||||
user_score.save
|
||||
create_score_changed_details({:current_user_id => current_user.id ,:target_user_id =>target_user.id, :score_type => "collaboration",:score_action => "delete_issue_message",:user_id => current_user.id,:old_score => user_score.collaboration + 1,:new_score => user_score.collaboration,:current_user_level => UserLevels.get_level(current_user),:target_user_level => UserLevels.get_level(target_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} deleting a issue message. options => (#{options.to_s})"
|
||||
when :change_issue_status # current_user 更改了缺陷的状态 Changed Issue
|
||||
user_score.collaboration = user_score.collaboration.to_i + 1
|
||||
user_score.save
|
||||
|
@ -95,6 +97,11 @@ class UserScore < ActiveRecord::Base
|
|||
end
|
||||
create_score_changed_details({:current_user_id => current_user.id , :score_type => "collaboration",:score_action => "change_issue_status",:user_id => current_user.id,:old_score => user_score.collaboration - 1,:new_score => user_score.collaboration,:current_user_level => UserLevels.get_level(current_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} change issue status. options => (#{options.to_s})"
|
||||
when :delete_issue_status
|
||||
user_score.collaboration = user_score.collaboration.to_i - 1
|
||||
user_score.save
|
||||
create_score_changed_details({:current_user_id => current_user.id , :score_type => "collaboration",:score_action => "delete_issue_status",:user_id => current_user.id,:old_score => user_score.collaboration + 1,:new_score => user_score.collaboration,:current_user_level => UserLevels.get_level(current_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} delete issue status. options => (#{options.to_s})"
|
||||
when :reply_message # current_user 对 target_user 留言的回复 Add Journals_for_messages
|
||||
user_score.collaboration = user_score.collaboration.to_i + 1
|
||||
user_score.save
|
||||
|
@ -117,10 +124,10 @@ class UserScore < ActiveRecord::Base
|
|||
end
|
||||
create_score_changed_details({:current_user_id => current_user.id ,:target_user_id =>target_user.id, :score_type => "collaboration",:score_action => "reply_posting",:user_id => current_user.id,:old_score => user_score.collaboration - 1,:new_score => user_score.collaboration,:current_user_level => UserLevels.get_level(current_user),:target_user_level => UserLevels.get_level(target_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} reply posting. options => (#{options.to_s})"
|
||||
#when :reply_deleting # current_user 删除了 对 target_user 帖子的回复 Delete Message
|
||||
# user_score.collaboration = user_score.collaboration.to_i - 1
|
||||
# user_score.save
|
||||
# Rails.logger.info "[UserScore#joint] ===> User: #{current_user} reply deleting. options => (#{options.to_s})"
|
||||
when :reply_deleting # current_user 删除了 对 target_user 帖子的回复 Delete Message
|
||||
user_score.collaboration = user_score.collaboration.to_i - 1
|
||||
user_score.save
|
||||
Rails.logger.info "[UserScore#joint] ===> User: #{current_user} reply deleting. options => (#{options.to_s})"
|
||||
else
|
||||
Rails.logger.error "[UserScore#joint] ===> #{operate} is not define."
|
||||
return false
|
||||
|
@ -329,6 +336,11 @@ class UserScore < ActiveRecord::Base
|
|||
end
|
||||
create_score_changed_details({:current_user_id => current_user.id , :score_type => "active",:score_action => "update_issue_ratio",:user_id => current_user.id,:old_score => user_score.active - 2,:new_score => user_score.active,:current_user_level => UserLevels.get_level(current_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.debug "[UserScore#project] ===> User: [#{current_user.id},#{current_user.name}] updated issue ratio. options => (#{options.to_s})"
|
||||
when :delete_issue_ratio
|
||||
user_score.active = user_score.active.to_i - 2
|
||||
user_score.save
|
||||
create_score_changed_details({:current_user_id => current_user.id , :score_type => "active",:score_action => "delete_issue_ratio",:user_id => current_user.id,:old_score => user_score.active + 2,:new_score => user_score.active,:current_user_level => UserLevels.get_level(current_user),:score_changeable_obj_id=> obj.id,:score_changeable_obj_type => obj.class.to_s})
|
||||
Rails.logger.debug "[UserScore#project] ===> User: [#{current_user.id},#{current_user.name}] delete issue ratio. options => (#{options.to_s})"
|
||||
when :post_issue # current_user 发布了缺陷 issue
|
||||
user_score.active = user_score.active.to_i + 4
|
||||
user_score.save
|
||||
|
|
|
@ -27,24 +27,35 @@
|
|||
<label for='image_height' style="vertical-align: top"> <%= l(:label_imgae_height)%>:</label>
|
||||
<%= text_field_tag 'image_height', params[:label_imgae_height], :value => @first_page.image_height,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||
</p>
|
||||
<!-- <p style="margin-left:60px;padding-right: 20px;">
|
||||
<label for='title'> <#%= l(:label_site_title) %>:</label>
|
||||
<#%= text_field_tag 'title', params[:label_site_title], :value => @first_page.title,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||
</p> -->
|
||||
<p style="margin-left:60px;padding-right: 20px;">
|
||||
<label for='title'> <%= l(:label_show_course) %>:</label>
|
||||
<select name="show_course" id="show_course" style="font-size:small;width:497px;margin-left:10px;display: inline">
|
||||
<option value="1" <%= "selected=selected" if @first_page.show_course == 1 %>><%= l(:general_text_yes) %></option>
|
||||
<option value="2" <%= "selected=selected" if @first_page.show_course == 2 %>><%= l(:general_text_no) %></option>
|
||||
</select>
|
||||
</p>
|
||||
<p style="margin-left:60px;padding-right: 20px;">
|
||||
<label for='title'> <%= l(:label_show_contest) %>:</label>
|
||||
<select name="show_contest" id="show_contest" style="font-size:small;width:497px;margin-left:10px;display: inline">
|
||||
<option value="1" <%= "selected=selected" if @first_page.show_contest == 1 %>><%= l(:general_text_yes) %></option>
|
||||
<option value="2" <%= "selected=selected" if @first_page.show_contest == 2 %>><%= l(:general_text_no) %></option>
|
||||
</select>
|
||||
</p>
|
||||
<p style="margin-left:60px;padding-right: 20px;">
|
||||
<label for='sort_type' style="vertical-align: top"> <%= l(:label_sort_type)%>:</label>
|
||||
<select name="sort_type" id="sort_type" style="font-size:small;width:497px;margin-left:80px;">
|
||||
<option value="1" <%= "selected=selected" if @first_page.sort_type == 1 %>><%= l(:label_sort_by_active) %></option>
|
||||
<option value="2" <%= "selected=selected" if @first_page.sort_type == 2 %>><%= l(:label_sort_by_influence) %></option>
|
||||
<option value="0" <%= "selected=selected" if @first_page.sort_type == 0 %>><%= l(:label_sort_by_time) %></option>
|
||||
</select>
|
||||
</p>
|
||||
<p style="margin-left:60px;padding-right: 20px;">
|
||||
<label for='description' style="vertical-align: top"> <%= l(:label_site_description)%>:</label>
|
||||
<!-- <#%= text_area_tag 'description',@first_page.description,:rows => 8, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> -->
|
||||
<%= text_area 'first_page', 'description', :value => @first_page.description,:cols => 80, :rows => 15, :class => 'wiki-edit' %>
|
||||
<%= wikitoolbar_for 'first_page_description' %>
|
||||
</p>
|
||||
<p style="margin-left:60px;padding-right: 20px;">
|
||||
<label for='sort_type' style="vertical-align: top"> <%= l(:label_sort_type)%>:</label>
|
||||
<select name="sort_type" id="sort_type" style="font-size:small;width:496px;margin-left:80px;">
|
||||
<option value="1" <%= "selected=selected" if @first_page.sort_type == 1 %>><%= l(:label_sort_by_active) %></option>
|
||||
<option value="2" <%= "selected=selected" if @first_page.sort_type == 2 %>><%= l(:label_sort_by_influence) %></option>
|
||||
<option value="0" <%= "selected=selected" if @first_page.sort_type == 0 %>><%= l(:label_sort_by_time) %></option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
|
||||
<%= submit_tag l(:button_save), :class => "small", :name => nil %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div id="admin-index">
|
||||
<h3><%=l(:label_administration)%></h3>
|
||||
<!-- <%= render :partial => 'no_data' if @no_configuration_data %> -->
|
||||
<!-- <%#= render :partial => 'no_data' if @no_configuration_data %> -->
|
||||
<%= render :partial => 'menu' %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<div class="attachments">
|
||||
<% for attachment in attachments %>
|
||||
<p><%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||
<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<span title="<%= attachment.filename%>">
|
||||
<%= link_to_attachment attachment, :class => 'icon icon-attachment', :download => true -%>
|
||||
</span>
|
||||
<% if attachment.is_text? %>
|
||||
<%= link_to image_tag('magnifier.png'),
|
||||
:controller => 'attachments', :action => 'show',
|
||||
|
@ -15,11 +18,20 @@
|
|||
:method => :delete,
|
||||
:class => 'delete',
|
||||
:title => l(:button_delete) %>
|
||||
<% else %>
|
||||
<%# elsif attachment.container_type == 'Softapplication'%>
|
||||
<%#= link_to image_tag('delete.png'), delete_softapplications_attachments_path(:id => attachment.id),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:class => 'delete',
|
||||
:remote => true,
|
||||
:title => l(:button_delete) %>
|
||||
<% else %>
|
||||
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:class => 'delete',
|
||||
:remote => true,
|
||||
#:id => "attachments_" + attachment.id.to_s,
|
||||
:title => l(:button_delete) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<% options = {:author => true, :deletable => true} %>
|
||||
$("#soft_attachments_links").html('<%= escape_javascript(render(:partial => 'links', :locals => {:attachments => @softapplication.attachments, :options => options} )) %>');
|
|
@ -1,6 +1,6 @@
|
|||
<%= raw @issues.map {|issue| {
|
||||
'id' => issue.id,
|
||||
'label' => "#{issue.tracker} ##{issue.id}: #{truncate issue.subject.to_s, :length => 60}",
|
||||
'label' => "#{issue.tracker} ##{issue.project_index}: #{truncate issue.subject.to_s, :length => 60}",
|
||||
'value' => issue.id
|
||||
}
|
||||
}.to_json
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<%#= error_messages_for 'softapplication' %>
|
||||
<%= form_for Softapplication.new, :url => softapplications_path do |f| %>
|
||||
<fieldset class="contes-new-box" style="padding-left: 36px; line-height: 8px; margin-left: 1px" >
|
||||
<%= hidden_field_tag 'contest_id', @contest.id %>
|
||||
<tr style="width:700px; margin-left: -10px;">
|
||||
<span><%= l(:label_work_name) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:350px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_running_platform) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px">
|
||||
<%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:350px;" %>
|
||||
</td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_type) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px">
|
||||
<span>
|
||||
<%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %>
|
||||
</span>
|
||||
<%= f.select :app_type_name,work_type_opttion, {},{:style => "width:358px;",:onchange => "selectChange(this)"} %>
|
||||
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
|
||||
</td>
|
||||
<span style="font-size: 10px;display: none" id="other_span">
|
||||
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
|
||||
<input type="text" style="width: 100px;" id="other_input" name = "other_input"/>
|
||||
</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:350px;" %></td>
|
||||
<!--span style="font-size: 10px">(<%#= l(:label_workdescription_lengthlimit) %>)</span-->
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:350px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_deposit_project) %>:</span>
|
||||
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:358px;" %></span>
|
||||
<span><%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0,host: Setting.project_domain}, :target => '_blank' %></span><!-- new_project_path(course: 0, project_type: 0) -->
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<fieldset style="width: 500px; padding-top: 10px">
|
||||
<legend>
|
||||
<%= l(:label_upload_softworkpacket_photo) %>
|
||||
</legend>
|
||||
<%#= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
|
||||
<p style="font-size: 11px">
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
|
||||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition) %>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
<div class="align-center" style="padding-top: -3px; padding-bottom: 8px">
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
||||
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -6,17 +6,17 @@
|
|||
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
||||
<td rowspan="2">
|
||||
<% if User.current.logged? %>
|
||||
<% unless User.current.user_extensions.identity == 1 %>
|
||||
<%= link_to(l(:label_newtype_contest), {:controller => 'contests', :action => 'new_contest'}, :class => 'icon icon-add', :target => "_blank") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% unless User.current.user_extensions.identity == 1 %>
|
||||
<%= link_to(l(:label_newtype_contest), {:controller => 'contests', :action => 'new_contest'}, :class => 'icon icon-add', :target => "_blank") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td rowspan="2" >
|
||||
<div class="project-search" style="float: right">
|
||||
<td rowspan="2" >
|
||||
<div class="project-search" style="float: right">
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
<div style="padding-bottom: 10px; line-height: 15px">
|
||||
<div style="padding-left: 82px; font-size: 14px">
|
||||
<span><strong><%= l(:label_attending_contest) %>:</strong></span>
|
||||
<span><%= link_to l(:label_new_attendingcontest_work), "javascript:void(0);", onclick: "$('#put-project-form').toggle();" %></span>
|
||||
<span><%= link_to l(:label_new_attendingcontest_work), "javascript:void(0);", onclick: "$('#put-project-form').slideToggle();" %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
|
@ -99,102 +99,8 @@
|
|||
<% end %>
|
||||
|
||||
<!--点击新建参赛作品弹出框新建参赛作品并关联到竞赛中-->
|
||||
<div id="put-project-form" style="display: none; padding-left: 83px; width: 88%">
|
||||
<%= form_for Softapplication.new, :url => softapplications_path do |f| %>
|
||||
<fieldset class="contes-new-box" style="padding-left: 36px; line-height: 8px; margin-left: 1px" >
|
||||
<%= hidden_field_tag 'contest_id', @contest.id %>
|
||||
<tr style="width:700px; margin-left: -10px;">
|
||||
<span><%= l(:label_work_name) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:350px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_running_platform) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:350px;" %></td>
|
||||
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_type) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px">
|
||||
<span>
|
||||
<%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %>
|
||||
</span>
|
||||
<%= f.select :app_type_name,work_type_opttion, {},{:style => "width:358px;",:onchange => "selectChange(this)"} %>
|
||||
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
|
||||
</td>
|
||||
<span style="font-size: 10px;display: none" id="other_span">
|
||||
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
|
||||
<input type="text" style="width: 100px;" id="other_input" name = "other_input"/>
|
||||
</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:350px;" %></td>
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>:
|
||||
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:350px;" %></td>
|
||||
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_deposit_project) %>:</span>
|
||||
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:358px;" %></span>
|
||||
<span><%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0,host: Setting.project_domain}, :target => '_blank' %></span><!-- new_project_path(course: 0, project_type: 0) -->
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<fieldset style="width: 500px; padding-top: 10px">
|
||||
<legend>
|
||||
<%= l(:label_upload_softworkpacket_photo) %>
|
||||
</legend>
|
||||
<%#= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
|
||||
<p style="font-size: 11px">
|
||||
1、<%= l(:label_upload_softapplication_packets_mustpacketed) %> <br/>
|
||||
<br>
|
||||
2、<%= l(:label_upload_softapplication_photo_condition) %>
|
||||
</p>
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
<div class="align-center" style="padding-top: -3px; padding-bottom: 8px">
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
|
||||
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
|
||||
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="put-project-form" style=" padding-left: 83px; width: 88%">
|
||||
<%= render "new_softapplication" %>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -371,7 +277,7 @@
|
|||
|
||||
<!-- 评价显隐控制按钮-->
|
||||
<% if ((User.current.id == @contest.author_id) && (@contest.deadline > Date.today))||User.current.admin %>
|
||||
<div style="valign=" top" align="right" width="10%"">
|
||||
<div style="text-align: right;width: 100%;">
|
||||
<span style="padding-right: 5px; padding-top: 1px"> <%= toggle_link '评奖', c_softapplication.id.to_s %></span>
|
||||
<!-- 评价应标项目的表单 -->
|
||||
<span style="display: none; vertical-align: top " id='<%= c_softapplication.id %>'>
|
||||
|
|
|
@ -78,6 +78,9 @@ function checkMaxLength() {
|
|||
'#{l(:label_reply_plural)} #{journal.user.name}: ');
|
||||
return false;"} %>
|
||||
<% end %>
|
||||
<% if journal.delete_by_user?(User.current) %>
|
||||
<%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:remote => true)%>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
<div id="principals_for_new_member">
|
||||
<%= render_principals_for_new_course_members(@course) %>
|
||||
</div>
|
||||
<br/>
|
||||
<!--show the roles which will select-->
|
||||
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
|
||||
<% roles.each do |role| %>
|
||||
|
|
|
@ -31,24 +31,25 @@
|
|||
</div>
|
||||
<!--modified by huang-->
|
||||
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
||||
<span class="contextual-borad">
|
||||
<%= link_to(
|
||||
image_tag('edit.png')+l(:label_forum_edit),
|
||||
{:action => 'edit', :id => @forum},
|
||||
:method => 'get',
|
||||
:title => l(:button_edit)
|
||||
) if @forum.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
image_tag('delete.png')+'删除讨论区',
|
||||
{:action => 'destroy', :id => @forum},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if @forum.destroyable_by?(User.current) %>
|
||||
</span>
|
||||
<span>
|
||||
<%= link_to l(:label_memo_new_from_forum), new_forum_memo_path(@forum), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
|
||||
</span>
|
||||
|
||||
<div class="contextual-borad">
|
||||
<%= link_to(
|
||||
image_tag('edit.png')+l(:label_forum_edit),
|
||||
{:action => 'edit', :id => @forum},
|
||||
:method => 'get',
|
||||
:title => l(:button_edit)
|
||||
) if @forum.editable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
image_tag('delete.png')+'删除讨论区',
|
||||
{:action => 'destroy', :id => @forum},
|
||||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if @forum.destroyable_by?(User.current) %>
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %>
|
||||
|
|
|
@ -40,8 +40,10 @@
|
|||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;" class="loggedas_li">
|
||||
<%=link_to_user(User.current)%>
|
||||
<ul class="sub_menu">
|
||||
<% if @show_course == 1 %>
|
||||
<% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%>
|
||||
<% hasCourse=true%>
|
||||
|
||||
<li id="course_loggedas_li"><%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id, host: Setting.course_domain} %>
|
||||
<ul class="course_sub_menu">
|
||||
<% User.current.courses.each do |course| %>
|
||||
|
@ -51,7 +53,9 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<% end -%>
|
||||
<% end %>
|
||||
<li id="project_loggedas_li"><%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %>
|
||||
|
||||
<% if hasCourse %>
|
||||
|
|
|
@ -1,21 +1,36 @@
|
|||
<script type="text/javascript">
|
||||
function searchUser(){
|
||||
var name = $("#name").val();
|
||||
if(name == "")
|
||||
{
|
||||
alert("搜索条件不能为空");
|
||||
return;
|
||||
}
|
||||
$("#search_softapplications").submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="top-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf"><%=l(:label_contest_innovate_community)%></td>
|
||||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="305px">
|
||||
<div class="project-search" style="float: right">
|
||||
<%= text_field_tag 'name', params[:name], :size => 25 %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
</div>
|
||||
<div class="project-search" style="float: right">
|
||||
<%= form_tag({:controller => 'softapplications', :action => 'search'}, :method => :get, :id => "search_softapplications") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 25 %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>
|
||||
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%=link_to request.host()+"/softapplications", :controller=>'softapplications', :action=>'index' %></td>
|
||||
<td ><%=link_to l(:field_homepage), home_path %> >
|
||||
<%=link_to l(:label_contest_work), :controller=>'softapplications', :action=>'index' %>
|
||||
<td ><%=link_to l(:field_homepage), home_path %> >
|
||||
<%=link_to l(:label_contest_work), :controller=>'softapplications', :action=>'index' %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
<% @nav_dispaly_home_path_label = 1
|
||||
@nav_dispaly_main_course_label = 1
|
||||
@nav_dispaly_main_project_label = 1
|
||||
@nav_dispaly_main_contest_label = 1 %>
|
||||
<% @nav_dispaly_forum_label = 1%>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td align="left"><span class="font_lighter"> <%= format_time(comment.created_on) %></span></td>
|
||||
<td width="200" align="right" class="a"><%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
<td width="200" align="right" class="a"><%= link_to_if_authorized_course image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
|
||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
|
|
|
@ -15,9 +15,11 @@
|
|||
<!-- <p style="margin-left:-10px;"><%#= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
|
||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %></em></p>
|
||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :hidden_repo, :style => "margin-left:10px;" %></em></p>
|
||||
<!--
|
||||
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;">
|
||||
<%= f.check_box :dts_test, :style => "margin-left:10px;" %>
|
||||
<%#= f.check_box :dts_test, :style => "margin-left:10px;" %>
|
||||
</em></p>
|
||||
-->
|
||||
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>
|
||||
|
||||
<%= wikitoolbar_for 'project_description' %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<div class="wiki-description">
|
||||
<p>
|
||||
<%= textilizable(project.short_description, :project => project) %>
|
||||
<%= textilizable(project.short_description.strip, :project => project) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="width: 50%;text-align: right;font-size: 17px;color: rgb(17, 102, 153)">
|
||||
<% find_project_repository @project %>
|
||||
<% #find_project_repository @project %>
|
||||
<strong><%= content_tag('span', "#{@project.repository.nil? || @project.project_status.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %></strong>
|
||||
</td>
|
||||
<td style="width: 50%;text-align: left">
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<li><%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %></li>
|
||||
</ul>
|
||||
<ul><h3>其他工具</h3>
|
||||
<% if @project.dts_test == 1 %>
|
||||
<% if @project.enabled_modules.where(" name = 'dts'").count > 0 %>
|
||||
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
|
||||
<% end %>
|
||||
<li><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
|
||||
|
|
|
@ -1,28 +1,15 @@
|
|||
<% @nav_dispaly_project_label = 1
|
||||
@nav_dispaly_forum_label = 1 %>
|
||||
|
||||
<%= labelled_form_for @project do |f| %>
|
||||
<!--Added by young-->
|
||||
<% if @course_tag == '1' %>
|
||||
<h3><%=l(:label_course_new)%></h3>
|
||||
<div class="box tabular">
|
||||
|
||||
<%= render :partial => 'course_form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <%#= submit_tag l(:button_create_and_continue), :name => 'course_continue' %> -->
|
||||
<% else %>
|
||||
<h3><%=l(:label_project_new)%></h3>
|
||||
<div class="box tabular" >
|
||||
<p style="font-weight: bold; color: rgb(237,137,36)"> <%=raw l(:label_project_new_description)%> </p>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
</div>
|
||||
<!-- <%#= submit_tag l(:button_create_and_continue), :name => 'continue' %> -->
|
||||
<% end %>
|
||||
<%= javascript_tag "$('#project_name').focus();" %>
|
||||
<h3><%=l(:label_project_new)%></h3>
|
||||
<div class="box tabular" >
|
||||
<p style="font-weight: bold; color: rgb(237,137,36)"> <%=raw l(:label_project_new_description)%> </p>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<span style="padding-left: 60px">
|
||||
<%= submit_tag l(:button_create), :class => "enterprise"%>
|
||||
</span>
|
||||
</div>
|
||||
<%#= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= javascript_tag "$('#project_name').focus();" %>
|
||||
<% end %>
|
||||
<!--Ended by young-->
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
<div id="principals_for_applied_member">
|
||||
<%= render_principals_for_applied_members(@project) %>
|
||||
</div>
|
||||
<br/>
|
||||
<!--show the roles which will select-->
|
||||
<p style="padding-top: 5px"><%= l(:label_role_plural) %>:
|
||||
<% roles.each do |role| %>
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
||||
|
||||
<div class="activity_description info-break" style="font-size: 13px;">
|
||||
<div class="issue-list-description">
|
||||
<div class="wiki">
|
||||
<%#= textilizable e.event_url,:description %>
|
||||
</div>
|
||||
</div>
|
||||
<%= h(truncate(strip_tags(e.event_description).gsub(/ /, ' '), length: 30, omission: '...')) %>
|
||||
</div>
|
||||
<div class="activity_status" style="position:relative; padding-top: 3px;">
|
||||
|
|
|
@ -22,12 +22,12 @@ border:none
|
|||
<% end %>
|
||||
</p>
|
||||
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></p>
|
||||
<p><%= f.text_field :identifier, :required=>true, :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name) %>
|
||||
<p><%= f.text_field :identifier, :required=>true, :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name)%>
|
||||
<% unless @repository.identifier_frozen? %>
|
||||
<em class="info"><%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %>
|
||||
<%= l(:text_repository_identifier_info).html_safe %></em>
|
||||
<% end %></p>
|
||||
<!-- <p><%= f.text_field :url, :size => 60, :required => true,:readonly=>true, :class=>'textbg'%></p> -->
|
||||
<!-- <p><%#= f.text_field :url, :size => 60, :required => true,:readonly=>true, :class=>'textbg'%></p> -->
|
||||
<p><%= f.password_field :upassword, :required =>true, :label=> :field_password %>
|
||||
<em class="info"><%= l(:label_upassword_info)%></em></p>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<tr style="width:700px; margin-left: -10px">
|
||||
<span><%= l(:label_work_name) %></span>
|
||||
<span class="contest-star"> * </span>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span><%= l(:label_softapplication_name_condition)%></span>
|
||||
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
|
||||
</tr><br/>
|
||||
<br />
|
||||
<br />
|
||||
|
@ -40,7 +40,7 @@
|
|||
<tr style="width:800px;">
|
||||
<span><%= l(:label_running_platform) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br />
|
||||
|
@ -73,7 +73,7 @@
|
|||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_description) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
<span><%= l(:label_softapplication_description_condition)%></span>
|
||||
<!--<span><%#= l(:label_softapplication_description_condition)%></span>-->
|
||||
</tr>
|
||||
<br/>
|
||||
<br />
|
||||
|
@ -82,7 +82,7 @@
|
|||
<tr style="width:800px;">
|
||||
<span><%= l(:label_softapplication_developers) %></span>
|
||||
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
|
||||
|
||||
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
|
||||
</tr>
|
||||
<br/>
|
||||
<br />
|
||||
|
@ -100,10 +100,17 @@
|
|||
|
||||
|
||||
<fieldset style="width: 500px">
|
||||
<p style="padding-left: 60px">
|
||||
<% options = {:author => true, :deletable => true} %>
|
||||
<span id="soft_attachments_links">
|
||||
<%= render :partial => 'attachments/links',
|
||||
:locals => {:attachments => @softapplication.attachments, :options => options} %>
|
||||
</span>
|
||||
</p>
|
||||
<legend><%=l(:label_upload_softworkpacket_photo)%></legend>
|
||||
<%= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
<p style="font-size: 10px">1、<%=l(:label_upload_softapplication_packets_mustpacketed)%><br>2、<%=l(:label_upload_softapplication_photo_condition)%></p>
|
||||
<p style="font-size: 10px; color: red"><%=l(:label_updated_caution)%></p>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
<% @softapplications.each do |softapplication| %>
|
||||
<div>
|
||||
<span style="font-size: 15px; margin-right: 10px;"><strong><%= link_to softapplication.name, softapplication, :target => "_blank" %></strong></span>
|
||||
<span><%= rating_for softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></span>
|
||||
|
||||
</div>
|
||||
<div class="avatar-4" style="float: left; margin-top: 7px "><%= image_tag('/images/app1.png')%></div>
|
||||
<div style="float: left; width: 600px; padding-top: 6px; margin-left: 8px"><%= softapplication.description.truncate(95, omission: '...') %></div>
|
||||
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em ">
|
||||
<%contest = softapplication.contests.first%>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_type)%>:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||
<p><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= softapplication.android_min_version_available %></p>
|
||||
</div>
|
||||
<div style="padding-left: 53px">
|
||||
<span><%=l(:label_attendingcontestwork_developers)%>:<%= softapplication.application_developers %></span>
|
||||
<span style="padding-left: 50px"><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time softapplication.created_at %></span>
|
||||
</div>
|
||||
<div style="border-left: 1px solid #d9d8d8; border-bottom: 1px solid #d9d8d8; margin-left: 50px; padding-bottom: 10px; margin-bottom: 20px; width: 66%"></div>
|
||||
<div class="underline-contests_one" style="margin-top: -7px"></div>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination"><%= pagination_links_full @softapplication_pages, @softapplication_count, :per_page_links => false %></div>
|
|
@ -3,37 +3,15 @@
|
|||
<%=render :partial => 'layouts/base_softapplication_index_top_content'%>
|
||||
|
||||
<% if @softapplications.size > 0%>
|
||||
<%= sort_softapplication(@s_state)%>
|
||||
|
||||
<div width="95%" border="0" style="padding-left: 10px; padding-top: 10px;">
|
||||
<% @softapplications.each do |softapplication| %>
|
||||
<div>
|
||||
<span style="font-size: 15px; margin-right: 10px;"><strong><%= link_to softapplication.name, softapplication, :target => "_blank" %></strong></span>
|
||||
<span><%= rating_for softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></span>
|
||||
|
||||
</div>
|
||||
<div class="avatar-4"; style="float: left; margin-top: 7px "><%= image_tag('/images/app1.png')%></div>
|
||||
<div style="float: left; width: 600px; padding-top: 6px; margin-left: 8px"><%= softapplication.description.truncate(95, omission: '...') %></div>
|
||||
<div style="float: left; width: 200px; margin-left: 70px; margin-top: -3px; line-height: 0.5em ">
|
||||
<%contest = softapplication.contests.first%>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name.truncate(14, omission: '...'), show_attendingcontest_contest_path(contest), title: contest.name.to_s ) : '尚未加入竞赛'%></p>
|
||||
<p><%=l(:label_attendingcontestwork_belongs_type)%>:<%= softapplication.app_type_name.truncate(10, omission: '...') %></p>
|
||||
<p><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= softapplication.android_min_version_available %></p>
|
||||
</div>
|
||||
<div style="padding-left: 53px">
|
||||
<span><%=l(:label_attendingcontestwork_developers)%>:<%= softapplication.application_developers %></span>
|
||||
<span style="padding-left: 50px"><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time softapplication.created_at %></span>
|
||||
</div>
|
||||
<div style="border-left: 1px solid #d9d8d8; border-bottom: 1px solid #d9d8d8; margin-left: 50px; padding-bottom: 10px; margin-bottom: 20px; width: 66%"></div>
|
||||
<div class="underline-contests_one" style="margin-top: -7px"></div>
|
||||
<% end %>
|
||||
<div width="95%" border="0" style="padding-left: 10px; padding-top: 10px;" id="softapplications_list">
|
||||
<%= sort_softapplication(@s_state)%>
|
||||
<%= render :partial => "list" %>
|
||||
</div>
|
||||
|
||||
<% else %>
|
||||
<%= render :partial => "layouts/no_content"%>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div class="pagination"><%= pagination_links_full @softapplication_pages, @softapplication_count, :per_page_links => false %></div>
|
||||
|
||||
|
||||
<% html_title l(:label_contest_work_list)%>
|
|
@ -0,0 +1,11 @@
|
|||
<%=render :partial => 'layouts/base_softapplication_index_top_content'%>
|
||||
|
||||
<% if @softapplications.size > 0%>
|
||||
<%#= sort_softapplication(@s_state)%>
|
||||
<div width="95%" border="0" style="padding-left: 10px; padding-top: 10px;" id="softapplications_list">
|
||||
<%= render :partial => "list" %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "layouts/no_content"%>
|
||||
<% end %>
|
||||
<% html_title l(:label_contest_work_list)%>
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
$('#softapplications_list').html('<%= escape_javascript(render(:partial => 'list' )) %>');
|
|
@ -1,5 +1,5 @@
|
|||
<div id="issues">
|
||||
<% if attachments_results.try(:size).to_i < 0 %>
|
||||
<% if attachments_results.nil? || attachments_results.try(:size).to_i < 0 %>
|
||||
<% else %>
|
||||
<hr />
|
||||
<% attachments_results.each do |file| %>
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
</tr>
|
||||
<% when 'Bid' %>
|
||||
<tr>
|
||||
<% if act.reward_type ==3 %>
|
||||
<% if act.reward_type == 3 && @show_course == 1%>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
|
@ -137,7 +137,12 @@
|
|||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580"><p class="font_description"> <%= act.notes.html_safe %> </p>
|
||||
<% if act.notes.nil? %>
|
||||
<% desStr = '' %>
|
||||
<% else %>
|
||||
<% desStr=act.notes.html_safe %>
|
||||
<% end %>
|
||||
<td colspan="2" width="580"><p class="font_description"> <%= desStr %> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -252,17 +257,35 @@
|
|||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
<strong>
|
||||
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_i_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
<strong>
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= textilizable(act.description) %> </p></td>
|
||||
<div class="issue-list-description">
|
||||
<div class="wiki">
|
||||
<%= textilizable act, :description %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -276,7 +299,7 @@
|
|||
</tr>
|
||||
<% when 'Contest' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<% if e.user == User.current && @show_contest == 1%>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||
</td>
|
||||
|
|
|
@ -275,10 +275,10 @@
|
|||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||
</span>
|
||||
<span class="memo_author">
|
||||
<%=l(:label_question_sponsor)%>: <%= link_to_user(topic.author) %>
|
||||
<%=l(:label_question_sponsor)%>: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||
</span>
|
||||
<span class="memo_last_person">
|
||||
<%=l(:label_final_reply)%>: <%=link_to_user topic.last_reply.try(:author) %>
|
||||
<%=l(:label_final_reply)%>: <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
|
||||
</span>
|
||||
<span class="memo_reply">
|
||||
<%=l(:label_reply)%>(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
|
||||
<h1></h1>
|
||||
<% find_all_new_hot_course(9, @school_id).map do |course| %>
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s %>>
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s.gsub(/<\/?.*?>/,"") %>>
|
||||
<div class='avatar'>
|
||||
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
|
||||
</div>
|
||||
|
@ -120,9 +120,9 @@
|
|||
<%#=course.try(:teacher).try(:name)%>
|
||||
</span>
|
||||
</div>
|
||||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
<div class='desc_item text_nowrap'>
|
||||
[<%= get_course_term course %>]
|
||||
<%= link_to(course.name, course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
(<%= "#{studentCount(course)}人" %>)
|
||||
<% files_count = course.attachments.count.to_s %>
|
||||
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
||||
|
@ -148,7 +148,7 @@
|
|||
<ul class="d-p-projectlist">
|
||||
<% school_course.map do |course| %>
|
||||
<% if course.school%>
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s %>>
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s.gsub(/<\/?.*?>/,"") %>>
|
||||
<div class='avatar'>
|
||||
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
|
||||
</div>
|
||||
|
@ -161,9 +161,9 @@
|
|||
<%= link_to(course.try(:teacher).try(:realname), user_path(course.teacher)) %>
|
||||
</span>
|
||||
</div>
|
||||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
<div class='desc_item text_nowrap'>
|
||||
[<%= get_course_term course %>]
|
||||
<%= link_to(course.name, course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
<%= link_to(course.name.truncate(30, omission: '...'), course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
(<%= "#{studentCount(course)}人" %>)
|
||||
<% files_count = course.attachments.count.to_s %>
|
||||
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
||||
|
@ -188,7 +188,7 @@
|
|||
</p>
|
||||
</li>
|
||||
<% find_all_new_hot_course(9 - school_course.count, @school_id).map do |course| %>
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s %>>
|
||||
<li class='<%= cycle("odd", "even") %>' title=<%= course.description.to_s.gsub(/<\/?.*?>/,"") %>>
|
||||
<div class='avatar'>
|
||||
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
|
||||
</div>
|
||||
|
@ -206,10 +206,10 @@
|
|||
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
|
||||
</span>
|
||||
</div>
|
||||
<div class='desc_item text_nowrap' style="width: 310px;">
|
||||
<div class='desc_item text_nowrap'>
|
||||
[<%= get_course_term course %>]
|
||||
<%= link_to(course.name, course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
||||
<%= "#{studentCount(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)}人" %> )
|
||||
<% files_count = course.attachments.count.to_i.to_s %>
|
||||
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
||||
</div>
|
||||
|
@ -243,10 +243,10 @@
|
|||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||
</span>
|
||||
<span class="memo_author">
|
||||
楼主: <%= link_to_user(topic.author) %>
|
||||
楼主: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||
</span>
|
||||
<span class="memo_last_person">
|
||||
最后回复:<%= link_to_user topic.last_reply.try(:author) %>
|
||||
最后回复:<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
|
||||
</span>
|
||||
<span class="memo_reply">
|
||||
回复(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||
|
|
|
@ -166,10 +166,10 @@
|
|||
<%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %>
|
||||
</span>
|
||||
<span class="memo_author">
|
||||
楼主: <%= link_to_user(topic.author) %>
|
||||
楼主: <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %>
|
||||
</span>
|
||||
<span class="memo_last_person">
|
||||
最后回复:<%=link_to_user topic.last_reply.try(:author) %>
|
||||
最后回复:<% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %><%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%><% end %>
|
||||
</span>
|
||||
<span class="memo_reply">
|
||||
回复(<%= link_to topic.try(:replies_count), topic.event_url %>)
|
||||
|
|
|
@ -87,12 +87,12 @@ default:
|
|||
|
||||
|
||||
|
||||
address: smtp.gmail.com
|
||||
address: smtp.qq.com
|
||||
port: 587
|
||||
domain: smtp.gmail.com
|
||||
domain: smtp.qq.com
|
||||
authentication: :plain
|
||||
user_name: trustieforge@gmail.com
|
||||
password: '!@#$%^&*('
|
||||
user_name: 939547590@qq.com
|
||||
password: 'suwen11223344'
|
||||
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
#Mailer.mail_issue.each do |t|
|
||||
#@threads = IssueOverdue.mail_issue
|
||||
#ii = 1
|
||||
#@threads.each do |t|
|
||||
# t.join
|
||||
#end
|
||||
|
||||
#Thread.new do
|
||||
# if Time.now == Time.
|
||||
#
|
||||
# end
|
||||
#end
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ en:
|
|||
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."
|
||||
|
|
|
@ -195,6 +195,7 @@ zh:
|
|||
notice_gantt_chart_truncated: "这个表是截断的因为它超过了可以显示的最大数量(%{max})"
|
||||
|
||||
error_complete_occupation: "请您填写工作单位,否则本系统的部分功能将无法正常使用。"
|
||||
error_attachment_empty: "添加文件出错!"
|
||||
|
||||
error_class_period_only_num: "课程学时只能为数字"
|
||||
error_can_t_load_default_data: "无法载入默认设置:%{value}"
|
||||
|
@ -251,7 +252,7 @@ zh:
|
|||
field_lastname_eg: '(例:张三丰,请填写[张])'
|
||||
field_mail: 邮件地址
|
||||
field_filename: 文件
|
||||
field_file_dense: 文件密级
|
||||
field_file_dense: 是否公开
|
||||
field_filesize: 大小
|
||||
field_downloads: 下载次数
|
||||
field_author: 作者
|
||||
|
@ -498,13 +499,14 @@ zh:
|
|||
project_module_time_tracking: 时间跟踪
|
||||
project_module_news: 新闻
|
||||
project_module_documents: 文档
|
||||
project_module_files: 资料下载
|
||||
project_module_files: 作品下载
|
||||
project_module_wiki: Wiki
|
||||
project_module_repository: 版本库
|
||||
project_module_boards: 讨论区
|
||||
project_module_calendar: 日历
|
||||
project_module_gantt: 甘特图
|
||||
project_module_course: 课程
|
||||
project_module_dts: DTS测试工具
|
||||
label_module_share: DTS测试工具
|
||||
|
||||
label_user: 用户
|
||||
|
@ -579,6 +581,8 @@ zh:
|
|||
label_sort_type: 热门项目排序方式
|
||||
label_contest_notification_title: 竞赛通知标题
|
||||
label_contest_notification_content: 竞赛通知内容
|
||||
label_show_course: 显示课程
|
||||
label_show_contest: 显示竞赛
|
||||
#by young
|
||||
label_requirement: 需求
|
||||
label_new_course: 课程列表
|
||||
|
@ -2046,6 +2050,7 @@ zh:
|
|||
notice_account_updated: 帐号更新成功
|
||||
notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品创建成功!
|
||||
notice_softapplication_was_successfully_updated: 恭喜您,参赛作品更新成功!
|
||||
notice_attendingcontest_work_failed_created: 参赛产品创建失败
|
||||
|
||||
label_attendingcontestwork_belongs_contest: 所属竞赛
|
||||
label_attendingcontestwork_belongs_type: 所属类别
|
||||
|
|
|
@ -76,6 +76,7 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
collection do
|
||||
match 'new_message', via: :get
|
||||
match 'search', via: [:get, :post]
|
||||
end
|
||||
member do
|
||||
match 'create_message' , via: :post
|
||||
|
@ -519,6 +520,7 @@ RedmineApp::Application.routes.draw do
|
|||
match "updateType" , via: [:get, :post]
|
||||
match "updateFileDense" , via: [:get, :post]
|
||||
match "renderTag" , via: [:get, :post]
|
||||
match 'delete_softapplications', via: [:get, :post]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -75,6 +75,10 @@ host_course:
|
|||
default: course.trustie.net
|
||||
host_contest:
|
||||
default: contest.trustie.net
|
||||
host_user:
|
||||
default: user.trustie.net
|
||||
host_repository:
|
||||
default: repository.trustie.net
|
||||
protocol:
|
||||
default: http
|
||||
feeds_limit:
|
||||
|
@ -177,6 +181,7 @@ default_projects_modules:
|
|||
- calendar
|
||||
- gantt
|
||||
- course
|
||||
- dts
|
||||
default_projects_tracker_ids:
|
||||
serialized: true
|
||||
default:
|
||||
|
|
|
@ -2,7 +2,7 @@ class CreateOpenSourceProjects < ActiveRecord::Migration
|
|||
def change
|
||||
create_table :open_source_projects do |t|
|
||||
t.column "name", :string, :default => nil, :null => true
|
||||
t.column "description", :string, :default => '', :null => true
|
||||
t.column "description", :text, :null => true
|
||||
t.column "commit_count", :integer, :default => 0
|
||||
t.column "code_line", :integer, :default => 0
|
||||
t.column "users_count",:integer, :default => 0
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeDescriptionTypeToOpenSourceProject < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :open_source_projects, :description, :text
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
class DropUserScores < ActiveRecord::Migration
|
||||
def change
|
||||
drop_table :user_scores
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class CreateUserScores < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :user_scores do |t|
|
||||
t.integer :user_id
|
||||
t.integer :collaboration
|
||||
t.integer :influence
|
||||
t.integer :skill
|
||||
t.integer :activity
|
||||
end
|
||||
end
|
||||
end
|
|
@ -4,49 +4,49 @@ class AddCourseRoles < ActiveRecord::Migration
|
|||
# 添加课程权限
|
||||
Role.all.each do |role|
|
||||
if role.name == 'Non member'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.permissions.append(:add_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
role.add_permission!(:add_course )
|
||||
elsif role.name == 'Anonymous'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
elsif role.name == 'Manager'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.permissions.append(:add_course )
|
||||
role.permissions.append(:close_course )
|
||||
role.permissions.append(:select_course_modules )
|
||||
role.permissions.append(:edit_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
role.add_permission!(:add_course )
|
||||
role.add_permission!(:close_course )
|
||||
role.add_permission!(:select_course_modules )
|
||||
role.add_permission!(:edit_course )
|
||||
elsif role.name =='Developer'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.permissions.append(:add_course )
|
||||
role.permissions.append(:close_course )
|
||||
role.permissions.append(:select_course_modules )
|
||||
role.permissions.append(:edit_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
role.add_permission!(:add_course )
|
||||
role.add_permission!(:close_course )
|
||||
role.add_permission!(:select_course_modules )
|
||||
role.add_permission!(:edit_course )
|
||||
elsif role.name == 'Reporter'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
elsif role.name == '助教'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.permissions.append(:add_course )
|
||||
role.permissions.append(:select_course_modules )
|
||||
role.permissions.append(:edit_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
role.add_permission!(:add_course )
|
||||
role.add_permission!(:select_course_modules )
|
||||
role.add_permission!(:edit_course )
|
||||
elsif role.name == '老师'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.permissions.append(:add_course )
|
||||
role.permissions.append(:close_course )
|
||||
role.permissions.append(:select_course_modules )
|
||||
role.permissions.append(:edit_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
role.add_permission!(:add_course )
|
||||
role.add_permission!(:close_course )
|
||||
role.add_permission!(:select_course_modules )
|
||||
role.add_permission!(:edit_course )
|
||||
elsif role.name == '学生'
|
||||
role.permissions.append(:view_course )
|
||||
role.permissions.append(:search_course )
|
||||
role.add_permission!(:view_course )
|
||||
role.add_permission!(:search_course )
|
||||
end
|
||||
role.permissions.append(:view_course_files )
|
||||
role.permissions.append(:view_course_journals_for_messages )
|
||||
role.permissions.append(:view_course_messages )
|
||||
role.add_permission!(:view_course_files )
|
||||
role.add_permission!(:view_course_journals_for_messages )
|
||||
role.add_permission!(:view_course_messages )
|
||||
role.save(:validate => false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,12 +9,13 @@ class CreateFirstPages < ActiveRecord::Migration
|
|||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
fp = FirstPage.new
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp.title = "Trustie在线项目托管平台"
|
||||
fp.description = "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
fp.page_type = "project"
|
||||
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,12 +6,12 @@ class AddContestAndCourseFirstPage < ActiveRecord::Migration
|
|||
fp.title = "Trustie在线课程实践平台"
|
||||
fp.description = "面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
fp.page_type = "course"
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
fp1 = FirstPage.new
|
||||
fp1.web_title = ""
|
||||
fp1.title = "Trustie在线竞赛实战平台"
|
||||
fp1.description = "面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
fp1.page_type = "contest"
|
||||
fp1.save
|
||||
fp1.save(:validate => false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ class SetWebTitle < ActiveRecord::Migration
|
|||
def change
|
||||
FirstPage.all.each do |fp|
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ class SetSortType < ActiveRecord::Migration
|
|||
def change
|
||||
FirstPage.all.each do |fp|
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ class RepairFirstPage < ActiveRecord::Migration
|
|||
fp.description = "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
fp.page_type = "project"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
else
|
||||
fp = pro_fps.first
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
|
@ -17,7 +17,7 @@ class RepairFirstPage < ActiveRecord::Migration
|
|||
fp.description = "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
fp.page_type = "project"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
end
|
||||
course_fps = FirstPage.where("page_type = 'course'")
|
||||
if course_fps.nil? || course_fps.first.nil?
|
||||
|
@ -27,7 +27,7 @@ class RepairFirstPage < ActiveRecord::Migration
|
|||
fp.description = "面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
fp.page_type = "course"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
else
|
||||
fp = course_fps.first
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
|
@ -35,7 +35,7 @@ class RepairFirstPage < ActiveRecord::Migration
|
|||
fp.description = "面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
fp.page_type = "course"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
fp.save(:validate => false)
|
||||
end
|
||||
contest_fps = FirstPage.where("page_type = 'contest'")
|
||||
if contest_fps.nil? || contest_fps.first.nil?
|
||||
|
@ -45,7 +45,7 @@ class RepairFirstPage < ActiveRecord::Migration
|
|||
fp1.description = "面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
fp1.page_type = "contest"
|
||||
fp1.sort_type = 1
|
||||
fp1.save
|
||||
fp1.save(:validate => false)
|
||||
else
|
||||
fp1 = contest_fps.first
|
||||
fp1.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
|
@ -53,7 +53,7 @@ class RepairFirstPage < ActiveRecord::Migration
|
|||
fp1.description = "面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
fp1.page_type = "contest"
|
||||
fp1.sort_type = 1
|
||||
fp1.save
|
||||
fp1.save(:validate => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class FirstPageAddColumn < ActiveRecord::Migration
|
||||
def change
|
||||
add_column("first_pages","show_course",:integer,default: 1)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
class FirstPageAddContestColumn < ActiveRecord::Migration
|
||||
def change
|
||||
add_column("first_pages","show_contest",:integer,default: 1)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
class UpdateContestnotificationsDescription < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :contestnotifications, :description, :text
|
||||
end
|
||||
|
||||
def down
|
||||
change_column :contestnotifications, :description, :string
|
||||
end
|
||||
end
|
103
db/schema.rb
103
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20140725062302) do
|
||||
ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -177,58 +177,6 @@ ActiveRecord::Schema.define(:version => 20140725062302) 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
|
||||
|
@ -272,7 +220,7 @@ ActiveRecord::Schema.define(:version => 20140725062302) do
|
|||
t.integer "contest_id"
|
||||
t.string "title"
|
||||
t.string "summary"
|
||||
t.string "description"
|
||||
t.text "description"
|
||||
t.integer "author_id"
|
||||
t.integer "notificationcomments_count"
|
||||
t.datetime "created_at", :null => false
|
||||
|
@ -419,12 +367,14 @@ ActiveRecord::Schema.define(:version => 20140725062302) do
|
|||
t.string "web_title"
|
||||
t.string "title"
|
||||
t.text "description"
|
||||
t.string "page_type"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "page_type"
|
||||
t.integer "sort_type"
|
||||
t.integer "image_width", :default => 107
|
||||
t.integer "image_height", :default => 63
|
||||
t.integer "show_course", :default => 1
|
||||
t.integer "show_contest", :default => 1
|
||||
end
|
||||
|
||||
create_table "forums", :force => true do |t|
|
||||
|
@ -845,18 +795,18 @@ ActiveRecord::Schema.define(:version => 20140725062302) 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", :limit => 16777215, :null => false
|
||||
t.string "subject", :null => false
|
||||
t.text "content", :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,19 +830,6 @@ ActiveRecord::Schema.define(:version => 20140725062302) do
|
|||
|
||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||
|
||||
create_table "rich_rich_files", :force => true do |t|
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "rich_file_file_name"
|
||||
t.string "rich_file_content_type"
|
||||
t.integer "rich_file_file_size"
|
||||
t.datetime "rich_file_updated_at"
|
||||
t.string "owner_type"
|
||||
t.integer "owner_id"
|
||||
t.text "uri_cache"
|
||||
t.string "simplified_type", :default => "file"
|
||||
end
|
||||
|
||||
create_table "roles", :force => true do |t|
|
||||
t.string "name", :limit => 30, :default => "", :null => false
|
||||
t.integer "position", :default => 1
|
||||
|
@ -943,11 +880,10 @@ ActiveRecord::Schema.define(:version => 20140725062302) 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|
|
||||
|
@ -1053,8 +989,8 @@ ActiveRecord::Schema.define(:version => 20140725062302) do
|
|||
t.integer "zip_code"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "technical_title"
|
||||
t.integer "identity"
|
||||
t.string "technical_title"
|
||||
t.string "student_id"
|
||||
t.string "teacher_realname"
|
||||
t.string "student_realname"
|
||||
|
@ -1112,6 +1048,9 @@ ActiveRecord::Schema.define(:version => 20140725062302) 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|
|
||||
|
|
|
@ -48,8 +48,13 @@ module Redmine
|
|||
end
|
||||
|
||||
def attachments_deletable?(user=User.current)
|
||||
(respond_to?(:visible?) ? visible?(user) : true) &&
|
||||
user.allowed_to?(self.class.attachable_options[:delete_permission], self.project)
|
||||
if (self.has_attribute?(:course) ||self.has_attribute?(:course_id)) && self.course
|
||||
(respond_to?(:visible?) ? visible?(user) : true) &&
|
||||
user.allowed_to?(self.class.attachable_options[:delete_permission], self.course)
|
||||
else
|
||||
(respond_to?(:visible?) ? visible?(user) : true) &&
|
||||
user.allowed_to?(self.class.attachable_options[:delete_permission], self.project)
|
||||
end
|
||||
end
|
||||
|
||||
def saved_attachments
|
||||
|
|
|
@ -244,6 +244,9 @@ Redmine::AccessControl.map do |map|
|
|||
map.permission :view_gantt, {:gantts => [:show, :update]}, :read => true
|
||||
end
|
||||
|
||||
map.project_module :dts do |map|
|
||||
map.permission :do_dts, {:dts => :show}, :read => true
|
||||
end
|
||||
# map.project_module :journals do |map|
|
||||
# map.permission :view_journals_for_messages, {:gantts => [:show, :update]}, :read => true
|
||||
# end
|
||||
|
|
|
@ -67,6 +67,7 @@ module Redmine
|
|||
def available_project_modules
|
||||
@available_project_modules ||= @permissions.collect(&:project_module).uniq.compact
|
||||
end
|
||||
|
||||
def available_contest_modules
|
||||
@available_contest_modules ||= @permissions.collect(&:contest_module).uniq.compact
|
||||
end
|
||||
|
|
|
@ -307,7 +307,8 @@ span.forums-avatar-right{
|
|||
.borad-topic-count{
|
||||
padding-top: 10px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-right: 5px;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
.borad-topic-count-message{
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
one:
|
||||
act_id:
|
||||
act_type: MyString
|
||||
user_id:
|
||||
id: 1
|
||||
act_id: 1
|
||||
act_type: JournalsForMessage
|
||||
user_id: 5
|
||||
|
||||
two:
|
||||
act_id:
|
||||
act_type: MyString
|
||||
user_id:
|
||||
act_id: 2
|
||||
act_type: JournalsForMessage
|
||||
user_id: 5
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
---
|
||||
biding_project_001:
|
||||
id: 1
|
||||
project_id: -1
|
||||
bid_id: 1
|
||||
|
||||
#biding_project_002:
|
|
@ -0,0 +1,34 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
---
|
||||
homework_001:
|
||||
id: 1
|
||||
author_id: 20
|
||||
budget: "0"
|
||||
commit: 3
|
||||
deadline: "2014-05-30"
|
||||
description: ""
|
||||
homework_type: 1
|
||||
is_evaluation:
|
||||
name: "course_001_homework_001"
|
||||
parent_id:
|
||||
password:
|
||||
proportion: 60
|
||||
reward_type: 3 # 作业
|
||||
updated_on: 2014-05-23 08:15:28
|
||||
created_on: 2014-05-23 08:15:28
|
||||
homework_002:
|
||||
id: 2
|
||||
author_id: 20
|
||||
budget: "0"
|
||||
commit: 3
|
||||
deadline: "2014-05-30"
|
||||
description: ""
|
||||
homework_type: 1
|
||||
is_evaluation:
|
||||
name: "course_001_homework_002"
|
||||
parent_id:
|
||||
password:
|
||||
proportion: 60
|
||||
reward_type: 3 # 作业
|
||||
updated_on: 2014-05-23 08:15:28
|
||||
created_on: 2014-05-23 08:15:28
|
|
@ -1,9 +1,15 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
one:
|
||||
typeId: 1
|
||||
typeName: MyString
|
||||
courses_001_infos:
|
||||
id: 1
|
||||
course_id: 1
|
||||
user_id: 20
|
||||
created_at: 2013-09-30 15:36:00
|
||||
updated_at: 2014-04-19 01:50:41
|
||||
courses_002_infos:
|
||||
id: 2
|
||||
course_id: 2
|
||||
user_id: 20
|
||||
created_at: 2013-09-30 15:36:00
|
||||
updated_at: 2014-04-19 01:50:41
|
||||
|
||||
two:
|
||||
typeId: 1
|
||||
typeName: MyString
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
one:
|
||||
courses_001_statuses:
|
||||
changesets_count: 1
|
||||
watchers_count: 1
|
||||
course_id: 1
|
||||
grade: 1.5
|
||||
course_ac_para: 1
|
||||
created_at: 2013-09-30 15:36:00
|
||||
updated_at: 2014-04-19 01:50:41
|
||||
|
||||
two:
|
||||
courses_002_statuses:
|
||||
changesets_count: 1
|
||||
watchers_count: 1
|
||||
course_id: 1
|
||||
course_id: 2
|
||||
grade: 1.5
|
||||
course_ac_para: 1
|
||||
created_at: 2013-09-30 15:36:00
|
||||
updated_at: 2014-04-19 01:50:41
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
---
|
||||
courses_invalid_001:
|
||||
courses_001:
|
||||
id: 1
|
||||
tea_id:
|
||||
name: ''
|
||||
tea_id: 20
|
||||
name: courses_001
|
||||
state:
|
||||
code:
|
||||
time:
|
||||
time: 2013
|
||||
extra:
|
||||
created_at: 2013-09-30 15:36:00.000000000 Z
|
||||
updated_at: 2014-04-19 01:50:41.000000000 Z
|
||||
created_at: 2013-09-30 15:36:00
|
||||
updated_at: 2014-04-19 01:50:41
|
||||
location:
|
||||
term:
|
||||
term: 春季学期
|
||||
string:
|
||||
password:
|
||||
password: '1234'
|
||||
setup_time:
|
||||
endup_time:
|
||||
class_period:
|
||||
school_id:
|
||||
description:
|
||||
endup_time: '2014-04-18 00:00:00'
|
||||
class_period: '32'
|
||||
school_id: 117
|
||||
description: 'courses_001 description'
|
||||
status: 1
|
||||
attachmenttype: 2
|
||||
lft:
|
||||
|
@ -25,16 +25,16 @@ courses_invalid_001:
|
|||
is_public: 1
|
||||
inherit_members: 1
|
||||
|
||||
courses_008:
|
||||
id: 8
|
||||
tea_id: 5
|
||||
courses_002:
|
||||
id: 2
|
||||
tea_id: 20
|
||||
name: 分布式计算环境
|
||||
state:
|
||||
code:
|
||||
time: 2013
|
||||
extra: course2013-09-30_23-36-00
|
||||
created_at: 2013-09-30 15:36:00.000000000 Z
|
||||
updated_at: 2014-04-19 01:50:41.000000000 Z
|
||||
created_at: 2013-09-30 15:36:00
|
||||
updated_at: 2014-04-19 01:50:41
|
||||
location:
|
||||
term: 春季学期
|
||||
string:
|
||||
|
@ -50,129 +50,3 @@ courses_008:
|
|||
rgt:
|
||||
is_public: 1
|
||||
inherit_members: 1
|
||||
courses_058:
|
||||
id: 58
|
||||
tea_id: 1168
|
||||
name: 软件工程实践
|
||||
state:
|
||||
code:
|
||||
time: 2014
|
||||
extra: course2014-04-17_17-12-17
|
||||
created_at: 2014-04-17 09:12:17.000000000 Z
|
||||
updated_at: 2014-04-17 09:12:17.000000000 Z
|
||||
location:
|
||||
term: 春季学期
|
||||
string:
|
||||
password: SEP2014
|
||||
setup_time:
|
||||
endup_time:
|
||||
class_period: '18'
|
||||
school_id: 0
|
||||
description: 国防科技大学计算机学院工程硕士专业选修课。
|
||||
status: 1
|
||||
attachmenttype: 2
|
||||
lft:
|
||||
rgt:
|
||||
is_public: 1
|
||||
inherit_members: 1
|
||||
courses_059:
|
||||
id: 59
|
||||
tea_id: 193
|
||||
name: 软件项目管理
|
||||
state:
|
||||
code:
|
||||
time: 2014
|
||||
extra: course2014-04-18_18-10-46
|
||||
created_at: 2014-04-18 10:10:46.000000000 Z
|
||||
updated_at: 2014-04-18 10:10:46.000000000 Z
|
||||
location:
|
||||
term: 春季学期
|
||||
string:
|
||||
password: software
|
||||
setup_time:
|
||||
endup_time:
|
||||
class_period: '30'
|
||||
school_id: 0
|
||||
description: 面向“软件工程”专业的本科生
|
||||
status: 1
|
||||
attachmenttype: 2
|
||||
lft:
|
||||
rgt:
|
||||
is_public: 1
|
||||
inherit_members: 1
|
||||
courses_060:
|
||||
id: 60
|
||||
tea_id: 1179
|
||||
name: android开发
|
||||
state:
|
||||
code:
|
||||
time: 2014
|
||||
extra: course2014-04-19_15-40-39
|
||||
created_at: 2014-04-19 07:40:39.000000000 Z
|
||||
updated_at: 2014-04-19 07:40:39.000000000 Z
|
||||
location:
|
||||
term: 春季学期
|
||||
string:
|
||||
password: trustie740208
|
||||
setup_time:
|
||||
endup_time:
|
||||
class_period: '48'
|
||||
school_id: 37
|
||||
description: ''
|
||||
status: 1
|
||||
attachmenttype: 2
|
||||
lft:
|
||||
rgt:
|
||||
is_public: 1
|
||||
inherit_members: 1
|
||||
courses_061:
|
||||
id: 61
|
||||
tea_id: 29
|
||||
name: 测试课程1
|
||||
state:
|
||||
code:
|
||||
time: 2014
|
||||
extra: course2014-06-04_14-51-56
|
||||
created_at: 2014-06-04 06:51:56.000000000 Z
|
||||
updated_at: 2014-07-15 01:40:49.000000000 Z
|
||||
location:
|
||||
term: 春季学期
|
||||
string:
|
||||
password: '1234'
|
||||
setup_time:
|
||||
endup_time: '2014-07-14 00:00:00'
|
||||
class_period: '23'
|
||||
school_id: 1579
|
||||
description: '233'
|
||||
status: 1
|
||||
attachmenttype: 2
|
||||
lft:
|
||||
rgt:
|
||||
is_public: 0
|
||||
inherit_members: 1
|
||||
course_trustie_074:
|
||||
id: 74
|
||||
tea_id: 698
|
||||
name: 电路与电子学基础(软件工程专业)
|
||||
state:
|
||||
code:
|
||||
time: 2014
|
||||
extra: course2014-05-22_16-09-25
|
||||
created_at: 2014-05-22 08:09:25.000000000 Z
|
||||
updated_at: 2014-05-22 08:09:25.000000000 Z
|
||||
location:
|
||||
term: 春季学期
|
||||
string:
|
||||
password: '12345678'
|
||||
setup_time:
|
||||
endup_time:
|
||||
class_period: '54'
|
||||
school_id: 117
|
||||
description: "电路与电子学基础,软件工程小班\\r\ 模拟电子技术部分\ "
|
||||
status: 1
|
||||
attachmenttype: 2
|
||||
lft:
|
||||
rgt:
|
||||
is_public: 1
|
||||
inherit_members: 1
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
---
|
||||
homework_for_courses_001:
|
||||
id: 1
|
||||
course_id: 1
|
||||
bid_id: 1
|
||||
homework_for_courses_002:
|
||||
id: 2
|
||||
course_id: 1
|
||||
bid_id: 2
|
|
@ -0,0 +1,183 @@
|
|||
jfm_001:
|
||||
id: 1
|
||||
jour_id: 5
|
||||
jour_type: Principal
|
||||
user_id: 2
|
||||
notes:
|
||||
status: 0
|
||||
reply_id: 0
|
||||
created_on: 2014-07-16 15:27:2
|
||||
updated_on: 2014-07-16 15:27:2
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_002:
|
||||
id: 2
|
||||
jour_id: 5
|
||||
jour_type: Principal
|
||||
user_id: 2
|
||||
notes: 我觉得这个系统挺实用,界面挺简洁美观1!
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2014-07-16 15:27:2
|
||||
updated_on: 2014-07-16 15:27:2
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_003:
|
||||
# Course one's jfm
|
||||
id: 3
|
||||
jour_id: 1
|
||||
jour_type: Course
|
||||
user_id: 2
|
||||
notes:
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2014-07-16 15:27:2
|
||||
updated_on: 2014-07-16 15:27:2
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_004:
|
||||
# Course one's jfm
|
||||
id: 4
|
||||
jour_id: 1
|
||||
jour_type: Course
|
||||
user_id: 25
|
||||
notes: course_001的留言by_user_025
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2014-07-16 15:27:2
|
||||
updated_on: 2014-07-16 15:27:2
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_045:
|
||||
id: 45
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes: 我觉得这个系统挺实用,界面挺简洁美观!
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-16 15:27:2
|
||||
updated_on: 2013-08-16 15:27:2
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_048:
|
||||
id: 48
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes: aqfbLT <a href=\"http://wcqmhgdpgfvy.com/\">wcqmhgdpgfvy</a>, [url=http://flyhqtjjtskb.com/]flyhqtjjtskb[/url],
|
||||
[link=http://idlilqzxissn.com/]idlilqzxissn[/link], http://sfeezearevbp.com/
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-18 20:44:18
|
||||
updated_on: 2013-08-18 20:44:18
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_049:
|
||||
id: 49
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes: 搜索用户时,若无对应结果,没有返回提示信息,比如不会提示:暂无此人
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-19 08:45:27
|
||||
updated_on: 2013-08-19 08:45:27
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_058:
|
||||
id: 58
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes: 问题板块中 “新建问题”能不能移动到靠右~
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-20 00:24:44
|
||||
updated_on: 2013-08-20 00:24:44
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_060:
|
||||
id: 60
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes:
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-21 07:04:43
|
||||
updated_on: 2013-08-21 07:04:43
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_086:
|
||||
id: 86
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes: 谢谢大家的反馈!
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-23 02:36:48
|
||||
updated_on: 2013-08-23 02:36:48
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_087:
|
||||
id: 87
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes: ”与我相关“处不可以直接回复
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-23 02:44:56
|
||||
updated_on: 2013-08-23 02:44:56
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
||||
jfm_088:
|
||||
id: 88
|
||||
jour_id: 2
|
||||
jour_type: Project
|
||||
user_id: 2
|
||||
notes: 任何有关回复的地方可在任意显示处回复
|
||||
status:
|
||||
reply_id: 0
|
||||
created_on: 2013-08-23 02:45:45
|
||||
updated_on: 2013-08-23 02:45:45
|
||||
m_parent_id:
|
||||
is_readed:
|
||||
m_reply_count:
|
||||
m_reply_id:
|
||||
is_comprehensive_evaluation:
|
|
@ -47,8 +47,3 @@ member_roles_011:
|
|||
role_id: 2
|
||||
member_id: 10
|
||||
inherited_from: 10
|
||||
member_roles_179:
|
||||
id: 179
|
||||
member_id: 126
|
||||
role_id: 3
|
||||
inherited_from:
|
||||
|
|
|
@ -60,10 +60,3 @@ members_010:
|
|||
project_id: 2
|
||||
user_id: 8
|
||||
mail_notification: false
|
||||
members_course_001:
|
||||
id: 126
|
||||
user_id: 5
|
||||
project_id: -1
|
||||
created_on: 2013-09-30 15:36:00.000000000 Z
|
||||
mail_notification: false
|
||||
course_id: 8
|
||||
|
|
|
@ -11,18 +11,18 @@ projects_001:
|
|||
parent_id:
|
||||
lft: 1
|
||||
rgt: 10
|
||||
projects_002:
|
||||
created_on: 2006-07-19 19:14:19 +02:00
|
||||
name: OnlineStore
|
||||
updated_on: 2006-07-19 19:14:19 +02:00
|
||||
id: 2
|
||||
description: E-commerce web site
|
||||
homepage: ""
|
||||
is_public: false
|
||||
identifier: onlinestore
|
||||
parent_id:
|
||||
lft: 11
|
||||
rgt: 12
|
||||
#projects_002:
|
||||
# created_on: 2006-07-19 19:14:19 +02:00
|
||||
# name: OnlineStore
|
||||
# updated_on: 2006-07-19 19:14:19 +02:00
|
||||
# id: 2
|
||||
# description: E-commerce web site
|
||||
# homepage: ""
|
||||
# is_public: false
|
||||
# identifier: onlinestore
|
||||
# parent_id:
|
||||
# lft: 11
|
||||
# rgt: 12
|
||||
projects_003:
|
||||
created_on: 2006-07-19 19:15:21 +02:00
|
||||
name: eCookbook Subproject 1
|
||||
|
@ -71,3 +71,24 @@ projects_006:
|
|||
parent_id: 5
|
||||
lft: 3
|
||||
rgt: 4
|
||||
trustie:
|
||||
id: 2
|
||||
name: SocialForge
|
||||
description: "SocialForge是TrustieForge的升级版,支持社交化协同开发与合作。 SocialForge aims to provide a socialized and crowd sourcing enabled collaboration development platform. It is combining and will combine TrustieForge, Influx, Redmine and other open source projects."
|
||||
homepage: http://forge.trustie.net
|
||||
is_public: true
|
||||
parent_id:
|
||||
created_on: 2013-06-25 06:02:19.000000000 Z
|
||||
updated_on: 2013-11-13 12:52:42.000000000 Z
|
||||
identifier: trustie
|
||||
status: 1
|
||||
lft: 11
|
||||
rgt: 12
|
||||
# lft: 115
|
||||
# rgt: 116
|
||||
project_type: 0
|
||||
hidden_repo: true
|
||||
attachmenttype: 1
|
||||
user_id:
|
||||
dts_test: 0
|
||||
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
||||
|
||||
one:
|
||||
name:
|
||||
province: MyString
|
||||
school_117:
|
||||
id: 117
|
||||
name: 国防科学技术大学
|
||||
province: 湖南省
|
||||
logo_link:
|
||||
|
||||
two:
|
||||
name:
|
||||
province: MyString
|
||||
school_001:
|
||||
id: 1
|
||||
name: 摧毁地球人学校
|
||||
province: 火星
|
||||
logo_link:
|
||||
|
|
|
@ -1,76 +1,57 @@
|
|||
person_one_extra:
|
||||
id: 44
|
||||
user_id: 29
|
||||
birthday: "2013-09-30 21:19:25"
|
||||
brief_introduction: nil
|
||||
gender: 1
|
||||
location: "江苏"
|
||||
occupation: ""
|
||||
work_experience: nil
|
||||
zip_code: nil
|
||||
created_at: "2013-09-30 21:19:25"
|
||||
updated_at: "2013-10-09 19:00:06"
|
||||
technical_title: nil
|
||||
identity: 2
|
||||
student_id: nil
|
||||
teacher_realname: nil
|
||||
student_realname: nil
|
||||
location_city: "南京"
|
||||
|
||||
person_mao_extra:
|
||||
id: 22
|
||||
user_id: 193
|
||||
birthday: "2013-09-30 21:19:25"
|
||||
brief_introduction: "期待..."
|
||||
gender: 0
|
||||
location: "湖南长沙"
|
||||
occupation: "国防科技大学计算机学院"
|
||||
work_experience: nil
|
||||
zip_code: nil
|
||||
created_at: "2013-09-30 21:19:25"
|
||||
updated_at: "2013-10-09 19:00:06"
|
||||
technical_title: "教授"
|
||||
identity: 0
|
||||
student_id: nil
|
||||
teacher_realname: nil
|
||||
student_realname: nil
|
||||
location_city: nil
|
||||
ue_lirongzhen:
|
||||
id: 587
|
||||
user_id: 642
|
||||
user_extension_006:
|
||||
id: 6
|
||||
user_id: 6
|
||||
birthday:
|
||||
brief_introduction:
|
||||
gender: 0
|
||||
location: 河南
|
||||
location:
|
||||
occupation:
|
||||
work_experience:
|
||||
zip_code:
|
||||
created_at: 2014-07-29 02:54:09
|
||||
updated_at: 2014-07-29 02:54:09
|
||||
technical_title:
|
||||
identity: 0
|
||||
student_id:
|
||||
teacher_realname:
|
||||
student_realname:
|
||||
location_city:
|
||||
school_id:
|
||||
user_extension_020:
|
||||
id: 20
|
||||
user_id: 20
|
||||
birthday:
|
||||
brief_introduction: 哈尔
|
||||
gender: 0
|
||||
location: 黑龙江
|
||||
occupation: kylinos-cloud
|
||||
work_experience:
|
||||
zip_code:
|
||||
created_at: 2014-03-18 14:52:55.000000000 Z
|
||||
updated_at: 2014-03-26 07:19:04.000000000 Z
|
||||
technical_title:
|
||||
identity: 1
|
||||
student_id: '14066023'
|
||||
created_at: 2014-07-29 02:54:09
|
||||
updated_at: 2014-07-29 02:54:09
|
||||
technical_title: 助教
|
||||
identity: 0
|
||||
student_id:
|
||||
teacher_realname:
|
||||
student_realname:
|
||||
location_city: 周口
|
||||
location_city: 哈尔滨
|
||||
school_id:
|
||||
ue_yingang:
|
||||
id: 6
|
||||
user_id: 5
|
||||
user_extension_025:
|
||||
id: 25
|
||||
user_id: 25
|
||||
birthday:
|
||||
brief_introduction: 现有功能的精细化!
|
||||
brief_introduction: 哈尔
|
||||
gender: 0
|
||||
location: 湖南
|
||||
occupation: 国防科学技术大学计算机学院
|
||||
location: 黑龙江
|
||||
occupation: kylinos-cloud
|
||||
work_experience:
|
||||
zip_code:
|
||||
created_at: 2013-09-24 09:36:12.000000000 Z
|
||||
updated_at: 2014-04-19 08:16:55.000000000 Z
|
||||
technical_title: 副教授
|
||||
identity: 0
|
||||
student_id: ''
|
||||
created_at: 2014-07-29 02:54:09
|
||||
updated_at: 2014-07-29 02:54:09
|
||||
technical_title: 助教
|
||||
identity: 1 #student
|
||||
student_id: 10060342
|
||||
teacher_realname:
|
||||
student_realname:
|
||||
location_city: 长沙
|
||||
student_realname: 'ue_realname'
|
||||
location_city: 哈尔滨
|
||||
school_id: 117
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ users_003:
|
|||
login: dlopper
|
||||
type: User
|
||||
users_005:
|
||||
id: 12
|
||||
id: 5
|
||||
created_on: 2006-07-19 19:33:19 +02:00
|
||||
# Locked
|
||||
status: 3
|
||||
|
@ -165,26 +165,27 @@ groups_011:
|
|||
id: 11
|
||||
lastname: B Team
|
||||
type: Group
|
||||
users_yingang_teacher:
|
||||
id: 5
|
||||
login: jacknudt
|
||||
hashed_password: dbbd96684c9a64afe9c4935ce0b517e5e9c08064
|
||||
firstname: 刚
|
||||
lastname: 尹
|
||||
mail: jack_nudt@163.com
|
||||
users_020:
|
||||
id: 20
|
||||
login: teacher1
|
||||
# password: foobar
|
||||
hashed_password: 6b6095d977621a3071ae2670be95b88092e94b53
|
||||
firstname: wang
|
||||
lastname: dr
|
||||
mail: jack_nudt@foo.bar
|
||||
admin: false
|
||||
status: 1
|
||||
last_login_on: 2014-04-27 13:49:18.000000000 Z
|
||||
last_login_on: 2014-07-29 02:54:09
|
||||
language: zh
|
||||
auth_source_id:
|
||||
created_on: 2013-06-25 05:20:59.000000000 Z
|
||||
updated_on: 2014-07-16 03:37:51.000000000 Z
|
||||
created_on: 2014-07-29 02:54:09
|
||||
updated_on: 2014-07-29 02:54:09
|
||||
type: User
|
||||
identity_url:
|
||||
mail_notification: only_my_events
|
||||
salt: 92944df2ce4dae1a4f01007263c5d8bb
|
||||
users_lirongzhen_student:
|
||||
id: 642
|
||||
salt: 9db798ee4c462d9614479e6738790891
|
||||
users_025:
|
||||
id: 25
|
||||
login: lirongzhen
|
||||
hashed_password: 070922b015398577c3ae0d87a68d5ffa93bf82e9
|
||||
firstname: 荣振
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue