Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
155af34215
|
@ -4,6 +4,7 @@
|
|||
/.bundle
|
||||
*.swp
|
||||
/config/database.yml
|
||||
/config/configuration.yml
|
||||
/files/*
|
||||
/log/*
|
||||
/tmp/*
|
||||
|
@ -14,5 +15,4 @@
|
|||
/db/schema.rb
|
||||
/Gemfile.lock
|
||||
/lib/plugins/acts_as_versioned/test/debug.log
|
||||
/config/configuration.yml
|
||||
.rbenv-gemsets
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -18,7 +18,7 @@ gem "builder", "3.0.0"
|
|||
gem 'acts-as-taggable-on', '2.4.1'
|
||||
gem 'spreadsheet'
|
||||
gem 'ruby-ole'
|
||||
gem 'email_verifier'
|
||||
#gem 'email_verifier'
|
||||
|
||||
group :development do
|
||||
gem 'better_errors', path: 'lib/better_errors'
|
||||
|
|
|
@ -273,6 +273,7 @@ class CoursesController < ApplicationController
|
|||
|
||||
if valid_attr.eql?('name')
|
||||
faker.name = valid_value
|
||||
faker.course_id = params[:course_id]
|
||||
faker.valid?
|
||||
req[:valid] = faker.errors[:name].blank?
|
||||
req[:message] = faker.errors[:name]
|
||||
|
|
|
@ -12,11 +12,20 @@ class CourseGroup < ActiveRecord::Base
|
|||
before_destroy :set_member_nil
|
||||
|
||||
attr_accessible :name
|
||||
validates :name, :presence => true, :length => {:maximum => 20},
|
||||
:uniqueness => {case_sensitive: false}
|
||||
validates :name, :presence => true, :length => {:maximum => 20}
|
||||
validate :unique_name_and_course
|
||||
|
||||
|
||||
|
||||
def set_member_nil
|
||||
if self.members && self.members.count > 0
|
||||
self.members.update_all("course_group_id = 0")
|
||||
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
|
||||
|
|
|
@ -188,7 +188,7 @@ class User < Principal
|
|||
validates_confirmation_of :password, :allow_nil => true
|
||||
validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true
|
||||
validate :validate_password_length
|
||||
validates_email_realness_of :mail
|
||||
#validates_email_realness_of :mail
|
||||
before_create :set_mail_notification
|
||||
before_save :update_hashed_password
|
||||
before_destroy :remove_references_before_destroy
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
$.get(
|
||||
'<%=valid_ajax_course_path%>',
|
||||
{ valid: "name",
|
||||
value: document.getElementById('group_name').value },
|
||||
value: document.getElementById('group_name').value,
|
||||
course_id: <%= @course.id %> },
|
||||
function (data) {
|
||||
if (!data.valid) {
|
||||
alert(data.message);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- <h1><%#= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1> -->
|
||||
<p>
|
||||
<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 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;">
|
||||
|
|
|
@ -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)%>
|
||||
<%= link_to(h("#{@issue.project.name}"),@project_url) %><%= l(:mail_issue_title_active)%>
|
||||
<%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url) %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<em>尊敬的用户,<%= @user %>给你留言了:</em>
|
||||
<div><%= @message %></div>
|
||||
<h1>点击链接查看最新回复<%= link_to(@url, @url) %></h1>
|
||||
<h4><%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%></h4>
|
||||
<p>点击链接查看最新回复<%= link_to(@url, @url) %>
|
||||
<%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%></p>
|
||||
|
||||
|
|
|
@ -1,10 +1,41 @@
|
|||
<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) %>
|
||||
|
||||
|
||||
|
||||
<!-- <h1><%#= link_to(h("#{issue.tracker.name} ##{issue.project_index}: #{issue.subject}"), issue_url) %></h1> -->
|
||||
<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>
|
||||
|
||||
|
||||
|
|
|
@ -87,12 +87,12 @@ default:
|
|||
|
||||
|
||||
|
||||
address: smtp.163.com
|
||||
address: smtp.126.com
|
||||
port: 25
|
||||
domain: smtp.163.com
|
||||
domain: smtp.126.com
|
||||
authentication: :plain
|
||||
user_name: mcb592@163.com
|
||||
password: 'mcb1989822'
|
||||
user_name: "alanlong9278@126.com"
|
||||
password: 'alanlong8788786'
|
||||
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
|
|
|
@ -152,7 +152,7 @@ zh:
|
|||
not_same_project: "不属于同一个项目"
|
||||
circular_dependency: "此关联将导致循环依赖"
|
||||
cant_link_an_issue_with_a_descendant: "问题不能关联到它的子任务"
|
||||
|
||||
groupname_repeat: "该班名已存在"
|
||||
|
||||
|
||||
actionview_instancetag_blank_option: 请选择
|
||||
|
@ -598,6 +598,7 @@ zh:
|
|||
label_document_added: 文档已添加
|
||||
label_forum_message_added: 发帖成功
|
||||
label_forum_add: 贴吧创建成功
|
||||
label_message_reply: 回帖人
|
||||
label_document_public_info: (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该文档。)
|
||||
label_role: 角色
|
||||
label_role_plural: 角色
|
||||
|
|
Loading…
Reference in New Issue