This commit is contained in:
huang 2015-01-10 15:42:33 +08:00
commit 293b3a3b42
43 changed files with 323 additions and 90 deletions

1
0)
View File

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

View File

@ -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

@ -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
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)
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, 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

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')) {
function check_groupname() {
var $group_name = $('#group_name');
$.get(
'<%=valid_ajax_course_path%>',
{ valid: "name",
value: this.value },
value: document.getElementById('group_name').value },
function (data) {
if (!data.valid) {
alert('<%= l(:label_groupname_repeat) %>');
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>

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,12 +61,12 @@
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;">
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="float:left;padding-top: 3px; margin: 0px;padding-bottom:0px;" >
<%= l(:label_search)%>
</a>
<br />
@ -78,8 +78,8 @@
<tr>
<td>
<%=link_to l(:field_homepage), home_path %> >
<a>
<%=link_to l(:label_contest_innovate), home_path %>
<a href="http://<%= Setting.host_contest %>" class="link_other_item">
<%=l(:label_contests_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

@ -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

@ -2912,7 +2912,7 @@ input[class~='ButtonClolr'],.ButtonColor{
input[class~='m3p10'], .m3p10 {
margin-top: 5px;
padding: 5px 10px !important;
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

@ -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