Merge branch 'dev_hjq' into szzh
This commit is contained in:
commit
cd43a906b9
|
@ -1,6 +1,6 @@
|
|||
#added by baiyu
|
||||
class GitUsageController < ApplicationController
|
||||
layout "project_base"
|
||||
layout "base_projects"
|
||||
def ch_usage
|
||||
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class IssueCategoriesController < ApplicationController
|
||||
layout "project_base"
|
||||
layout "base_projects"
|
||||
menu_item :settings
|
||||
model_object IssueCategory
|
||||
before_filter :find_model_object, :except => [:index, :new, :create]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class OrganizationController < ApplicationController
|
||||
layout 'project_base'
|
||||
layout 'base_projects'
|
||||
before_filter :require_admin, :except => [:index]
|
||||
|
||||
def index
|
||||
|
|
|
@ -578,7 +578,7 @@ class ProjectsController < ApplicationController
|
|||
format.api { render_api_ok }
|
||||
end
|
||||
else
|
||||
render :layout => "project_base"
|
||||
render :layout => "base_projects"
|
||||
end
|
||||
# hide project in layout
|
||||
@project = nil
|
||||
|
@ -586,7 +586,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def show_projects_score
|
||||
respond_to do |format|
|
||||
format.html { render :layout => "project_base"}
|
||||
format.html { render :layout => "base_projects"}
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
@ -674,11 +674,11 @@ class ProjectsController < ApplicationController
|
|||
private
|
||||
|
||||
def memberAccess
|
||||
# 是课程,则判断当前用户是否参加了课程
|
||||
# return 0 if @project.project_type == Project::ProjectType_project
|
||||
# currentUser = User.current
|
||||
# 如果是私有项目,项目成员不对外公开,公开项目成员列表对外公开。
|
||||
unless @project.is_public?
|
||||
render_403 unless User.current.member_of?(@project)
|
||||
end
|
||||
end
|
||||
|
||||
def toggleCourse
|
||||
@course_prefs = Course.find_by_extra(@project.identifier)
|
||||
|
|
|
@ -361,16 +361,15 @@ module IssuesHelper
|
|||
end
|
||||
end
|
||||
|
||||
# 之所以注释是因为该功能冗余了
|
||||
if detail.property == 'attr' && detail.prop_key == 'description'
|
||||
s = l(:text_journal_changed_no_detail, :label => label)
|
||||
# unless no_html
|
||||
# diff_link = link_to l(:label_diff),
|
||||
# {:controller => 'journals', :action => 'diff', :id => detail.journal_id,
|
||||
# :detail_id => detail.id, :only_path => options[:only_path]},
|
||||
# :title => l(:label_view_diff)
|
||||
# s << " (#{ diff_link })"
|
||||
# end
|
||||
unless no_html
|
||||
diff_link = link_to l(:label_diff),
|
||||
{:controller => 'journals', :action => 'diff', :id => detail.journal_id,
|
||||
:detail_id => detail.id, :only_path => options[:only_path]},
|
||||
:title => l(:label_view_diff)
|
||||
s << " (#{ diff_link })"
|
||||
end
|
||||
s.html_safe
|
||||
elsif detail.value.present?
|
||||
case detail.property
|
||||
|
|
|
@ -124,8 +124,8 @@ class Mailer < ActionMailer::Base
|
|||
attachments = courses[i].attachments.where("attachments.created_on between '#{date_from}' and '#{date_to}'").order('attachments.created_on DESC')
|
||||
@bids += bids if bids.count > 0
|
||||
@attachments += attachments if attachments.count > 0
|
||||
|
||||
end
|
||||
@bids.sort {|a, b| a.created_at <=> b.created_at}
|
||||
end
|
||||
|
||||
# 项目附件
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h3>
|
||||
<!-- 课程通知 -->
|
||||
<% unless @course_news.first.nil? %>
|
||||
<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_news) %>
|
||||
|
@ -33,15 +33,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程通知 end-->
|
||||
<% end %>
|
||||
|
||||
<!-- 课程通知回复 -->
|
||||
<% unless @course_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_mail_news_reply) %>
|
||||
</span>
|
||||
<!--课程通知回复-->
|
||||
<% @course_news_comments.each do |course_news_comment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
@ -57,7 +49,7 @@
|
|||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_notice) %></span>
|
||||
|
||||
<%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value),
|
||||
<%= link_to truncate(course_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -65,7 +57,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程通知回复 end-->
|
||||
</ul><!--课程通知 end-->
|
||||
<% end %>
|
||||
|
||||
<!--课程作业-->
|
||||
|
@ -89,7 +81,7 @@
|
|||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_homework) %></span>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
|
||||
<%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -150,7 +142,7 @@
|
|||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
<%= link_to truncate(course_message.subject.html_safe,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(course_message.created_on) %></span>
|
||||
|
@ -198,7 +190,7 @@
|
|||
@project_news_comments.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#15BCCF; "><%= l(:label_project_overview_new)%></h3>
|
||||
<% unless @issues.first.nil? %>
|
||||
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
|
@ -220,18 +212,7 @@
|
|||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issue.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--问题跟踪 end-->
|
||||
<% end %>
|
||||
|
||||
<!-- issues回复 -->
|
||||
|
||||
<% unless @issues_journals.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
</span>
|
||||
<% @issues_journals.each do |issues_journal| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
@ -244,16 +225,15 @@
|
|||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue) %></span>
|
||||
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
|
||||
<%= l(:label_isuue_mail_status) %>
|
||||
<%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% else %>
|
||||
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issues_journal.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--问题跟踪 end-->
|
||||
<% end %>
|
||||
|
@ -322,7 +302,7 @@
|
|||
<% end %>
|
||||
|
||||
<!--项目新闻-->
|
||||
<% unless @project_news.first.nil? %>
|
||||
<% unless @project_news.first.nil? || @project_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_project_news) %>
|
||||
|
@ -347,15 +327,6 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 项目新闻end -->
|
||||
<% end %>
|
||||
|
||||
<!-- 项目新闻回复 -->
|
||||
<% unless @project_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_project_news) %>
|
||||
</span>
|
||||
<% @project_news_comments.each do |project_news_comment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
@ -377,7 +348,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 项目新闻回复end -->
|
||||
</ul><!-- 项目新闻end -->
|
||||
<% end %>
|
||||
|
||||
<!-- 项目上传资源 -->
|
||||
|
|
|
@ -20,7 +20,7 @@ zh:
|
|||
label_course_mail_news_reply: 课程通知回复
|
||||
label_main_teacher: 主讲教师
|
||||
label_course_term: 开课学期
|
||||
label_isuue_mail_status: 更新了issue状态
|
||||
label_isuue_mail_status: 更新了issue状态!
|
||||
|
||||
label_join_course: 加入
|
||||
label_exit_course: 退出
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class CodeReviewController < ApplicationController
|
||||
layout "project_base"
|
||||
layout "base_projects"
|
||||
unloadable
|
||||
before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ a.remove-upload:hover {text-decoration:none !important;}
|
|||
|
||||
#attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;}
|
||||
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
|
||||
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px;}
|
||||
#attachments_fields input.filename {border: 0;height: 1.8em;width: 150px;color: #555;background-color: inherit;background: url(../images/attachment.png) no-repeat 1px 50%;padding-left: 18px;padding-top: 2px; white-space: nowrap; text-overflow:ellipsis;}
|
||||
span.add_attachment {font-size: 80%;line-height: 2.5em;}
|
||||
#attachments_fields span {display: block;white-space: nowrap;}
|
||||
.file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);}
|
||||
|
|
Loading…
Reference in New Issue