This commit is contained in:
alan 2015-01-09 19:11:00 +08:00
commit d96843a1d5
56 changed files with 1083 additions and 743 deletions

1
0)
View File

@ -1 +0,0 @@
终止批处理操作吗(Y/N)? 终止批处理操作吗(Y/N)? 终止批处理操作吗(Y/N)? 终止批处理操作吗(Y/N)?

261
Gemfile
View File

@ -1,136 +1,125 @@
source 'http://ruby.taobao.org'
#source 'http://ruby.sdutlinux.org/'
unless RUBY_PLATFORM =~ /w32/
# unix-like only
gem 'iconv'
gem 'rubyzip'
gem 'zip-zip'
end
gem 'seems_rateable', path: 'lib/seems_rateable'
gem "rails", "3.2.13"
gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0"
gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", "3.0.0"
gem 'acts-as-taggable-on', '2.4.1'
gem 'spreadsheet'
gem 'ruby-ole'
group :development do
gem 'better_errors', path: 'lib/better_errors'
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
end
group :test do
gem "shoulda", "~> 3.5.0"
gem "mocha", "~> 1.1.0"
gem 'capybara', '~> 2.4.1'
gem 'nokogiri', '~> 1.6.3'
gem 'factory_girl', '~> 4.4.0'
gem 'selenium-webdriver', '~> 2.42.0'
platforms :mri, :mingw do
group :rmagick do
# RMagick 2 supports ruby 1.9
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
# different requirements for the same gem on different platforms
gem "rmagick", ">= 2.0.0"
end
end
end
group :development, :test do
gem "guard-rails", '~> 0.5.3'
gem 'spork-testunit', '~> 0.0.8'
gem 'guard-spork', '~> 1.5.1'
gem 'guard-test', '~> 1.0.0'
gem 'ruby-prof', '~> 0.15.1' unless RUBY_PLATFORM =~ /w32/
gem 'pry'
gem 'pry-nav'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
# Optional gem for LDAP authentication
group :ldap do
gem "net-ldap", "~> 0.3.1"
end
# Optional gem for OpenID authentication
group :openid do
gem "ruby-openid", "~> 2.1.4", :require => "openid"
gem "rack-openid"
end
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
platforms :jruby do
# jruby-openssl is bundled with JRuby 1.7.0
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
gem "activerecord-jdbc-adapter", "1.2.5"
end
# Include database gems for the adapters found in the database
# configuration file
require 'erb'
require 'yaml'
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
if adapters.any?
adapters.each do |adapter|
case adapter
when 'mysql2'
gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw]
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
when 'mysql'
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
when /postgresql/
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
when /sqlite3/
gem "sqlite3", :platforms => [:mri, :mingw]
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
when /sqlserver/
gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
else
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
end
end
else
warn("No adapter found in config/database.yml, please configure it first")
end
else
warn("Please configure your config/database.yml first")
end
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(local_gemfile)
end
# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
end
source 'https://rubygems.org'
unless RUBY_PLATFORM =~ /w32/
# unix-like only
gem 'iconv'
gem 'rubyzip'
gem 'zip-zip'
end
gem 'seems_rateable', path: 'lib/seems_rateable'
gem "rails", "3.2.13"
gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0"
gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", "3.0.0"
gem 'acts-as-taggable-on', '2.4.1'
group :development do
gem 'better_errors', path: 'lib/better_errors'
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
if ENV['PRY']
gem 'pry'
gem 'pry-nav'
end
end
group :test do
# shoulda的版本做了改动
#gem "shoulda", "~> 3.3.2"
gem "shoulda", "> 3.3.2"
gem "mocha", "~> 0.13.3"
gem 'capybara', '~> 2.0.0'
gem 'nokogiri', '< 1.6.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
# Optional gem for LDAP authentication
group :ldap do
gem "net-ldap", "~> 0.3.1"
end
platforms :mri, :mingw do
group :rmagick do
# RMagick 2 supports ruby 1.9
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
# different requirements for the same gem on different platforms
gem "rmagick", ">= 2.0.0"
end
end
# Optional gem for OpenID authentication
group :openid do
gem "ruby-openid", "~> 2.1.4", :require => "openid"
gem "rack-openid"
end
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
platforms :jruby do
# jruby-openssl is bundled with JRuby 1.7.0
gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
gem "activerecord-jdbc-adapter", "1.2.5"
end
# Include database gems for the adapters found in the database
# configuration file
require 'erb'
require 'yaml'
database_file = File.join(File.dirname(__FILE__), "config/database.yml")
if File.exist?(database_file)
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
if adapters.any?
adapters.each do |adapter|
case adapter
when 'mysql2'
gem "mysql2", "= 0.3.11", :platforms => [:mri, :mingw]
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
when 'mysql'
gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
when /postgresql/
gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
when /sqlite3/
gem "sqlite3", :platforms => [:mri, :mingw]
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
when /sqlserver/
gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
else
warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
end
end
else
warn("No adapter found in config/database.yml, please configure it first")
end
else
warn("Please configure your config/database.yml first")
end
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(local_gemfile)
end
# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
end

View File

@ -19,7 +19,7 @@ class CoursesController < ApplicationController
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]
before_filter :require_admin, :only => [:copy, :archive, :unarchive, :destroy, :calendar]
before_filter :toggleCourse, only: [:finishcourse, :restartcourse]
before_filter :toggleCourse, :only => [:finishcourse, :restartcourse]
before_filter :require_login, :only => [:join, :unjoin]
#before_filter :allow_join, :only => [:join]
@ -500,7 +500,8 @@ class CoursesController < ApplicationController
end
end
def course
def
course
@school_id = params[:school_id]
per_page_option = 10
if @school_id == "0" or @school_id.nil?

View File

@ -0,0 +1,2 @@
class PollAnswerController < ApplicationController
end

View File

@ -0,0 +1,2 @@
class PollController < ApplicationController
end

View File

@ -0,0 +1,2 @@
class PollQuestionController < ApplicationController
end

View File

@ -0,0 +1,2 @@
class PollUserController < ApplicationController
end

View File

@ -0,0 +1,2 @@
class PollVoteController < ApplicationController
end

View File

@ -129,7 +129,7 @@ class UsersController < ApplicationController
end
def show_new_score
render :layout => false
render :layout => 'users_base'
end
# end

View File

@ -62,13 +62,49 @@ class WelcomeController < ApplicationController
@course_page = FirstPage.find_by_page_type('course')
@school_id = params[:school_id] || User.current.user_extensions.school.try(:id)
@logoLink ||= logolink()
##3-8月份为查找春季课程9-2月份为查找秋季课程
#month_now = Time.now.strftime("%m").to_i
#year_now = Time.new.strftime("%Y").to_i
#(month_now >= 3 && month_now < 9) ? course_term = l(:label_spring) : course_term = l(:label_autumn)
##year_now -= 1 if year_now < 3
#@school_id.nil? ? @cur_school_course = [] : @cur_school_course = find_miracle_course(10,7,@school_id, year_now, course_term)
##未登录或者当前学校未开设课程
#if @cur_school_course.empty?
# @has_course = false
# User.current.logged? ? course_count = 9 : course_count = 10
# @cur_school_course += find_all_new_hot_course(course_count, @school_id, year_now, course_term)
# while @cur_school_course.count < 9 do
# if course_term == l(:label_spring)
# course_term = l(:label_autumn)
# year_now -= 1
# else
# course_term = l(:label_spring)
# end
# @cur_school_course += find_all_new_hot_course((10-@cur_school_course.count), nil, year_now, course_term)
# end
#else
# if @cur_school_course.count < 9
# @has_course = false
# @cur_school_course += find_all_new_hot_course(9-@cur_school_course.count, @school_id, year_now, course_term)
# if @cur_school_course.count < 9
# if course_term == l(:label_spring)
# course_term = l(:label_autumn)
# year_now -= 1
# else
# course_term = l(:label_spring)
# end
# @cur_school_course += find_all_new_hot_course(9-@cur_school_course.count, nil, year_now, course_term)
# end
# else
# @has_course = true
# end
#end
end
def logolink()
@course_page = FirstPage.find_by_page_type('course')
logo = get_avatar?(@course_page)
def logolink()
@course_page = FirstPage.find_by_page_type('course')
logo = get_avatar?(@course_page)
id = params[:school_id]
logo_link = ""
if id.nil? && (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?)

View File

@ -75,16 +75,21 @@ class ZipdownController < ApplicationController
def zip_homework_by_user(homeattach)
homeworks_attach_path = []
not_exist_file = []
# 需要将所有homework.attachments遍历加入zip
# 并且返回zip路径
homeattach.attachments.each do |attach|
homeworks_attach_path << attach.diskfile#.to_s.slice((length+1)..-1)
if File.exist?(attach.diskfile)
homeworks_attach_path << attach.diskfile
else
not_exist_file << attach.filename
end
end
zipping("#{homeattach.user.lastname}#{homeattach.user.firstname}_#{((homeattach.user.user_extensions.nil? || homeattach.user.user_extensions.student_id.nil?) ? "" : homeattach.user.user_extensions.student_id)}_#{Time.now.to_i.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true)
zipping("#{homeattach.user.lastname}#{homeattach.user.firstname}_#{((homeattach.user.user_extensions.nil? || homeattach.user.user_extensions.student_id.nil?) ? "" : homeattach.user.user_extensions.student_id)}_#{Time.now.to_i.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true, not_exist_file)
end
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false)
def zipping(zip_name_refer, files_paths, output_path, is_attachment=false, not_exist_file=[])
# 输入待打包的文件列表已经打包文件定位到ouput_path
ic = Iconv.new('GBK//IGNORE', 'UTF-8//IGNORE')
input_filename = files_paths
@ -101,9 +106,11 @@ class ZipdownController < ApplicationController
zipfile.add(rename_file, filename)
end
#zipfile.get_output_stream('ReadMe') do |os|
# os.write 'Homeworks'
#end
unless not_exist_file.empty?
zipfile.get_output_stream('FILE_LOST.txt') do |os|
os.write l(:label_file_lost) + not_exist_file.join(',').to_s
end
end
end
zipfile_name
rescue Errno => e
@ -119,4 +126,4 @@ class ZipdownController < ApplicationController
attach = Attachment.find_by_disk_filename(name)
attach.filename
end
end
end

View File

@ -20,7 +20,7 @@ module CoursesHelper
# 返回教师数量即roles表中定义的Manager
def teacherCount project
searchTeacherAndAssistant(project).count
project.members.count - studentCount(project).to_i
# or
# searchTeacherAndAssistant(project).count
end
@ -114,7 +114,7 @@ module CoursesHelper
# 学生人数计算
# add by nwb
def studentCount course
searchStudent(course).count.to_s#course.student.count
course.student.count.to_s#course.student.count
end
#课程成员数计算

View File

@ -38,7 +38,7 @@ class Course < ActiveRecord::Base
validates_presence_of :password, :term,:name,
validates_format_of :class_period, :with =>/^[1-9]\d*$/
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
validates_format_of :name,:with =>/^[^ ]+[a-zA-Z0-9_\u4e00-\u9fa5\s\S]+$/
validates_length_of :description, :maximum => 10000
before_save :self_validate
after_create :create_board_sync

9
app/models/poll.rb Normal file
View File

@ -0,0 +1,9 @@
class Poll < ActiveRecord::Base
#attr_accessible :closed_at, :polls_group_id, :polls_name, :polls_status, :polls_type, :published_at, :user_id
include Redmine::SafeAttributes
belongs_to :user
has_many :poll_questions, :dependent => :destroy
has_many :poll_users, :dependent => :destroy
has_many :users, :through => :poll_users #该文件被哪些用户提交答案过
end

View File

@ -0,0 +1,7 @@
class PollAnswer < ActiveRecord::Base
# attr_accessible :answer_position, :answer_text, :poll_questions_id
include Redmine::SafeAttributes
belongs_to :poll_question
has_many :poll_votes, :dependent => :destroy
end

View File

@ -0,0 +1,8 @@
class PollQuestion < ActiveRecord::Base
# attr_accessible :is_necessary, :polls_id, :question_title, :question_type
include Redmine::SafeAttributes
belongs_to :poll
has_many :poll_answers, :dependent => :destroy
has_many :poll_votes, :dependent => :destroy
end

7
app/models/poll_user.rb Normal file
View File

@ -0,0 +1,7 @@
class PollUser < ActiveRecord::Base
# attr_accessible :poll_id, :user_id
include Redmine::SafeAttributes
belongs_to :poll
belongs_to :user
end

8
app/models/poll_vote.rb Normal file
View File

@ -0,0 +1,8 @@
class PollVote < ActiveRecord::Base
# attr_accessible :poll_answers_id, :poll_questions_id, :user_id, :vote_text
include Redmine::SafeAttributes
belongs_to :poll_answer
belongs_to :poll_question
belongs_to :user
end

View File

@ -77,6 +77,13 @@ class User < Principal
has_many :homework_attaches, :through => :homework_users
has_many :homework_evaluations
#问卷相关关关系
has_many :poll_users, :dependent => :destroy
has_many :poll_votes, :dependent => :destroy
has_many :poll, :dependent => :destroy #用户创建的问卷
has_many :answers, :source => :poll, :through => :poll_users, :dependent => :destroy #用户已经完成问答的问卷
# end
has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)},
:after_remove => Proc.new {|user, group| group.user_removed(user)}
has_many :changesets, :dependent => :nullify

View File

@ -10,7 +10,7 @@
<td class="location-list">
<strong><%= l(:label_user_location) %> :</strong>
</td>
<td rowspan="2">
<td rowspan="2" valign="bottom">
<% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %>
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add', :target => "_blank") %>

View File

@ -1,21 +1,21 @@
<script type="text/javascript">
jQuery(document).ready(function () {
var $group_name = $('#group_name')
$group_name.blur(function (event) {
if ($(this).is('#group_name')) {
$.get(
'<%=valid_ajax_course_path%>',
{ valid: "name",
value: this.value },
function (data) {
if (!data.valid) {
alert('<%= l(:label_groupname_repeat) %>');
}
});
}
function check_groupname() {
var $group_name = $('#group_name');
$.get(
'<%=valid_ajax_course_path%>',
{ valid: "name",
value: document.getElementById('group_name').value },
function (data) {
if (!data.valid) {
alert(data.message);
}
});
}
});
});
</script>
<script type=" text/javascript" charset="utf-8">
function validate_groupname(value1) {
@ -48,9 +48,9 @@
}
function validate_add_group() {
value1 = document.getElementById('group_name').value;
validate_groupname(value1);
validate_groupname_null(value1);
check_groupname();
}
</script>
@ -66,7 +66,7 @@
<div class="cl"></div>
<% if @subPage_title == l(:label_student_list) %>
<div class="st_addclass" id = "st_groups">
<%= render :partial => 'groups_name', locals: {:course_groups => @course_groups} %>
<%= render :partial => 'groups_name', :locals => {:course_groups => @course_groups} %>
</div>
<% end %>

View File

@ -13,7 +13,7 @@
<td class="location-list">
<strong><%= l(:label_user_location) %> :</strong>
</td>
<td rowspan="2">
<td rowspan="2" valign="bottom">
<% if User.current.logged?%>
<% if User.current.user_extensions.identity == 0 %>
<%= link_to(l(:label_course_new), {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_course, nil, :global => true) %></td>

View File

@ -78,8 +78,8 @@
</span>
&nbsp;&nbsp;作品描述&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</label>
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
<span id="homework_attach_description_span" style="padding-left: 100px;"></span>
<%= f.text_area "description", :class => "w620", :style=>"width:432px;", :maxlength => 3000, :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
<br/> <span id="homework_attach_description_span" style="padding-left: 100px;"></span>
</p>
<div class="cl"></div>
<p>

View File

@ -41,11 +41,14 @@
</td>
<td rowspan="2" width="250px">
<div class="project-search">
<%= form_tag(:controller => 'bids', :action => 'contest', :method => :get) do %>
<%= form_tag({:controller => 'bids', :action => 'contest'}, :id => "contest_search_form",:method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'reward_type', @bid.reward_type %>
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<a href="#" onclick="$('#contest_search_form').submit();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
<%= l(:label_search)%>
</a>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>
</div>
</td>

View File

@ -2,6 +2,8 @@
@nav_dispaly_forum_label = 1
@nav_dispaly_course_label = nil
@nav_dispaly_store_all_label = 1 %>
<% teacher_num = teacherCount(@course) %>
<% student_num = studentCount(@course) %>
<!DOCTYPE html>
<html lang="en">
<head>
@ -46,9 +48,13 @@
</td>
<td rowspan="2" width="250px">
<div class="top-content-search">
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20, :style => "float:left" %>
<a href="#" onclick="$('#course_search_form').submit();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
<%= l(:label_search)%>
</a>
<%#= submit_tag l(:label_search), :class => "ButtonColor m3p10", :name => nil, :style => "float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" %>
<% end %>
</div>
</td>
@ -120,19 +126,19 @@
<td class="font_index">
<!-- 1 教师; 2 学生0 全部-->
<% if User.current.member_of_course?(@course) %>
<%= link_to "#{teacherCount(@course)}", course_member_path(@course, :role => 1), :course => '1' %>
<%= link_to "#{teacher_num}", course_member_path(@course, :role => 1), :course => '1' %>
<% else %>
<span>
<%= teacherCount(@course)%>
<%= teacher_num %>
</span>
<% end%>
</td>
<td class="font_index">
<% if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) %>
<%= link_to "#{studentCount(@course)}", course_member_path(@course, :role => 2), :course => '1' %>
<%= link_to "#{student_num}", course_member_path(@course, :role => 2), :course => '1' %>
<% else %>
<span>
<%= studentCount(@course)%>
<%= student_num %>
</span>
<% end %>
</td>
@ -141,10 +147,10 @@
</td>
<tr class="font_aram">
<td align="center" width="80px" id="teacherCount">
<%= l(:label_x_base_courses_teacher, :count => teacherCount(@course)) %>
<%= l(:label_x_base_courses_teacher, :count => teacher_num) %>
</td>
<td align="center" width="80px" id="studentCount">
<%= l(:label_x_base_courses_student, :count => studentCount(@course)) %>
<%= l(:label_x_base_courses_student, :count => student_num) %>
</td>
<td align="center" width="80px">
<%= l(:label_x_course_data, :count => files_count) %>

View File

@ -61,14 +61,14 @@
if(regexName1()){$("#contst_search_form").submit();}
}
</script>
<div class="project-search">
<div class="project-search" style="float: left; margin: 0px">
<%= form_tag({controller: 'contests', action: 'index'}, method: :get, :id => "contst_search_form") do %>
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px" %>
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px", :style=>"float:left" %>
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
<%= l(:label_search)%>
</a>
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
<%= l(:label_search)%>
</a>
<br />
<span id="contest_name_span_head"></span>
<% end %>
@ -78,8 +78,8 @@
<tr>
<td>
<%=link_to l(:field_homepage), home_path %> >
<a>
<%= l(:label_contest_innovate) %>
<a href="http://<%= Setting.host_contest %>" class="link_other_item">
<%=l(:label_courses_management_platform)%>
</a> >
<span title="<%= @contest.name%>">
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %>

View File

@ -64,10 +64,10 @@
}
</script>
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();" %>
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
<%= hidden_field_tag 'project_type', params[:project_type] %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" >
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
<%= l(:label_search)%>
</a>
<br />

View File

@ -205,7 +205,7 @@
<td align="right">
<%#= submit_tag l(:button_submit), :name => nil ,
:class => "bid_btn" %>
<a href="#" onclick='$("#my_brief_introduction").parent().submit();' class="ButtonColor m3p10" >
<a href="#" onclick='$("#my_brief_introduction").parent().submit();' class="ButtonColor m3p10" style="padding: 5px 10px;" >
<%= l(:label_submit)%>
</a>
</td>
@ -221,16 +221,16 @@
<div class="inf_user_context">
<table style="font-family:'微软雅黑'" width="240">
<tr>
<td style="padding-left: 5px" width="70px">
<%= l(:label_user_joinin) %>
<td style=" float: right" width="70px">
<span style="float: right"> <%= l(:label_user_joinin) %></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= format_time(@user.created_on) %>
</td>
</tr>
<tr>
<td style="padding-left: 5px">
<%= l(:label_user_login) %>
<td style=" float: right" width="70px">
<span style="float: right"> <%= l(:label_user_login) %></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px">
<%= format_time(@user.last_login_on) %>
@ -239,8 +239,8 @@
<% unless @user.user_extensions.nil? %>
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
<tr>
<td style="padding-left: 5px" width="70px">
<%= l(:field_occupation) %>
<td style=" float: right" width="70px">
<span style="float: right"><%= l(:field_occupation) %></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<% unless @user.user_extensions.school.nil? %>
@ -250,8 +250,8 @@
</tr>
<% elsif @user.user_extensions.identity == 3 %>
<tr>
<td style="padding-left: 5px" width="70px">
<%= l(:field_occupation) %>
<td style=" float: right" width="70px">
<span style="float: right"> <%= l(:field_occupation) %></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.occupation %>
@ -259,8 +259,8 @@
</tr>
<% elsif @user.user_extensions.identity == 2 %>
<tr>
<td style="padding-left: 18px" width="70px">
<%= l(:label_company_name) %>
<td style=" float: right" width="70px">
<span style="float: right"> <%= l(:label_company_name) %></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.firstname %>
@ -268,8 +268,8 @@
</tr>
<% end %>
<tr>
<td style="padding-left: 31px" width="76px">
<%= l(:label_location) %>
<td style=" float: right" width="70px">
<span style="float: right"> <%= l(:label_location) %></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.location %>
@ -278,8 +278,8 @@
</tr>
<tr>
<% if @user.user_extensions.identity == 0 %>
<td style="padding-left: 31px" width="76px" >
<%= l(:label_technical_title) %>
<td style=" float: right" width="70px" >
<span style="float: right"> <%= l(:label_technical_title) %></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<span id = "td_tech_title"></span>
@ -289,8 +289,8 @@
<% if @user.user_extensions.identity == 1 %>
<% if(is_watching?(@user) ) %>
<tr>
<td style="padding-left: 31px" width="70px" >
<%= l(:label_bidding_user_studentcode)%>
<td style=" float: right" width="70px" >
<span style="float: right"> <%= l(:label_bidding_user_studentcode)%></span>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.student_id %>
@ -298,7 +298,7 @@
</tr>
<% else %>
<tr>
<td style="padding-left: 31px" width="70px" >
<td style=" float: right" width="70px" >
<%= l(:label_identity)%>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
@ -309,7 +309,7 @@
<% end %>
<% elsif @user.user_extensions.identity == 3 %>
<tr>
<td style="padding-left: 31px" width="70px" >
<td style=" float: right" width="70px" >
<%= l(:label_identity)%>
</td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">

View File

@ -1,7 +1,7 @@
<% @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_user_label = 1
@nav_dispaly_store_all_label = 1
%>
<% @nav_dispaly_forum_label = 1%>
<!DOCTYPE html>
<html lang="<%= current_language %>">
@ -39,12 +39,12 @@
</div>
</div>
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
<div id="ajax-indicator" ><span><%= l(:label_loading) %></span></div>
<div id="ajax-modal" style="display:none;"></div>
</div>
</div>
<!--<#%= call_hook :view_layouts_base_body_bottom %>-->
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -10,7 +10,7 @@
<tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
<td rowspan="2">
<td rowspan="2" valign="bottom">
<% if User.current.logged?%>
<% if User.current.user_extensions.identity == 0 %>
<%= link_to(l(:label_course_new), {:controller => 'projects', :action => 'new', :course => 1, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %></td>
@ -35,7 +35,7 @@
<tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_project_deposit) %></td>
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
<td rowspan="2">
<td rowspan="2" valign="bottom">
<% if User.current.logged? %>
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new', :course => 0, :project_type => @project_type}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true) %>
<% end %>

View File

@ -77,10 +77,10 @@
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<!--<%#= f.submit l(:button_project_tags_add),:class => "ButtonColor m3p10" %>-->
<a href="#" onclick='$("#tags_name").parent().submit();' class="ButtonColor m3p10" >
<a href="#" onclick='$("#tags_name").parent().submit();' class="ButtonColor m3p10" style="padding: 3px 6px">
<%= l(:button_project_tags_add)%>
</a>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10'%>
<%= link_to_function l(:button_cancel), '$("#put-tag-form").slideUp();',:class=>'ButtonColor m3p10' ,:style=>"padding:3px 6px"%>
<% end %>
</div>
<% end %>

View File

@ -1,6 +1,6 @@
<div class="clearfix"></div>
<div class="linkother">
<a href="http://<%= Setting.host_name%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
<a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
<a href="http://<%= Setting.host_contest%>" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
<div class="linkother" style="margin-left: 30%; float: left">
<a href="http://<%= Setting.host_name%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>
<a href="http://<%= Setting.host_course%>" class="link_other_item"><%=l(:label_courses_management_platform)%></a>
<a href="http://<%= Setting.host_contest%>" class="link_other_item"><%=l(:label_contests_management_platform)%></a>
</div>

View File

@ -1,58 +1,58 @@
<%
select_option = []
(select_option << ['项目', 'projects']) if project_type == Project::ProjectType_project
(select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course
select_option << ['用户', 'users']
#select_option << ['教师', 'users_teacher'],
#select_option << ['学生', 'users_student']
%>
<style type="text/css">
form #q, form #search_type{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: inline-block;
margin: 0px;
padding: 5px;
height: 33px;
}
form #q{
font-size: 13px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
border-right: none;
}
form #search_type{
font-size: 13px;
color: #363739;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
border-left: 1px outset #83A9A9;
margin-left: -4px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 0.01px;
text-overflow: '';
}
.search_widget{
display:inline-block;
border-radius: 5px;
}
.search_widget:hover{
box-shadow: 0px 0px 3px #56B4EF;
}
<%#完了把上面东西放到 .css 里%>
</style>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right">
<div class='search_widget'>
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
<%= select_tag(:search_type, options_for_select(select_option) ) %>
</div>
<%#= hidden_field_tag 'project_type', project_type %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
</div>
<% end %>
<%
select_option = []
(select_option << ['项目', 'projects']) if project_type == Project::ProjectType_project
(select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course
select_option << ['用户', 'users']
#select_option << ['教师', 'users_teacher'],
#select_option << ['学生', 'users_student']
%>
<style type="text/css">
form #q, form #search_type{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: inline-block;
margin: 0px;
padding: 5px;
height: 33px;
}
form #q{
font-size: 13px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
border-right: none;
}
form #search_type{
font-size: 13px;
color: #363739;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
border-left: 1px outset #83A9A9;
margin-left: -4px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 0.01px;
text-overflow: '';
}
.search_widget{
display:inline-block;
border-radius: 5px;
}
.search_widget:hover{
box-shadow: 0px 0px 3px #56B4EF;
}
<%#完了把上面东西放到 .css 里%>
</style>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right">
<div class='search_widget'>
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27, %>
<%= select_tag(:search_type, options_for_select(select_option), :style => "float:right" ) %>
</div>
<%#= hidden_field_tag 'project_type', project_type %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil, :style => "float:right" %>
</div>
<% end %>

View File

@ -29,7 +29,7 @@ form #search_type{
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
border-left: 1px outset #83A9A9;
margin-left: -4px;
margin-left: 0px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 0.01px;
@ -45,7 +45,7 @@ form #search_by
border-bottom-left-radius: 0px;
border-top-left-radius: 0px;
border-left: 1px outset #83A9A9;
margin-left: -6px;
margin-left: 0px;
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 0.01px;
@ -87,13 +87,14 @@ form #search_by
</script>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right">
<div class='search_widget'>
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
<input type="text" name="search_by_input" hidden="hidden;" id="search_by_input" value="0">
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();" ) %>
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]]), :onchange => "searchByChange();" ) %>
<div class='search_widget' >
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字' %>
<input type="text" name="search_by_input" style="display: none" id="search_by_input" value="0">
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();", :style => "float:right" ) %>
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
</div>
<%#= hidden_field_tag 'project_type', project_type %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
</div>
<% end %>

View File

@ -119,6 +119,7 @@
}
})();
</script>
<div>
<div class='top_bar'>
<%#= render partial: 'wei_xin' %>
<div class="main-content-bar" id="main-content-bar">
@ -324,6 +325,7 @@
<div class="clearfix"></div>
</div>
<%= render partial: 'link_to_another' %>

View File

@ -90,9 +90,16 @@
</h3>
<% month_now = Time.now.strftime("%m").to_i %>
<% year_now = 2014 %>
<% year_now = Time.new.strftime("%Y").to_i %>
<!-- 3-8月份为查找春季课程9-2月份为查找秋季课程 -->
<% (month_now >= 3 && month_now < 9) ? course_term = "春季学期" : course_term = "秋季学期" %>
<% if month_now < 3
year_now -= 1
course_term = "秋季学期"
elsif month_now < 9
course_term = "秋季学期"
end
%>
<%# (month_now >= 3 && month_now < 9) ? course_term = "春季学期" : course_term = "秋季学期" %>
<% @school_id.nil? ? cur_school_course = [] : cur_school_course = find_miracle_course(10,7,@school_id, year_now, course_term) %>
<% if cur_school_course.count == 0 %>
@ -107,7 +114,17 @@
</li>
<% end %>
<% User.current.logged? ? course_count = 9 : course_count = 10 %>
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(course_count, @school_id, year_now, course_term)} %>
<% all_new_hot_course = find_all_new_hot_course(course_count, @school_id, year_now, course_term)%>
<% while all_new_hot_course.count < course_count%>
<% if course_term == "春季学期"
year_now -= 1
course_term = "秋季学期"
else
course_term = "春季学期"
end%>
<% all_new_hot_course += find_all_new_hot_course(course_count-all_new_hot_course.count, @school_id, year_now, course_term)%>
<% end%>
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
</ul>
</div>
<% else %>
@ -127,7 +144,17 @@
<li>
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
</li>
<%= render :partial => 'course_list', :locals => {:course_list => find_all_new_hot_course(9-cur_school_course.count, @school_id, year_now, course_term)} %>
<% all_new_hot_course = find_all_new_hot_course(9-cur_school_course.count, @school_id, year_now, course_term)%>
<% while (all_new_hot_course.count + cur_school_course.count) < 9%>
<% if course_term == "春季学期"
year_now -= 1
course_term = "秋季学期"
else
course_term = "春季学期"
end%>
<% all_new_hot_course += find_all_new_hot_course(9-(all_new_hot_course.count + cur_school_course.count), @school_id, year_now, course_term)%>
<% end%>
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
<% end %>
</ul>
</div>

View File

@ -71,7 +71,7 @@
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% @projects.map do |project| %>
<li style="overflow:auto;word-break:break-all;height:100%;word-wrap: break-word;" class='<%= cycle("odd", "even") %>'>
<li style="overflow:hidden;word-break:break-all;height:100%;word-wrap: break-word;" class='<%= cycle("odd", "even") %>'>
<div style="float: left;">
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
</div>

View File

@ -0,0 +1,52 @@
# Default setup is given for MySQL with ruby1.9. If you're running Redmine
# with MySQL and ruby1.8, replace the adapter name with `mysql`.
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
# Line indentation must be 2 spaces (no tabs).
production:
adapter: mysql2
database: redmine
host: localhost
username: root
password: ""
encoding: utf8
development:
adapter: mysql2
database: redmine_development
host: 10.107.17.20
username: root
password: "1234"
encoding: utf8
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: mysql2
database: redmine_test
host: 10.107.17.20
username: root
password: "1234"
encoding: utf8
# PostgreSQL configuration example
#production:
# adapter: postgresql
# database: redmine
# host: localhost
# username: postgres
# password: "postgres"
# SQLite3 configuration example
#production:
# adapter: sqlite3
# database: db/redmine.sqlite3
# SQL Server configuration example
#production:
# adapter: sqlserver
# database: redmine
# host: localhost
# username: jenkins
# password: jenkins

View File

@ -2179,7 +2179,7 @@ zh:
modal_valid_passing: 可以使用
label_bug: 漏洞
label_school_no_course: 该学校未开设任何课程,您可以查看其他学校课程
label_school_no_course: 该学校本学期未开设任何课程,您可以查看其他学校课程
label_school_less_course: 您也可以查看其他学校课程
label_file_not_found: 对不起,该文件现在不能下载
@ -2239,4 +2239,5 @@ zh:
label_course_prompt: 课程:
label_contain_resource: 已包含资源:
label_quote_resource_failed: ",此资源引用失败! "
label_file_lost: 以下文件在服务器丢失,请联系相关人员重新上传:

View File

@ -0,0 +1,19 @@
class CreatePolls < ActiveRecord::Migration
def up
create_table :polls do |t|
t.string :polls_name
t.string :polls_type
t.integer :polls_group_id
t.integer :polls_status
t.integer :user_id
t.datetime :published_at
t.datetime :closed_at
t.timestamps
end
end
def down
drop_table :polls
end
end

View File

@ -0,0 +1,16 @@
class CreatePollQuestions < ActiveRecord::Migration
def up
create_table :poll_questions do |t|
t.string :question_title
t.integer :question_type
t.integer :is_necessary
t.integer :poll_id
t.timestamps
end
end
def down
drop_table :poll_questions
end
end

View File

@ -0,0 +1,15 @@
class CreatePollAnswers < ActiveRecord::Migration
def up
create_table :poll_answers do |t|
t.integer :poll_question_id
t.text :answer_text
t.integer :answer_position
t.timestamps
end
end
def down
drop_table :poll_answers
end
end

View File

@ -0,0 +1,16 @@
class CreatePollVotes < ActiveRecord::Migration
def up
create_table :poll_votes do |t|
t.integer :user_id
t.integer :poll_question_id
t.integer :poll_answer_id
t.text :vote_text
t.timestamps
end
end
def down
drop_table :poll_votes
end
end

View File

@ -0,0 +1,14 @@
class CreatePollUsers < ActiveRecord::Migration
def up
create_table :poll_users do |t|
t.integer :user_id
t.integer :poll_id
t.timestamps
end
end
def down
drop_table :poll_users
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20141231085350) do
ActiveRecord::Schema.define(:version => 20150108035338) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -790,6 +790,51 @@ ActiveRecord::Schema.define(:version => 20141231085350) do
t.integer "project_id"
end
create_table "poll_answers", :force => true do |t|
t.integer "poll_question_id"
t.text "answer_text"
t.integer "answer_position"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "poll_questions", :force => true do |t|
t.string "question_title"
t.integer "question_type"
t.integer "is_necessary"
t.integer "poll_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "poll_users", :force => true do |t|
t.integer "user_id"
t.integer "poll_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "poll_votes", :force => true do |t|
t.integer "user_id"
t.integer "poll_question_id"
t.integer "poll_answer_id"
t.text "vote_text"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "polls", :force => true do |t|
t.string "polls_name"
t.string "polls_type"
t.integer "polls_group_id"
t.integer "polls_status"
t.integer "user_id"
t.datetime "published_at"
t.datetime "closed_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "praise_tread_caches", :force => true do |t|
t.integer "object_id", :null => false
t.string "object_type"

View File

@ -1,160 +1,160 @@
.overlay_mac_os_x_dialog {
background-color: #FF7224;
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
}
.mac_os_x_dialog_nw {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px;
height:16px;
}
.mac_os_x_dialog_n {
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
height:18px;
}
.mac_os_x_dialog_ne {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top left;
width:16px;
height:16px;
}
.mac_os_x_dialog_w {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px;
}
.mac_os_x_dialog_e {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top right;
width:16px;
}
.mac_os_x_dialog_sw {
background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0;
width:31px;
height:40px;
}
.mac_os_x_dialog_s {
background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0;
height:40px;
}
.mac_os_x_dialog_se, .mac_os_x_dialog_sizer {
background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0;
width:31px;
height:40px;
}
.mac_os_x_dialog_sizer {
cursor:se-resize;
}
.mac_os_x_dialog_close {
width: 19px;
height: 19px;
background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0;
position:absolute;
top:12px;
left:25px;
cursor:pointer;
z-index:1000;
}
.mac_os_x_dialog_minimize {
width: 19px;
height: 19px;
background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0;
position:absolute;
top:12px;
left:45px;
cursor:pointer;
z-index:1000;
}
.mac_os_x_dialog_maximize {
width: 19px;
height: 19px;
background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0;
position:absolute;
top:12px;
left:65px;
cursor:pointer;
z-index:1000;
}
.mac_os_x_dialog_title {
float:left;
height:14px;
font-family: Tahoma, Arial, sans-serif;
font-size:12px;
text-align:center;
margin-top:6px;
width:100%;
color:#000;
}
.mac_os_x_dialog_content {
overflow:auto;
color: #222;
font-family: Tahoma, Arial, sans-serif;
font-size: 10px;
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
}
.mac_os_x_dialog_buttons {
text-align: center;
}
/* FOR IE */
* html .mac_os_x_dialog_nw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_ne {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_w {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_e {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_sw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop");
}
* html .mac_os_x_dialog_s {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_se {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
}
* html .mac_os_x_dialog_sizer {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
}
.overlay_mac_os_x_dialog {
background-color: #FF7224;
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
}
.mac_os_x_dialog_nw {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px;
height:16px;
}
.mac_os_x_dialog_n {
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
height:18px;
}
.mac_os_x_dialog_ne {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top left;
width:16px;
height:16px;
}
.mac_os_x_dialog_w {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px;
}
.mac_os_x_dialog_e {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top right;
width:16px;
}
.mac_os_x_dialog_sw {
background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0;
width:31px;
height:40px;
}
.mac_os_x_dialog_s {
background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0;
height:40px;
}
.mac_os_x_dialog_se, .mac_os_x_dialog_sizer {
background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0;
width:31px;
height:40px;
}
.mac_os_x_dialog_sizer {
cursor:se-resize;
}
.mac_os_x_dialog_close {
width: 19px;
height: 19px;
background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0;
position:absolute;
top:12px;
left:25px;
cursor:pointer;
z-index:1000;
}
.mac_os_x_dialog_minimize {
width: 19px;
height: 19px;
background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0;
position:absolute;
top:12px;
left:45px;
cursor:pointer;
z-index:1000;
}
.mac_os_x_dialog_maximize {
width: 19px;
height: 19px;
background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0;
position:absolute;
top:12px;
left:65px;
cursor:pointer;
z-index:1000;
}
.mac_os_x_dialog_title {
float:left;
height:14px;
font-family: Tahoma, Arial, sans-serif;
font-size:12px;
text-align:center;
margin-top:6px;
width:100%;
color:#000;
}
.mac_os_x_dialog_content {
overflow:auto;
color: #222;
font-family: Tahoma, Arial, sans-serif;
font-size: 10px;
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
}
.mac_os_x_dialog_buttons {
text-align: center;
}
/* FOR IE */
* html .mac_os_x_dialog_nw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_ne {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_w {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_e {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_sw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop");
}
* html .mac_os_x_dialog_s {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale");
}
* html .mac_os_x_dialog_se {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
}
* html .mac_os_x_dialog_sizer {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
}

View File

@ -1,164 +1,164 @@
.overlay_nuncio img { border: none; }
.overlay_nuncio {
background-color: #666666;
}
.nuncio_nw {
width: 12px;
height: 28px;
background: url(nuncio/top_left.png) no-repeat;
}
.nuncio_n {
background: url(nuncio/top_mid.png) repeat-x;
height: 28px;
}
.nuncio_ne {
width: 21px;
height: 28px;
background: url(nuncio/top_right.png) no-repeat;
}
.nuncio_e {
width: 21px;
background: url(nuncio/center_right.png) repeat-y top right;
}
.nuncio_w {
width: 12px;
background: url(nuncio/center_left.png) repeat-y top left;
}
.nuncio_sw {
width: 12px;
height: 18px;
background: url(nuncio/bottom_left.png) no-repeat;
}
.nuncio_s {
background: url(nuncio/bottom_mid.png) repeat-x 0 0;
height: 18px;
}
.nuncio_se, .nuncio_sizer {
width: 21px;
height: 18px;
background: url(nuncio/bottom_right.png) no-repeat;
}
.nuncio_close {
width: 14px;
height: 14px;
background: url(nuncio/close.png) no-repeat;
position:absolute;
top:10px;
right:22px;
cursor:pointer;
z-index:2000;
}
.nuncio_minimize {
width: 14px;
height: 15px;
background: url(nuncio/minimize.png) no-repeat;
position:absolute;
top:10px;
right:40px;
cursor:pointer;
z-index:2000;
}
.nuncio_title {
float:left;
font-size:11px;
font-weight: bold;
font-style: italic;
color: #fff;
width: 100%
}
.nuncio_content {
background: url(nuncio/overlay.png) repeat;
overflow:auto;
color: #ddd;
font-family: Tahoma, Arial, "sans-serif";
font-size: 10px;
}
.nuncio_sizer {
cursor:se-resize;
}
.top_draggable, .bottom_draggable {
cursor:move
}
/* FOR IE */
* html .nuncio_nw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop");
}
* html .nuncio_n {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale");
}
* html .nuncio_ne {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop");
}
* html .nuncio_w {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale");
}
* html .nuncio_e {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale");
}
* html .nuncio_sw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop");
}
* html .nuncio_s {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale");
}
* html .nuncio_se {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
}
* html .nuncio_sizer {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
}
* html .nuncio_close {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop");
}
* html .nuncio_minimize {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop");
}
.overlay_nuncio img { border: none; }
.overlay_nuncio {
background-color: #666666;
}
.nuncio_nw {
width: 12px;
height: 28px;
background: url(nuncio/top_left.png) no-repeat;
}
.nuncio_n {
background: url(nuncio/top_mid.png) repeat-x;
height: 28px;
}
.nuncio_ne {
width: 21px;
height: 28px;
background: url(nuncio/top_right.png) no-repeat;
}
.nuncio_e {
width: 21px;
background: url(nuncio/center_right.png) repeat-y top right;
}
.nuncio_w {
width: 12px;
background: url(nuncio/center_left.png) repeat-y top left;
}
.nuncio_sw {
width: 12px;
height: 18px;
background: url(nuncio/bottom_left.png) no-repeat;
}
.nuncio_s {
background: url(nuncio/bottom_mid.png) repeat-x 0 0;
height: 18px;
}
.nuncio_se, .nuncio_sizer {
width: 21px;
height: 18px;
background: url(nuncio/bottom_right.png) no-repeat;
}
.nuncio_close {
width: 14px;
height: 14px;
background: url(nuncio/close.png) no-repeat;
position:absolute;
top:10px;
right:22px;
cursor:pointer;
z-index:2000;
}
.nuncio_minimize {
width: 14px;
height: 15px;
background: url(nuncio/minimize.png) no-repeat;
position:absolute;
top:10px;
right:40px;
cursor:pointer;
z-index:2000;
}
.nuncio_title {
float:left;
font-size:11px;
font-weight: bold;
font-style: italic;
color: #fff;
width: 100%
}
.nuncio_content {
background: url(nuncio/overlay.png) repeat;
overflow:auto;
color: #ddd;
font-family: Tahoma, Arial, "sans-serif";
font-size: 10px;
}
.nuncio_sizer {
cursor:se-resize;
}
.top_draggable, .bottom_draggable {
cursor:move
}
/* FOR IE */
* html .nuncio_nw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop");
}
* html .nuncio_n {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale");
}
* html .nuncio_ne {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop");
}
* html .nuncio_w {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale");
}
* html .nuncio_e {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale");
}
* html .nuncio_sw {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop");
}
* html .nuncio_s {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale");
}
* html .nuncio_se {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
}
* html .nuncio_sizer {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
}
* html .nuncio_close {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop");
}
* html .nuncio_minimize {
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop");
}

View File

@ -1,108 +1,108 @@
.overlay_spread {
background-color: #85BBEF;
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
}
.spread_nw {
background: transparent url(spread/left-top.gif) no-repeat 0 0;
width:10px;
height:25px;
}
.spread_n {
background: transparent url(spread/top-middle.gif) repeat-x 0 0;
height:25px;
}
.spread_ne {
background: transparent url(spread/right-top.gif) no-repeat 0 0;
width:10px;
height:25px;
}
.spread_w {
background: transparent url(spread/frame-left.gif) repeat-y top left;
width:7px;
}
.spread_e {
background: transparent url(spread/frame-right.gif) repeat-y top right;
width:7px;
}
.spread_sw {
background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0;
width:7px;
height:7px;
}
.spread_s {
background: transparent url(spread/bottom-middle.gif) repeat-x 0 0;
height:7px;
}
.spread_se, .spread_sizer {
background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0;
width:7px;
height:7px;
}
.spread_sizer {
cursor:se-resize;
}
.spread_close {
width: 23px;
height: 23px;
background: transparent url(spread/button-close-focus.gif) no-repeat 0 0;
position:absolute;
top:0px;
right:11px;
cursor:pointer;
z-index:1000;
}
.spread_minimize {
width: 23px;
height: 23px;
background: transparent url(spread/button-min-focus.gif) no-repeat 0 0;
position:absolute;
top:0px;
right:55px;
cursor:pointer;
z-index:1000;
}
.spread_maximize {
width: 23px;
height: 23px;
background: transparent url(spread/button-max-focus.gif) no-repeat 0 0;
position:absolute;
top:0px;
right:33px;
cursor:pointer;
z-index:1000;
}
.spread_title {
float:left;
height:14px;
font-family: Tahoma, Arial, sans-serif;
font-size:14px;
font-weight:bold;
text-align:left;
margin-top:2px;
width:100%;
color:#E47211;
}
.spread_content {
overflow:auto;
color: #222;
font-family: Tahoma, Arial, sans-serif;
font-size: 10px;
background:#A9EA00;
}
.overlay_spread {
background-color: #85BBEF;
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
}
.spread_nw {
background: transparent url(spread/left-top.gif) no-repeat 0 0;
width:10px;
height:25px;
}
.spread_n {
background: transparent url(spread/top-middle.gif) repeat-x 0 0;
height:25px;
}
.spread_ne {
background: transparent url(spread/right-top.gif) no-repeat 0 0;
width:10px;
height:25px;
}
.spread_w {
background: transparent url(spread/frame-left.gif) repeat-y top left;
width:7px;
}
.spread_e {
background: transparent url(spread/frame-right.gif) repeat-y top right;
width:7px;
}
.spread_sw {
background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0;
width:7px;
height:7px;
}
.spread_s {
background: transparent url(spread/bottom-middle.gif) repeat-x 0 0;
height:7px;
}
.spread_se, .spread_sizer {
background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0;
width:7px;
height:7px;
}
.spread_sizer {
cursor:se-resize;
}
.spread_close {
width: 23px;
height: 23px;
background: transparent url(spread/button-close-focus.gif) no-repeat 0 0;
position:absolute;
top:0px;
right:11px;
cursor:pointer;
z-index:1000;
}
.spread_minimize {
width: 23px;
height: 23px;
background: transparent url(spread/button-min-focus.gif) no-repeat 0 0;
position:absolute;
top:0px;
right:55px;
cursor:pointer;
z-index:1000;
}
.spread_maximize {
width: 23px;
height: 23px;
background: transparent url(spread/button-max-focus.gif) no-repeat 0 0;
position:absolute;
top:0px;
right:33px;
cursor:pointer;
z-index:1000;
}
.spread_title {
float:left;
height:14px;
font-family: Tahoma, Arial, sans-serif;
font-size:14px;
font-weight:bold;
text-align:left;
margin-top:2px;
width:100%;
color:#E47211;
}
.spread_content {
overflow:auto;
color: #222;
font-family: Tahoma, Arial, sans-serif;
font-size: 10px;
background:#A9EA00;
}

View File

@ -2911,8 +2911,8 @@ input[class~='ButtonClolr'],.ButtonColor{
}
input[class~='m3p10'], .m3p10 {
margin: 0;
padding: 3px 10px !important;
margin-top: 5px;
padding: 5px 10px;
height: 20px;
display: inline-block;
color: #ffffff;

View File

@ -149,7 +149,7 @@ a:hover.tijiao{ background:#0f99a9 !important;}
.ni_con p{ color:#808181;}
.ni_con a:hover{ text-decoration:none;}
.ui-widget-header{display: none;}

View File

@ -2,7 +2,7 @@
padding-left: 0px;
}
.jstEditor textarea, .jstEditor iframe {
margin: 0;
margin: 0 !important;
}
.jstHandle {
@ -13,7 +13,7 @@
}
.jstElements {
padding: 3px 3px 3px 10px;/*by young*/
padding: 3px 3px 3px 0px;/*by young*/
}
.jstElements button {

View File

@ -0,0 +1,7 @@
require 'test_helper'
class PollAnswersTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class PollQuestionsTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class PollUserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View File

@ -0,0 +1,7 @@
require 'test_helper'
class PollVotesTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

7
test/unit/polls_test.rb Normal file
View File

@ -0,0 +1,7 @@
require 'test_helper'
class PollsTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end