Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
9886a3212c
|
@ -4,6 +4,7 @@
|
||||||
/.bundle
|
/.bundle
|
||||||
*.swp
|
*.swp
|
||||||
/config/database.yml
|
/config/database.yml
|
||||||
|
/config/configuration.yml
|
||||||
/files/*
|
/files/*
|
||||||
/log/*
|
/log/*
|
||||||
/tmp/*
|
/tmp/*
|
||||||
|
@ -14,5 +15,4 @@
|
||||||
/db/schema.rb
|
/db/schema.rb
|
||||||
/Gemfile.lock
|
/Gemfile.lock
|
||||||
/lib/plugins/acts_as_versioned/test/debug.log
|
/lib/plugins/acts_as_versioned/test/debug.log
|
||||||
/config/configuration.yml
|
|
||||||
.rbenv-gemsets
|
.rbenv-gemsets
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -18,7 +18,7 @@ gem "builder", "3.0.0"
|
||||||
gem 'acts-as-taggable-on', '2.4.1'
|
gem 'acts-as-taggable-on', '2.4.1'
|
||||||
gem 'spreadsheet'
|
gem 'spreadsheet'
|
||||||
gem 'ruby-ole'
|
gem 'ruby-ole'
|
||||||
gem 'email_verifier'
|
#gem 'email_verifier'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'better_errors', path: 'lib/better_errors'
|
gem 'better_errors', path: 'lib/better_errors'
|
||||||
|
|
|
@ -273,6 +273,7 @@ class CoursesController < ApplicationController
|
||||||
|
|
||||||
if valid_attr.eql?('name')
|
if valid_attr.eql?('name')
|
||||||
faker.name = valid_value
|
faker.name = valid_value
|
||||||
|
faker.course_id = params[:course_id]
|
||||||
faker.valid?
|
faker.valid?
|
||||||
req[:valid] = faker.errors[:name].blank?
|
req[:valid] = faker.errors[:name].blank?
|
||||||
req[:message] = faker.errors[:name]
|
req[:message] = faker.errors[:name]
|
||||||
|
|
|
@ -47,6 +47,7 @@ class PollController < ApplicationController
|
||||||
:user_id => User.current.id,
|
:user_id => User.current.id,
|
||||||
:published_at => Time.now,
|
:published_at => Time.now,
|
||||||
:closed_at => Time.now,
|
:closed_at => Time.now,
|
||||||
|
:show_result => 1,
|
||||||
:polls_description => ""
|
:polls_description => ""
|
||||||
}
|
}
|
||||||
@poll = Poll.create option
|
@poll = Poll.create option
|
||||||
|
|
|
@ -12,11 +12,20 @@ class CourseGroup < ActiveRecord::Base
|
||||||
before_destroy :set_member_nil
|
before_destroy :set_member_nil
|
||||||
|
|
||||||
attr_accessible :name
|
attr_accessible :name
|
||||||
validates :name, :presence => true, :length => {:maximum => 20},
|
validates :name, :presence => true, :length => {:maximum => 20}
|
||||||
:uniqueness => {case_sensitive: false}
|
validate :unique_name_and_course
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def set_member_nil
|
def set_member_nil
|
||||||
if self.members && self.members.count > 0
|
if self.members && self.members.count > 0
|
||||||
self.members.update_all("course_group_id = 0")
|
self.members.update_all("course_group_id = 0")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
private
|
||||||
|
def unique_name_and_course
|
||||||
|
if CourseGroup.where("name=? and course_id=?", name, course_id).first
|
||||||
|
errors.add(:name, :groupname_repeat)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,7 +19,8 @@ class IssueObserver < ActiveRecord::Observer
|
||||||
|
|
||||||
def after_create(issue)
|
def after_create(issue)
|
||||||
Thread.start do
|
Thread.start do
|
||||||
recipients = issue.recipients
|
# 将跟踪者与本项目的其他成员都设为收件方,并去重,不在进行抄送,
|
||||||
|
recipients = issue.recipients - issue.watcher_recipients + issue.watcher_recipients
|
||||||
recipients.each do |rec|
|
recipients.each do |rec|
|
||||||
Mailer.issue_add(issue,rec).deliver if Setting.notified_events.include?('issue_added')
|
Mailer.issue_add(issue,rec).deliver if Setting.notified_events.include?('issue_added')
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,7 +24,8 @@ class JournalObserver < ActiveRecord::Observer
|
||||||
(Setting.notified_events.include?('issue_priority_updated') && journal.new_value_for('priority_id').present?)
|
(Setting.notified_events.include?('issue_priority_updated') && journal.new_value_for('priority_id').present?)
|
||||||
)
|
)
|
||||||
Thread.start do
|
Thread.start do
|
||||||
recipients = journal.recipients
|
# 将跟踪者与本项目的其他成员都设为收件方,并去重,不在进行抄送,
|
||||||
|
recipients = journal.recipients - journal.watcher_recipients + journal.watcher_recipients
|
||||||
recipients.each do |rec|
|
recipients.each do |rec|
|
||||||
|
|
||||||
Mailer.issue_edit(journal,rec).deliver
|
Mailer.issue_edit(journal,rec).deliver
|
||||||
|
|
|
@ -147,13 +147,11 @@ class Mailer < ActionMailer::Base
|
||||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
||||||
|
|
||||||
@user_url = url_for(my_account_url(user,:token => @token.value))
|
@user_url = url_for(my_account_url(user,:token => @token.value))
|
||||||
cc = nil
|
|
||||||
if recipients == issue.recipients[0]
|
|
||||||
cc = issue.watcher_recipients - issue.recipients
|
|
||||||
end
|
|
||||||
subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
||||||
mail(:to => recipients,
|
mail(:to => recipients,
|
||||||
:cc => cc,
|
|
||||||
:subject => subject)
|
:subject => subject)
|
||||||
end
|
end
|
||||||
# issue.attachments.each do |attach|
|
# issue.attachments.each do |attach|
|
||||||
|
@ -198,11 +196,7 @@ class Mailer < ActionMailer::Base
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Watchers in cc
|
|
||||||
cc = nil
|
|
||||||
if recipients == journal.recipients[0]
|
|
||||||
cc = journal.watcher_recipients - journal.recipients
|
|
||||||
end
|
|
||||||
|
|
||||||
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
|
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
|
||||||
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
||||||
|
@ -211,7 +205,7 @@ class Mailer < ActionMailer::Base
|
||||||
@journal = journal
|
@journal = journal
|
||||||
# @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}")
|
# @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}")
|
||||||
mail(:to => recipients,
|
mail(:to => recipients,
|
||||||
:cc => cc,
|
|
||||||
:subject => s)
|
:subject => s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ class User < Principal
|
||||||
validates_confirmation_of :password, :allow_nil => true
|
validates_confirmation_of :password, :allow_nil => true
|
||||||
validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true
|
validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true
|
||||||
validate :validate_password_length
|
validate :validate_password_length
|
||||||
validates_email_realness_of :mail
|
#validates_email_realness_of :mail
|
||||||
before_create :set_mail_notification
|
before_create :set_mail_notification
|
||||||
before_save :update_hashed_password
|
before_save :update_hashed_password
|
||||||
before_destroy :remove_references_before_destroy
|
before_destroy :remove_references_before_destroy
|
||||||
|
|
|
@ -56,18 +56,30 @@
|
||||||
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'bid_path') %>
|
<%= link_to(bid.name, course_for_bid_path(bid), :class => 'bid_path') %>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td style="width: 110px;">
|
<td style="width: 150px;">
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
<% if User.current.logged? && is_cur_course_student(@course) %>
|
<% if User.current.logged? && is_cur_course_student(@course) %>
|
||||||
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
<% cur_user_homework = cur_user_homework_for_bid(bid) %>
|
||||||
|
<span class="span_wping">
|
||||||
|
<% if bid.open_anonymous_evaluation == 1 %>
|
||||||
|
<% case bid.comment_status %>
|
||||||
|
<% when 0 %>
|
||||||
|
<a>未开启匿评</a>
|
||||||
|
<% when 1 %>
|
||||||
|
<a> 匿评中.. </a>
|
||||||
|
<% when 2 %>
|
||||||
|
<a> 匿评结束 </a>
|
||||||
|
<% end %>
|
||||||
|
<% end%>
|
||||||
|
</span>
|
||||||
<% if cur_user_homework && cur_user_homework.empty? %>
|
<% if cur_user_homework && cur_user_homework.empty? %>
|
||||||
<span class="span_wping">
|
<span class="span_wping">
|
||||||
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
|
<%= link_to l(:label_commit_homework),new_exercise_book_path(bid) %>
|
||||||
</span>
|
</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span style="color: green; float: right">
|
<span class="span_wping">
|
||||||
<%= l(:lable_has_commit_homework)%>
|
<a>已 提 交</a>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (User.current.admin?||User.current.allowed_to?(:as_teacher,@course)) %>
|
<% if (User.current.admin?||User.current.allowed_to?(:as_teacher,@course)) %>
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
$.get(
|
$.get(
|
||||||
'<%=valid_ajax_course_path%>',
|
'<%=valid_ajax_course_path%>',
|
||||||
{ valid: "name",
|
{ valid: "name",
|
||||||
value: document.getElementById('group_name').value },
|
value: document.getElementById('group_name').value,
|
||||||
|
course_id: <%= @course.id %> },
|
||||||
function (data) {
|
function (data) {
|
||||||
if (!data.valid) {
|
if (!data.valid) {
|
||||||
alert(data.message);
|
alert(data.message);
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
#scrollsidebar{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
||||||
div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,ol{ }
|
#scrollsidebar div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,ol{ }
|
||||||
div,img,tr,td,table{ border:0;}
|
#scrollsidebar div,img,tr,td,table{ border:0;}
|
||||||
ol,ul,li{ list-style-type:none}
|
#scrollsidebar ol,ul,li{ list-style-type:none}
|
||||||
.cl{ clear:both; overflow:hidden; }
|
#scrollsidebar .cl{ clear:both; overflow:hidden; }
|
||||||
a{ text-decoration:none;}
|
#scrollsidebar a{ text-decoration:none;}
|
||||||
|
|
||||||
html{ overflow-x:hidden;}
|
html{ overflow-x:hidden;}
|
||||||
.custom_service p img {display: inline; margin-top:-5px; vertical-align:middle;}
|
.custom_service p img {display: inline; margin-top:-5px; vertical-align:middle;}
|
||||||
|
@ -24,7 +24,7 @@ html{ overflow-x:hidden;}
|
||||||
.msgserver { margin:10px 0 4px 4px;}
|
.msgserver { margin:10px 0 4px 4px;}
|
||||||
.msgserver a { background:url(/images/sidebar_bg.png) no-repeat -119px -115px; padding-left:22px;}
|
.msgserver a { background:url(/images/sidebar_bg.png) no-repeat -119px -115px; padding-left:22px;}
|
||||||
.opnionText{ width:120px; height:180px; border-color:#cecece; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; color:#999; padding:3px;}
|
.opnionText{ width:120px; height:180px; border-color:#cecece; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; color:#999; padding:3px;}
|
||||||
a.opnionButton{ display:block; color:#fd6e2a; font-weight: bold; margin:-25px auto 0; text-align:center;}
|
a.opnionButton{ display:block; font-weight: bold; margin:-25px auto 0; text-align:center;}
|
||||||
a:hover.opnionButton{ text-decoration:underline;}
|
a:hover.opnionButton{ text-decoration:underline;}
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,15 +46,15 @@ a:hover.opnionButton{ text-decoration:underline;}
|
||||||
// Url:
|
// Url:
|
||||||
// Data : 2012-03-30
|
// Data : 2012-03-30
|
||||||
//
|
//
|
||||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD> : float --> <20><><EFBFBD><EFBFBD>[left or right]
|
// ???? : float --> ????[left or right]
|
||||||
// minStatue --> <EFBFBD><EFBFBD>С״̬<EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD>show_btn
|
// minStatue --> ??С???????show_btn
|
||||||
// skin --> Ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// skin --> ???????
|
||||||
// durationTime --> <EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
// durationTime --> ??????
|
||||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD> :
|
//???? :
|
||||||
$("#scrollsidebar2").fix({
|
$("#scrollsidebar2").fix({
|
||||||
float : 'right', //default.left or right
|
float : 'right', //default.left or right
|
||||||
minStatue : true, //default.false or true
|
minStatue : true, //default.false or true
|
||||||
skin : 'green', //default.gray or yellow <EFBFBD><EFBFBD>blue <20><>green <20><>orange <20><>white
|
skin : 'green', //default.gray or yellow ??blue ??green ??orange ??white
|
||||||
durationTime : 1000 //
|
durationTime : 1000 //
|
||||||
});
|
});
|
||||||
//
|
//
|
||||||
|
@ -71,14 +71,14 @@ a:hover.opnionButton{ text-decoration:underline;}
|
||||||
var options = $.extend(defaults, options);
|
var options = $.extend(defaults, options);
|
||||||
|
|
||||||
this.each(function(){
|
this.each(function(){
|
||||||
//<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
//???????
|
||||||
var thisBox = $(this),
|
var thisBox = $(this),
|
||||||
closeBtn = thisBox.find('.close_btn' ),
|
closeBtn = thisBox.find('.close_btn' ),
|
||||||
show_btn = thisBox.find('.show_btn' ),
|
show_btn = thisBox.find('.show_btn' ),
|
||||||
sideContent = thisBox.find('.side_content'),
|
sideContent = thisBox.find('.side_content'),
|
||||||
sideList = thisBox.find('.side_list')
|
sideList = thisBox.find('.side_list')
|
||||||
;
|
;
|
||||||
var defaultTop = thisBox.offset().top; //<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><EFBFBD>top
|
var defaultTop = thisBox.offset().top; //????????top
|
||||||
|
|
||||||
thisBox.css(options.float, 0);
|
thisBox.css(options.float, 0);
|
||||||
if(options.minStatue){
|
if(options.minStatue){
|
||||||
|
@ -87,11 +87,11 @@ a:hover.opnionButton{ text-decoration:underline;}
|
||||||
show_btn.css('width', 25);
|
show_btn.css('width', 25);
|
||||||
|
|
||||||
}
|
}
|
||||||
//Ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
//???????
|
||||||
if(options.skin) thisBox.addClass('side_'+options.skin);
|
if(options.skin) thisBox.addClass('side_'+options.skin);
|
||||||
|
|
||||||
|
|
||||||
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD>scroll<EFBFBD>¼<EFBFBD>
|
//????scroll???
|
||||||
$(window).bind("scroll",function(){
|
$(window).bind("scroll",function(){
|
||||||
var offsetTop = defaultTop + $(window).scrollTop() + "px";
|
var offsetTop = defaultTop + $(window).scrollTop() + "px";
|
||||||
thisBox.animate({
|
thisBox.animate({
|
||||||
|
@ -99,15 +99,15 @@ a:hover.opnionButton{ text-decoration:underline;}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: options.durationTime,
|
duration: options.durationTime,
|
||||||
queue: false //<EFBFBD>˶<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>붯<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
queue: false //???????????????????
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//close<EFBFBD>¼<EFBFBD>
|
//close???
|
||||||
closeBtn.bind("click",function(){
|
closeBtn.bind("click",function(){
|
||||||
sideContent.animate({width: '0px'},"fast");
|
sideContent.animate({width: '0px'},"fast");
|
||||||
show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
|
show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast");
|
||||||
});
|
});
|
||||||
//show<EFBFBD>¼<EFBFBD>
|
//show???
|
||||||
show_btn.click(function() {
|
show_btn.click(function() {
|
||||||
$(this).animate({width: '0px'},"fast");
|
$(this).animate({width: '0px'},"fast");
|
||||||
sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast");
|
sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast");
|
||||||
|
@ -132,17 +132,15 @@ function f_submit()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
|
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
|
||||||
<title>意见反馈</title>
|
<title>意见反馈</title>
|
||||||
<link href="css/sidebar.css" rel="stylesheet" type="text/css" />
|
|
||||||
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
|
|
||||||
<script type="text/javascript" src="js/sidebar.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body style="height:auto">
|
<body style="height:auto">
|
||||||
<!-- ´úÂë ¿ªÊ¼ -->
|
<!-- ?ú?? ???? -->
|
||||||
<div class="scrollsidebar" id="scrollsidebar">
|
<div class="scrollsidebar" id="scrollsidebar">
|
||||||
<div class="side_content">
|
<div class="side_content">
|
||||||
<div class="side_list">
|
<div class="side_list">
|
||||||
|
@ -154,13 +152,13 @@ function f_submit()
|
||||||
<%= f.text_area :subject, :class => "opnionText",:placeholder => "有什么想说的,尽管来咆哮吧~~"%>
|
<%= f.text_area :subject, :class => "opnionText",:placeholder => "有什么想说的,尽管来咆哮吧~~"%>
|
||||||
<%= f.hidden_field :content, :required => true ,:value=>'该贴来自用户反馈!'%>
|
<%= f.hidden_field :content, :required => true ,:value=>'该贴来自用户反馈!'%>
|
||||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||||
<a href="javascript:void(0);" class="opnionButton" id="" onclick="f_submit();">提 交</a>
|
<a href="javascript:void(0);" class="opnionButton" style=" color:#fd6e2a;" id="" onclick="f_submit();">提 交</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="msgserver">
|
<div class="msgserver">
|
||||||
<p>
|
<p>
|
||||||
<a href="http://user.trustie.net/users/12/user_newfeedback"><%= l(:label_technical_support) %>黄井泉</a></br>
|
<a href="http://user.trustie.net/users/12/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>黄井泉</a></br>
|
||||||
<a href="http://user.trustie.net/users/34/user_newfeedback"><%= l(:label_technical_support) %>白 羽</a>
|
<a href="http://user.trustie.net/users/34/user_newfeedback" style="color: #15BCCF;"><%= l(:label_technical_support) %>白 羽</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -169,7 +167,7 @@ function f_submit()
|
||||||
</div>
|
</div>
|
||||||
<div class="show_btn"><span>提交</span></div>
|
<div class="show_btn"><span>提交</span></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ´úÂë ½áÊø -->
|
<!-- ?ú?? ?á?? -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$("#scrollsidebar").fix({
|
$("#scrollsidebar").fix({
|
||||||
|
|
|
@ -305,7 +305,7 @@
|
||||||
.polls_btn a{font-size:14px; color:#444444;font-weight:bold;}
|
.polls_btn a{font-size:14px; color:#444444;font-weight:bold;}
|
||||||
.polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;}
|
.polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;}
|
||||||
.polls_btn a{ float:left;}
|
.polls_btn a{ float:left;}
|
||||||
.polls_n{float: left;background: #ff5d31;color: #fff;width: 12px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; }
|
.polls_n{float: left;background: #ff5d31;color: #fff;width: 32px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; }
|
||||||
.polls_n p{ margin-top:-4px;}
|
.polls_n p{ margin-top:-4px;}
|
||||||
.cl{ clear:both; overflow:hidden; }
|
.cl{ clear:both; overflow:hidden; }
|
||||||
</style>
|
</style>
|
||||||
|
@ -313,7 +313,7 @@
|
||||||
<!--<a href="#">问卷调查<span >(12)</span></a>-->
|
<!--<a href="#">问卷调查<span >(12)</span></a>-->
|
||||||
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id)%>
|
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id)%>
|
||||||
<div class="polls_n">
|
<div class="polls_n">
|
||||||
<p>N</p>
|
<p>NEW</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!-- <h1><%#= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1> -->
|
<!-- <h1><%#= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1> -->
|
||||||
<p>
|
<p>
|
||||||
<span class="c_blue" style="color:#1b55a7;">
|
<span class="c_blue" style="color:#1b55a7;">
|
||||||
<%= link_to(h("#{@issue.author}(#{@issue.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
|
<%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
|
||||||
</span><%= l(:mail_issue_title_userin)%>
|
</span><%= l(:mail_issue_title_userin)%>
|
||||||
<span class="c_blue" style="color:#1b55a7;"><%= link_to(h("#{@issue.project.name}"), @project_url, :style=>'color:#1b55a7; font-weight:bold;') %></span><%= l(:mail_issue_title_active)%></p>
|
<span class="c_blue" style="color:#1b55a7;"><%= link_to(h("#{@issue.project.name}"), @project_url, :style=>'color:#1b55a7; font-weight:bold;') %></span><%= l(:mail_issue_title_active)%></p>
|
||||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
<%= link_to(h("#{@issue.author}(#{@issue.author.show_name})"), @issue_author_url) %>
|
<%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url) %>
|
||||||
<%= l(:mail_issue_title_userin)%>
|
<%= l(:mail_issue_title_userin)%>
|
||||||
<%= link_to(h("#{@issue.project.name}"),@project_url) %><%= l(:mail_issue_title_active)%>
|
<%= link_to(h("#{@issue.project.name}"),@project_url) %><%= l(:mail_issue_title_active)%>
|
||||||
<%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url) %>
|
<%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url) %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<em>尊敬的用户,<%= @user %>给你留言了:</em>
|
<em>尊敬的用户,<%= @user %>给你留言了:</em>
|
||||||
<div><%= @message %></div>
|
<div><%= @message %></div>
|
||||||
<h1>点击链接查看最新回复<%= link_to(@url, @url) %></h1>
|
<p>点击链接查看最新回复<%= link_to(@url, @url) %>
|
||||||
<h4><%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%></h4>
|
<%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%></p>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,37 @@
|
||||||
<h1>
|
|
||||||
<% if @message.project %>
|
|
||||||
<%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url) %>
|
|
||||||
<% elsif @message.course %>
|
|
||||||
<%=h @message.board.course.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url) %>
|
|
||||||
<% end %>
|
|
||||||
</h1>
|
|
||||||
<em><%=h @message.author %></em>
|
|
||||||
|
|
||||||
<%= textilizable(@message, :content, :only_path => false) %>
|
<p>
|
||||||
|
<span class="c_blue" style="color:#1b55a7;">
|
||||||
|
<%= h @message.author %>(<%= @message.author.show_name %>)
|
||||||
|
</span><%= l(:mail_issue_title_userin)%>
|
||||||
|
<span class="c_blue" style="color:#1b55a7;">
|
||||||
|
<% if @message.project %>
|
||||||
|
<%=h @message.board.project.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
||||||
|
<% elsif @message.course %>
|
||||||
|
<%=h @message.board.course.name %> - <%=h @message.board.name %>: <%= link_to(h(@message.subject), @message_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
||||||
|
<% end %>
|
||||||
|
</span><%= l(:mail_issue_title_active)%></p>
|
||||||
|
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||||
|
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||||
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span><span style="float: left; width: 526px"> <%= link_to(h(@message.subject), @message_url, :style=>'color:#1b55a7; font-weight:bold;') %></span></li>
|
||||||
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span>
|
||||||
|
<% if @message.project %>
|
||||||
|
<span style="float: left; width: 526px"><%=h @message.board.project.name %> - <%=h @message.board.name %></span>
|
||||||
|
<% elsif @message.course %>
|
||||||
|
<span style="float: left; width: 526px"><%=h @message.board.course.name %> - <%=h @message.board.name %></span>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||||
|
<span style="float: left; width: 526px">
|
||||||
|
<%= @message.content %>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||||
|
<label class="mail_reply">
|
||||||
|
<%= link_to(h(:mail_issue_reply), @message_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
|
||||||
|
</label>
|
||||||
|
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
{
|
{
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>');
|
||||||
showModal('ajax-modal', '310px');
|
showModal('ajax-modal', '310px');
|
||||||
$('#ajax-modal').css('height','110px');
|
$('#ajax-modal').css('height','115px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="ur_inputs">
|
<div class="ur_inputs">
|
||||||
<p>
|
<p>
|
||||||
<%= get_anwser_vote_text poll_question.id,User.current.id%>
|
<%= get_anwser_vote_text(poll_question.id,User.current.id).html_safe%>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</div>");
|
"</div>");
|
||||||
showModal('ajax-modal', '310px');
|
showModal('ajax-modal', '310px');
|
||||||
$('#ajax-modal').css('height','110px');
|
$('#ajax-modal').css('height','115px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</div>");
|
"</div>");
|
||||||
showModal('ajax-modal', '310px');
|
showModal('ajax-modal', '310px');
|
||||||
$('#ajax-modal').css('height','110px');
|
$('#ajax-modal').css('height','115px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
|
|
|
@ -87,12 +87,12 @@ default:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
address: smtp.163.com
|
address: smtp.126.com
|
||||||
port: 25
|
port: 25
|
||||||
domain: smtp.163.com
|
domain: smtp.126.com
|
||||||
authentication: :plain
|
authentication: :plain
|
||||||
user_name: mcb592@163.com
|
user_name: "alanlong9278@126.com"
|
||||||
password: 'mcb1989822'
|
password: 'alanlong8788786'
|
||||||
|
|
||||||
# Absolute path to the directory where attachments are stored.
|
# Absolute path to the directory where attachments are stored.
|
||||||
# The default is the 'files' directory in your Redmine instance.
|
# The default is the 'files' directory in your Redmine instance.
|
||||||
|
|
|
@ -152,7 +152,7 @@ zh:
|
||||||
not_same_project: "不属于同一个项目"
|
not_same_project: "不属于同一个项目"
|
||||||
circular_dependency: "此关联将导致循环依赖"
|
circular_dependency: "此关联将导致循环依赖"
|
||||||
cant_link_an_issue_with_a_descendant: "问题不能关联到它的子任务"
|
cant_link_an_issue_with_a_descendant: "问题不能关联到它的子任务"
|
||||||
|
groupname_repeat: "该班名已存在"
|
||||||
|
|
||||||
|
|
||||||
actionview_instancetag_blank_option: 请选择
|
actionview_instancetag_blank_option: 请选择
|
||||||
|
@ -598,6 +598,7 @@ zh:
|
||||||
label_document_added: 文档已添加
|
label_document_added: 文档已添加
|
||||||
label_forum_message_added: 发帖成功
|
label_forum_message_added: 发帖成功
|
||||||
label_forum_add: 贴吧创建成功
|
label_forum_add: 贴吧创建成功
|
||||||
|
label_message_reply: 回帖人
|
||||||
label_document_public_info: (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该文档。)
|
label_document_public_info: (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该文档。)
|
||||||
label_role: 角色
|
label_role: 角色
|
||||||
label_role_plural: 角色
|
label_role_plural: 角色
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
class AddShowResult < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :polls, :show_result, :integer, default: 1
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :polls, :show_result
|
||||||
|
end
|
||||||
|
end
|
12
db/schema.rb
12
db/schema.rb
|
@ -23,6 +23,18 @@ ActiveRecord::Schema.define(:version => 20150121030451) do
|
||||||
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
|
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
|
||||||
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
|
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
|
||||||
|
|
||||||
|
create_table "api_keys", :force => true do |t|
|
||||||
|
t.string "access_token"
|
||||||
|
t.datetime "expires_at"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.boolean "active", :default => true
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
|
||||||
|
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
|
||||||
|
|
||||||
create_table "applied_projects", :force => true do |t|
|
create_table "applied_projects", :force => true do |t|
|
||||||
t.integer "project_id", :null => false
|
t.integer "project_id", :null => false
|
||||||
t.integer "user_id", :null => false
|
t.integer "user_id", :null => false
|
||||||
|
|
|
@ -1433,8 +1433,8 @@ ul.contest-notification-list li span{
|
||||||
}
|
}
|
||||||
|
|
||||||
.xls {
|
.xls {
|
||||||
background: url('../images/icon_excel.gif') no-repeat scroll 1px 50% transparent;
|
/*background: url('../images/icon_excel.gif') no-repeat scroll 1px 50% transparent;*/
|
||||||
padding: 2px 0px 3px 16px;
|
/*padding: 2px 0px 3px 16px;*/
|
||||||
font-family:微软雅黑 !important;
|
font-family:微软雅黑 !important;
|
||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
color: #136b3b !important;
|
color: #136b3b !important;
|
||||||
|
|
|
@ -14,9 +14,9 @@ div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margi
|
||||||
#polls .fr{ float:right;}
|
#polls .fr{ float:right;}
|
||||||
|
|
||||||
/*问卷按钮*/
|
/*问卷按钮*/
|
||||||
.polls_btn{ height:33px;border-top:1px solid #15bed1; border-bottom:1px solid #15bed1;border-right:1px solid #cee6e6; width:225px; padding:7px 0 0 15px; }
|
/*.polls_btn{ height:33px;border-top:1px solid #15bed1; border-bottom:1px solid #15bed1;border-right:1px solid #cee6e6; width:225px; padding:7px 0 0 15px; }*/
|
||||||
.polls_btn a{font-size:14px; color:#444444;font-weight:bold;}
|
/*.polls_btn a{font-size:14px; color:#444444;font-weight:bold;}*/
|
||||||
.polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;}
|
/*.polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;}*/
|
||||||
|
|
||||||
/*问卷列表*/
|
/*问卷列表*/
|
||||||
.polls_content{ width:615px;padding-left: 6px;}
|
.polls_content{ width:615px;padding-left: 6px;}
|
||||||
|
@ -53,7 +53,7 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
|
||||||
.ur_inputs label{ padding-left:10px;word-break: break-all; word-wrap: break-word;}
|
.ur_inputs label{ padding-left:10px;word-break: break-all; word-wrap: break-word;}
|
||||||
.ur_inputs input{ margin-right:5px;}
|
.ur_inputs input{ margin-right:5px;}
|
||||||
.ur_text{ height:30px;}
|
.ur_text{ height:30px;}
|
||||||
.ur_textbox{ border:1px solid #dcdcdc !important; color:#676765;}
|
.ur_textbox{ border:1px solid #dcdcdc !important; color:#676765; word-break:break-all; word-wrap:break-word;}
|
||||||
.ur_buttons{ width:250px; margin:20px auto 10px;}
|
.ur_buttons{ width:250px; margin:20px auto 10px;}
|
||||||
a.ur_button{ display:block; width:106px; height:37px; background:#15bccf; color:#fff; font-size:16px; text-align:center; padding-top:3px; float:left; margin-right:15px;}
|
a.ur_button{ display:block; width:106px; height:37px; background:#15bccf; color:#fff; font-size:16px; text-align:center; padding-top:3px; float:left; margin-right:15px;}
|
||||||
a:hover.ur_button{ background:#0fa9bb; text-decoration:none;}
|
a:hover.ur_button{ background:#0fa9bb; text-decoration:none;}
|
||||||
|
|
Loading…
Reference in New Issue