Merge branch 'szzh' into develop

This commit is contained in:
sw 2015-04-11 11:16:52 +08:00
commit 8d565a1165
13 changed files with 95 additions and 47 deletions

View File

@ -66,8 +66,8 @@ class Mailer < ActionMailer::Base
subject = "[ #{user.show_name} : #{l(:label_day_mail)}]"
@subject = " #{user.show_name} : #{date_to} #{l(:label_day_mail)}"
date_from = "#{date_from} 23:59:59"
date_to = "#{date_to} 23:59:59"
date_from = "#{date_from} 17:59:59"
date_to = "#{date_to} 17:59:59"
# 生成token用于直接点击登录
@user = user
@ -122,11 +122,11 @@ class Mailer < ActionMailer::Base
end
end
# 查询user在课程中发布的通知项目中发的新闻
@course_news = News.find_by_sql("select DISTINCT n.* from news n
@course_news = (course_ids && !course_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n
where n.course_id in (#{course_ids})
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
@project_news = News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids})
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : []
@project_news = (project_ids && !project_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n where n.project_id in (#{project_ids})
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc") : []
# 查询user在课程及个人中留言
@course_journal_messages = JournalsForMessage.find_by_sql("select DISTINCT * from journals_for_messages where

View File

@ -38,7 +38,7 @@
<span class="add_attachment">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
<%= button_tag "#{l(:button_browse)}", :type=>"button", :onclick=>"_file.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',

View File

@ -5,7 +5,7 @@
<div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
</div>
<div class="ping_discon" style="width: 610px;">
<div class="ping_discon upload_img" style="width: 610px;">
<div class="ping_distop">
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
<span>
@ -15,7 +15,7 @@
<%= format_time(journal.created_on) %>
</span>
<div class="cl"></div>
<p class="upload_img">
<p>
<%= journal.notes.html_safe %>
</p>
</div>

View File

@ -68,13 +68,13 @@
<div class="ping_C mb10">
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%></div>
<div class="ping_discon">
<div class="ping_distop">
<div class="ping_distop upload_img">
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %>
<span class="c_grey fr">
<%= format_time(comment.created_on) %>
</span>
<div class="cl"></div>
<p class="upload_img"><%= comment.comments.html_safe %></p>
<p><%= comment.comments.html_safe %></p>
</div>
<div class="ping_disfoot">
<%= link_to_if_authorized_course image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},

View File

@ -90,7 +90,7 @@ form #search_by
<div class="project-search" style="float: right">
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
<div class='search_widget' >
<%= text_field_tag :q, nil, :placeholder => l('welcome.search.information'), style:"float:left;" %>
<%= text_field_tag :q, nil, :placeholder => l('welcome.search.information'), style:"float:left; width:185px;" %>
<input type="text" name="search_by_input" style="display: none" id="search_by_input" value="0">
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();", :style => "float:right" ) %>
<%= select_tag(:search_by,options_for_select([[l('welcome.search.select.userinfo.nickname'),"0"],[l('welcome.search.select.userinfo.showname'),"1"],[l('welcome.search.select.userinfo.email'),"2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>

View File

@ -178,9 +178,9 @@
</h3>
<span style="margin-top: -20px;float: right; display: block;">
<% 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') %>
<% end %>
<%# end %>
<% end %>
</span>
<div class="d-p-projectlist-box">
@ -270,7 +270,8 @@
<li class="message-brief-intro" style="height: auto; line-height:2em; padding-bottom: 1px; border-bottom: 1px dashed ">
<div style="display: inline-block; width: 100%;">
<span class="memo_activity text_nowrap" style="color:gray; display: inline-block; margin-bottom:6px; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %>
<%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %>
</span>
<div class='memo_activity memo_attr'>
<span class='memo_timestamp'>

View File

@ -78,9 +78,8 @@
# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
# default configuration options for all environments
default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
@ -203,6 +202,15 @@ default:
production:
# CJK support
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
email_delivery:
delivery_method: :smtp
smtp_settings:
address: mail.trustie.net
port: 25
domain: mail.trustie.net
authentication: :login
user_name: "mail@trustie.net"
password: "loong2010"
# specific configuration options for development environment
# that overrides the default ones

View File

@ -371,6 +371,33 @@ en:
label_news: News
label_news_description: "Track the latest activities of projects, and obtain the latest information"
label_news_title_tips: "(less than 60 characters)"
#
#
#
# 导出
#
description_all_columns: All Columns
button_export: Export
label_export_options: "%{export_format} export options"
label_changes_details: Details of all changes
#
#
#
# 顶和踩
#
label_issue_praise: Good questionpraise
label_issue_tread: Poor questiontread
label_issue_praise_over: Praised over
label_issue_tread_over: Treaded over
label_issue_appraise_over: Appraised over
label_issue_not_praise_over: Cannot tread yourself~
label_issue_not_treed_over: Cannot praise yourself~
#
# Trustie
#

View File

@ -376,7 +376,33 @@ zh:
label_news: 新闻
label_news_description: 实时了解项目的最新动态,掌握最新项目咨询!
label_news_title_tips: (60个字符以内)
#
#
#
# 导出
#
description_all_columns: 所有列
button_export: 导出
label_export_options: "%{export_format} 导出选项"
label_changes_details: 所有变更的详情
#
#
#
# 顶和踩
#
label_issue_praise: 好问题,顶!
label_issue_tread: 烂问题,踩!
label_issue_praise_over: 我刚才顶过了~
label_issue_tread_over: 我刚才踩过了~
label_issue_not_praise_over: 不能顶自己~
label_issue_not_treed_over: 不能踩自己~
label_issues_score_not_enough: 积分不够,不能踩别人~
label_issue_appraise_over: 只能评价一次哦!
#
#

View File

@ -590,8 +590,7 @@ en:
label_current_version: Current version
label_feed_plural: Feeds
label_changes_details: Details of all changes
label_overall_spent_time: Overall spent time
label_f_hour: "%{value} hour"
label_f_hour_plural: "%{value} hours"
@ -724,7 +723,7 @@ en:
label_git_report_last_commit: Report last commit for files and directories
label_parent_revision: Parent
label_child_revision: Child
label_export_options: "%{export_format} export options"
label_copy_attachments: Copy attachments
label_copy_subtasks: Copy subtasks
label_item_position: "%{position} of %{count}"
@ -789,7 +788,7 @@ en:
button_show: Show
button_hide: Hide
button_edit_section: Edit this section
button_export: Export
button_delete_my_account: Delete my account
button_close: Close
button_reopen: Reopen
@ -914,7 +913,7 @@ en:
description_available_columns: Available Columns
description_selected_columns: Selected Columns
description_all_columns: All Columns
description_issue_category_reassign: Choose issue category
description_wiki_subpages_reassign: Choose new parent page
description_date_range_list: Choose range from list
@ -1122,11 +1121,7 @@ en:
label_how_commit_code_chinese: Chinese
label_welcome_leave_message: Hi!The platform is currently in beta version.If you have any comments and suggestions, please
label_welcome_click_me: Click me
label_issue_praise: Good questionpraise
label_issue_tread: Poor questiontread
label_issue_praise_over: Praised over
label_issue_tread_over: Treaded over
label_issue_appraise_over: Appraised over
label_welcome_my_respond: Please leave your comments and suggestions here
label_no_current_fans: The user has no fans now
label_no_current_watchers: The user hasn't watched others

View File

@ -148,8 +148,8 @@ zh:
# 问题跟踪
#
label_successful_create: 创建成功
label_issues_sum: '问题总数'
lable_issues_undo: '未解决:'
label_issues_sum: "问题总数"
lable_issues_undo: "未解决"
label_issue_new: 新建问题
label_query: 自定义查询
@ -240,14 +240,7 @@ zh:
#问题更新
#顶和踩
label_issue_praise: 好问题,顶!
label_issue_tread: 烂问题,踩!
label_issue_praise_over: 我刚才顶过了~
label_issue_tread_over: 我刚才踩过了~
label_issue_not_praise_over: 不能顶自己~
label_issue_not_treed_over: 不能踩自己~
label_issues_score_not_enough: 积分不够,不能踩别人~

View File

@ -675,7 +675,7 @@ zh:
label_current_version: 当前版本
label_feed_plural: Feeds
label_changes_details: 所有变更的详情
label_spent_time: 耗时
label_overall_spent_time: 总体耗时
label_f_hour: "%{value} 小时"
@ -1035,9 +1035,7 @@ zh:
setting_default_issue_start_date_to_creation_date: 使用当前日期作为新问题的开始日期
button_edit_section: 编辑此区域
setting_repositories_encodings: 附件和版本库编码
description_all_columns: 所有列
button_export: 导出
label_export_options: "%{export_format} 导出选项"
error_pic_type: "仅支持如下图片格式:"
notice_failed_to_save_time_entries: "无法保存下列所选取的 %{total} 个项目中的 %{count} 工时: %{ids}。"
@ -1360,7 +1358,7 @@ zh:
label_issues_score_not_enough: 积分不够,不能踩别人~
#end
label_issue_appraise_over: 只能评价一次哦!
label_welcome_my_respond: 请在此留下你的意见和建议!
label_course_feedback: 留言

View File

@ -37,7 +37,7 @@ function addFile(inputEl, file, eagerUpload) {
$('<span >'+$(inputEl).data('fieldIsPublic')+':</span>').attr({ 'class': 'ispublic-label' }) ,
$('<input>', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({ 'href': "#", 'class': 'remove-upload' }).click(function(){
if(confirm('您确定要删除吗?')){
if(confirm($(inputEl).data('areYouSure'))){
removeFile();
if(!eagerUpload){
(function(e){
@ -107,7 +107,7 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
//gcm files count and add delete_all link
var count=$('#attachments_fields>span').length;
$('#upload_file_count').html("<span id=\"count\">"+count+"</span>"+"个文件已上传");
$('#upload_file_count').html("<span id=\"count\">"+count+"</span>"+$(inputEl).data('fileCount'));
if(count>=1){
var add_attachs=$('.add_attachment');
var delete_all=$('.remove_all');
@ -141,7 +141,7 @@ function removeFile() {
//gcm delete all file
function removeAll(){
if(confirm("您确定要删除所有文件吗")){
if(confirm($(inputEl).data('deleteAllFiles'))){
$(".remove-upload").removeAttr("data-confirm");
$(".remove-upload").click();
}
@ -196,7 +196,7 @@ function addInputFiles(inputEl) {
attachmentId = addFile(inputEl, { name: aFilename[ aFilename.length - 1 ] }, false);
if (attachmentId) {
$(inputEl).attr({ name: 'attachments[' + attachmentId + '][file]'}).hide();
$('#upload_file_count').html("已上传"+"<span id=\"count\">"+1+"</span>"+"个文件");
$('#upload_file_count').html("<span id=\"count\">"+count+"</span>"+$(inputEl).data('fileCount'));
}
}