Merge branch 'szzh' into develop

This commit is contained in:
z9hang 2015-01-10 14:40:45 +08:00
commit 666facd483
55 changed files with 1071 additions and 739 deletions

1
0)
View File

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

51
Gemfile
View File

@ -1,5 +1,4 @@
source 'http://ruby.taobao.org' source 'https://rubygems.org'
#source 'http://ruby.sdutlinux.org/'
unless RUBY_PLATFORM =~ /w32/ unless RUBY_PLATFORM =~ /w32/
# unix-like only # unix-like only
@ -16,42 +15,23 @@ gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", "3.0.0" gem "builder", "3.0.0"
gem 'acts-as-taggable-on', '2.4.1' gem 'acts-as-taggable-on', '2.4.1'
gem 'spreadsheet'
gem 'ruby-ole'
group :development do group :development do
gem 'better_errors', path: 'lib/better_errors' gem 'better_errors', path: 'lib/better_errors'
gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler' gem 'rack-mini-profiler', path: 'lib/rack-mini-profiler'
if ENV['PRY']
gem 'pry'
gem 'pry-nav'
end
end end
group :test do group :test do
gem "shoulda", "~> 3.5.0" # shoulda的版本做了改动
gem "mocha", "~> 1.1.0" #gem "shoulda", "~> 3.3.2"
gem 'capybara', '~> 2.4.1' gem "shoulda", "> 3.3.2"
gem 'nokogiri', '~> 1.6.3' gem "mocha", "~> 0.13.3"
gem 'factory_girl', '~> 4.4.0' gem 'capybara', '~> 2.0.0'
gem 'selenium-webdriver', '~> 2.42.0' gem 'nokogiri', '< 1.6.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 end
@ -73,6 +53,15 @@ group :ldap do
end 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 # Optional gem for OpenID authentication
group :openid do group :openid do
gem "ruby-openid", "~> 2.1.4", :require => "openid" gem "ruby-openid", "~> 2.1.4", :require => "openid"

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, :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 :authorize_course_global, :only => [:view_homework_attaches, :new,:create]
before_filter :require_admin, :only => [:copy, :archive, :unarchive, :destroy, :calendar] 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 :require_login, :only => [:join, :unjoin]
#before_filter :allow_join, :only => [:join] #before_filter :allow_join, :only => [:join]
@ -500,7 +500,8 @@ class CoursesController < ApplicationController
end end
end end
def course def
course
@school_id = params[:school_id] @school_id = params[:school_id]
per_page_option = 10 per_page_option = 10
if @school_id == "0" or @school_id.nil? 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 end
def show_new_score def show_new_score
render :layout => false render :layout => 'users_base'
end end
# end # end

View File

@ -62,10 +62,46 @@ class WelcomeController < ApplicationController
@course_page = FirstPage.find_by_page_type('course') @course_page = FirstPage.find_by_page_type('course')
@school_id = params[:school_id] || User.current.user_extensions.school.try(:id) @school_id = params[:school_id] || User.current.user_extensions.school.try(:id)
@logoLink ||= logolink() @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 end
def logolink() def logolink()
@course_page = FirstPage.find_by_page_type('course') @course_page = FirstPage.find_by_page_type('course')
logo = get_avatar?(@course_page) logo = get_avatar?(@course_page)

View File

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

View File

@ -38,7 +38,7 @@ class Course < ActiveRecord::Base
validates_presence_of :password, :term,:name validates_presence_of :password, :term,:name
validates_format_of :class_period, :with =>/^[1-9]\d*$/ 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 validates_length_of :description, :maximum => 10000
before_save :self_validate before_save :self_validate
after_create :create_board_sync 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_attaches, :through => :homework_users
has_many :homework_evaluations 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)}, 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)} :after_remove => Proc.new {|user, group| group.user_removed(user)}
has_many :changesets, :dependent => :nullify has_many :changesets, :dependent => :nullify

View File

@ -10,7 +10,7 @@
<td class="location-list"> <td class="location-list">
<strong><%= l(:label_user_location) %> :</strong> <strong><%= l(:label_user_location) %> :</strong>
</td> </td>
<td rowspan="2"> <td rowspan="2" valign="bottom">
<% if User.current.logged? %> <% if User.current.logged? %>
<% unless User.current.user_extensions.identity == 1 %> <% unless User.current.user_extensions.identity == 1 %>
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add', :target => "_blank") %> <%= 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"> <script type="text/javascript">
jQuery(document).ready(function () { function check_groupname() {
var $group_name = $('#group_name') var $group_name = $('#group_name');
$group_name.blur(function (event) {
if ($(this).is('#group_name')) {
$.get( $.get(
'<%=valid_ajax_course_path%>', '<%=valid_ajax_course_path%>',
{ valid: "name", { valid: "name",
value: this.value }, value: document.getElementById('group_name').value },
function (data) { function (data) {
if (!data.valid) { if (!data.valid) {
alert('<%= l(:label_groupname_repeat) %>'); alert(data.message);
} }
}); });
} }
});
});
</script> </script>
<script type=" text/javascript" charset="utf-8"> <script type=" text/javascript" charset="utf-8">
function validate_groupname(value1) { function validate_groupname(value1) {
@ -48,9 +48,9 @@
} }
function validate_add_group() { function validate_add_group() {
value1 = document.getElementById('group_name').value;
validate_groupname(value1); check_groupname();
validate_groupname_null(value1);
} }
</script> </script>
@ -66,7 +66,7 @@
<div class="cl"></div> <div class="cl"></div>
<% if @subPage_title == l(:label_student_list) %> <% if @subPage_title == l(:label_student_list) %>
<div class="st_addclass" id = "st_groups"> <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> </div>
<% end %> <% end %>

View File

@ -13,7 +13,7 @@
<td class="location-list"> <td class="location-list">
<strong><%= l(:label_user_location) %> :</strong> <strong><%= l(:label_user_location) %> :</strong>
</td> </td>
<td rowspan="2"> <td rowspan="2" valign="bottom">
<% if User.current.logged?%> <% if User.current.logged?%>
<% if User.current.user_extensions.identity == 0 %> <% 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> <%= 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> </span>
&nbsp;&nbsp;作品描述&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;作品描述&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</label> </label>
<%= f.text_area "description", :class => "w620", :maxlength => 3000, :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%> <%= f.text_area "description", :class => "w620", :style=>"width:432px;", :maxlength => 3000, :placeholder => "最多3000个汉字", :onkeyup => "regexDescription();"%>
<span id="homework_attach_description_span" style="padding-left: 100px;"></span> <br/> <span id="homework_attach_description_span" style="padding-left: 100px;"></span>
</p> </p>
<div class="cl"></div> <div class="cl"></div>
<p> <p>

View File

@ -41,11 +41,14 @@
</td> </td>
<td rowspan="2" width="250px"> <td rowspan="2" width="250px">
<div class="project-search"> <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 %> <%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'reward_type', @bid.reward_type %> <%= hidden_field_tag 'reward_type', @bid.reward_type %>
<%= hidden_field_tag 'project_type', params[:project_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 %> <% end %>
</div> </div>
</td> </td>

View File

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

View File

@ -61,12 +61,12 @@
if(regexName1()){$("#contst_search_form").submit();} if(regexName1()){$("#contst_search_form").submit();}
} }
</script> </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 %> <%= 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] %> <%= hidden_field_tag 'project_type', params[:project_type] %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %> <%#= 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)%> <%= l(:label_search)%>
</a> </a>
<br /> <br />
@ -78,8 +78,8 @@
<tr> <tr>
<td> <td>
<%=link_to l(:field_homepage), home_path %> > <%=link_to l(:field_homepage), home_path %> >
<a> <a href="http://<%= Setting.host_contest %>" class="link_other_item">
<%= l(:label_contest_innovate) %> <%=l(:label_contests_management_platform)%>
</a> > </a> >
<span title="<%= @contest.name%>"> <span title="<%= @contest.name%>">
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %> <%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %>

View File

@ -64,10 +64,10 @@
} }
</script> </script>
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %> <%= 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] %> <%= hidden_field_tag 'project_type', params[:project_type] %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %> <%#= 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)%> <%= l(:label_search)%>
</a> </a>
<br /> <br />

View File

@ -205,7 +205,7 @@
<td align="right"> <td align="right">
<%#= submit_tag l(:button_submit), :name => nil , <%#= submit_tag l(:button_submit), :name => nil ,
:class => "bid_btn" %> :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)%> <%= l(:label_submit)%>
</a> </a>
</td> </td>
@ -221,16 +221,16 @@
<div class="inf_user_context"> <div class="inf_user_context">
<table style="font-family:'微软雅黑'" width="240"> <table style="font-family:'微软雅黑'" width="240">
<tr> <tr>
<td style="padding-left: 5px" width="70px"> <td style=" float: right" width="70px">
<%= l(:label_user_joinin) %> <span style="float: right"> <%= l(:label_user_joinin) %></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= format_time(@user.created_on) %> <%= format_time(@user.created_on) %>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 5px"> <td style=" float: right" width="70px">
<%= l(:label_user_login) %> <span style="float: right"> <%= l(:label_user_login) %></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px"> <td class="font_lighter_sidebar" style="padding-left: 0px">
<%= format_time(@user.last_login_on) %> <%= format_time(@user.last_login_on) %>
@ -239,8 +239,8 @@
<% unless @user.user_extensions.nil? %> <% unless @user.user_extensions.nil? %>
<% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %> <% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %>
<tr> <tr>
<td style="padding-left: 5px" width="70px"> <td style=" float: right" width="70px">
<%= l(:field_occupation) %> <span style="float: right"><%= l(:field_occupation) %></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<% unless @user.user_extensions.school.nil? %> <% unless @user.user_extensions.school.nil? %>
@ -250,8 +250,8 @@
</tr> </tr>
<% elsif @user.user_extensions.identity == 3 %> <% elsif @user.user_extensions.identity == 3 %>
<tr> <tr>
<td style="padding-left: 5px" width="70px"> <td style=" float: right" width="70px">
<%= l(:field_occupation) %> <span style="float: right"> <%= l(:field_occupation) %></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.occupation %> <%= @user.user_extensions.occupation %>
@ -259,8 +259,8 @@
</tr> </tr>
<% elsif @user.user_extensions.identity == 2 %> <% elsif @user.user_extensions.identity == 2 %>
<tr> <tr>
<td style="padding-left: 18px" width="70px"> <td style=" float: right" width="70px">
<%= l(:label_company_name) %> <span style="float: right"> <%= l(:label_company_name) %></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.firstname %> <%= @user.firstname %>
@ -268,8 +268,8 @@
</tr> </tr>
<% end %> <% end %>
<tr> <tr>
<td style="padding-left: 31px" width="76px"> <td style=" float: right" width="70px">
<%= l(:label_location) %> <span style="float: right"> <%= l(:label_location) %></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.location %> <%= @user.user_extensions.location %>
@ -278,8 +278,8 @@
</tr> </tr>
<tr> <tr>
<% if @user.user_extensions.identity == 0 %> <% if @user.user_extensions.identity == 0 %>
<td style="padding-left: 31px" width="76px" > <td style=" float: right" width="70px" >
<%= l(:label_technical_title) %> <span style="float: right"> <%= l(:label_technical_title) %></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<span id = "td_tech_title"></span> <span id = "td_tech_title"></span>
@ -289,8 +289,8 @@
<% if @user.user_extensions.identity == 1 %> <% if @user.user_extensions.identity == 1 %>
<% if(is_watching?(@user) ) %> <% if(is_watching?(@user) ) %>
<tr> <tr>
<td style="padding-left: 31px" width="70px" > <td style=" float: right" width="70px" >
<%= l(:label_bidding_user_studentcode)%> <span style="float: right"> <%= l(:label_bidding_user_studentcode)%></span>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
<%= @user.user_extensions.student_id %> <%= @user.user_extensions.student_id %>
@ -298,7 +298,7 @@
</tr> </tr>
<% else %> <% else %>
<tr> <tr>
<td style="padding-left: 31px" width="70px" > <td style=" float: right" width="70px" >
<%= l(:label_identity)%> <%= l(:label_identity)%>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <td class="font_lighter_sidebar" style="padding-left: 0px" width="170px">
@ -309,7 +309,7 @@
<% end %> <% end %>
<% elsif @user.user_extensions.identity == 3 %> <% elsif @user.user_extensions.identity == 3 %>
<tr> <tr>
<td style="padding-left: 31px" width="70px" > <td style=" float: right" width="70px" >
<%= l(:label_identity)%> <%= l(:label_identity)%>
</td> </td>
<td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"> <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_home_path_label = 1
@nav_dispaly_main_course_label = 1 @nav_dispaly_user_label = 1
@nav_dispaly_main_project_label = 1 @nav_dispaly_store_all_label = 1
@nav_dispaly_main_contest_label = 1 %> %>
<% @nav_dispaly_forum_label = 1%> <% @nav_dispaly_forum_label = 1%>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<%= current_language %>"> <html lang="<%= current_language %>">
@ -39,12 +39,12 @@
</div> </div>
</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 id="ajax-modal" style="display:none;"></div>
</div> </div>
</div> </div>
<!--<#%= call_hook :view_layouts_base_body_bottom %>--> <%= call_hook :view_layouts_base_body_bottom %>
</body> </body>
</html> </html>

View File

@ -10,7 +10,7 @@
<tr> <tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td> <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 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.logged?%>
<% if User.current.user_extensions.identity == 0 %> <% 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> <%= 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> <tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_project_deposit) %></td> <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 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.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) %> <%= 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 %> <% end %>

View File

@ -77,10 +77,10 @@
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%> <%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%> <%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<!--<%#= f.submit l(:button_project_tags_add),:class => "ButtonColor m3p10" %>--> <!--<%#= 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)%> <%= l(:button_project_tags_add)%>
</a> </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 %> <% end %>
</div> </div>
<% end %> <% end %>

View File

@ -1,5 +1,5 @@
<div class="clearfix"></div>
<div class="linkother"> <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_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_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> <a href="http://<%= Setting.host_contest%>" class="link_other_item"><%=l(:label_contests_management_platform)%></a>

View File

@ -49,10 +49,10 @@ form #search_type{
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %> <%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<div class="project-search" style="float: right"> <div class="project-search" style="float: right">
<div class='search_widget'> <div class='search_widget'>
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %> <%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27, %>
<%= select_tag(:search_type, options_for_select(select_option) ) %> <%= select_tag(:search_type, options_for_select(select_option), :style => "float:right" ) %>
</div> </div>
<%#= hidden_field_tag 'project_type', project_type %> <%#= 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" %>
</div> </div>
<% end %> <% end %>

View File

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

View File

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

View File

@ -90,9 +90,16 @@
</h3> </h3>
<% month_now = Time.now.strftime("%m").to_i %> <% month_now = Time.now.strftime("%m").to_i %>
<% year_now = Time.new.strftime("%Y") %> <% year_now = Time.new.strftime("%Y").to_i %>
<!-- 3-8月份为查找春季课程9-2月份为查找秋季课程 --> <!-- 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) %> <% @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 %> <% if cur_school_course.count == 0 %>
@ -107,7 +114,17 @@
</li> </li>
<% end %> <% end %>
<% User.current.logged? ? course_count = 9 : course_count = 10 %> <% 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> </ul>
</div> </div>
<% else %> <% else %>
@ -127,7 +144,17 @@
<li> <li>
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %> <%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
</li> </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 %> <% end %>
</ul> </ul>
</div> </div>

View File

@ -71,7 +71,7 @@
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">
<ul class="d-p-projectlist"> <ul class="d-p-projectlist">
<% @projects.map do |project| %> <% @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;"> <div style="float: left;">
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %> <%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
</div> </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: 可以使用 modal_valid_passing: 可以使用
label_bug: 漏洞 label_bug: 漏洞
label_school_no_course: 该学校未开设任何课程,您可以查看其他学校课程 label_school_no_course: 该学校本学期未开设任何课程,您可以查看其他学校课程
label_school_less_course: 您也可以查看其他学校课程 label_school_less_course: 您也可以查看其他学校课程
label_file_not_found: 对不起,该文件现在不能下载 label_file_not_found: 对不起,该文件现在不能下载

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. # 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| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false
@ -790,6 +790,51 @@ ActiveRecord::Schema.define(:version => 20141231085350) do
t.integer "project_id" t.integer "project_id"
end 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| create_table "praise_tread_caches", :force => true do |t|
t.integer "object_id", :null => false t.integer "object_id", :null => false
t.string "object_type" t.string "object_type"

View File

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

View File

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

View File

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