pre标签换行;contest主页样式调整
This commit is contained in:
parent
76d7bd267c
commit
cf4451e998
|
@ -27,7 +27,7 @@ class Comment < ActiveRecord::Base
|
|||
|
||||
def send_mail
|
||||
if self.commented.is_a?(News) && Setting.notified_events.include?('news_comment_added')
|
||||
Mailer.news_comment_added(self)
|
||||
Mailer.run.news_comment_added(self)
|
||||
end
|
||||
end
|
||||
after_destroy :delete_kindeditor_assets
|
||||
|
|
|
@ -257,6 +257,47 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-left">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
|
||||
<div class="d-p-projectlist-box">
|
||||
<% if Softapplication.count > 0%>
|
||||
<div class="d-p-projectlist">
|
||||
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
|
||||
|
||||
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||
<div class="avatar-4" style="float: left; margin-top: 7px">
|
||||
<%= image_tag('/images/app1.png')%>
|
||||
</div>
|
||||
<div style="float: left; margin-left: 10px; margin-top: 7px;margin-bottom: -2px; width: 380px;">
|
||||
<%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %>
|
||||
</div>
|
||||
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; margin-bottom:1px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=softapplication.description.to_s%>>
|
||||
<%=softapplication.description.to_s.truncate(50, omission: '...')%>
|
||||
</span>
|
||||
</div><br />
|
||||
|
||||
<div style="padding-left: 55px; clear: left;">
|
||||
<span class="font_lighter">
|
||||
<%=l(:label_release_time)%>:
|
||||
<%=format_time softapplication.created_at %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<% end; reset_cycle %>
|
||||
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="font_lighter">
|
||||
<%= l(:label_no_ftapplication) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;">
|
||||
<strong><%=l(:label_issue_feedback_activities)%></strong>
|
||||
|
@ -299,49 +340,6 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-left">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
|
||||
<div class="d-p-projectlist-box">
|
||||
<% if Softapplication.count > 0%>
|
||||
<div class="d-p-projectlist">
|
||||
<% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %>
|
||||
|
||||
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||
<div class="avatar-4" style="float: left; margin-top: 7px">
|
||||
<%= image_tag('/images/app1.png')%>
|
||||
</div>
|
||||
<div style="float: left; margin-left: 10px; margin-top: 7px;margin-bottom: -2px; width: 380px;">
|
||||
<%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %>
|
||||
</div>
|
||||
|
||||
<div class='text_nowrap' style="float: left;margin:5px; margin-left: 10px; margin-bottom:1px; width: 380px;">
|
||||
<span class='font_lighter' title =<%=softapplication.description.to_s%>>
|
||||
<%=softapplication.description.to_s.truncate(50, omission: '...')%>
|
||||
</span>
|
||||
</div><br />
|
||||
|
||||
<div style="padding-left: 55px; clear: left;">
|
||||
<span class="font_lighter">
|
||||
<%=l(:label_release_time)%>:
|
||||
<%=format_time softapplication.created_at %>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<% end; reset_cycle %>
|
||||
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="font_lighter">
|
||||
<%= l(:label_no_ftapplication) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<%= render partial: 'link_to_another' %>
|
||||
|
|
|
@ -41,8 +41,18 @@
|
|||
<div class="course welcome_left" id="welcome_left">
|
||||
<span class="font_welcome_school">
|
||||
<% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
|
||||
<span class="font_welcome_tdescription">,
|
||||
<!--
|
||||
edit by meng
|
||||
@course_page.description存储在first_page表中的description字段
|
||||
原本代码
|
||||
<%= @course_page.description %>
|
||||
!-->
|
||||
<%= l(:label_welcome_trustie_course_description) %>
|
||||
</span>
|
||||
<% else %>
|
||||
<% if @school_id == "0" %>
|
||||
|
||||
<% else %>
|
||||
<% if @school_id.nil? %>
|
||||
<%= link_to School.find(User.current.user_extensions.school.id).name, options={:action => 'course', :school_id => User.current.user_extensions.school.id}, html_options={:class => 'font_welcome_school', :method => 'get'} %>
|
||||
|
@ -65,23 +75,6 @@
|
|||
<%= l(:label_welcome_trustie_course) %>
|
||||
</span>
|
||||
|
||||
<% if @school_id.nil? and (User.current.user_extensions.nil? || User.current.user_extensions.school.nil?) %>
|
||||
<span class="font_welcome_tdescription">,
|
||||
<!--
|
||||
edit by meng
|
||||
@course_page.description存储在first_page表中的description字段
|
||||
原本代码
|
||||
<%= @course_page.description %>
|
||||
!-->
|
||||
<%= l(:label_welcome_trustie_course_description) %>
|
||||
</span>
|
||||
<% else %>
|
||||
<% if @school_id == "0" %>
|
||||
<span class="font_welcome_tdescription">,
|
||||
<%= @course_page.description %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="search-bar" id="search-bar">
|
||||
|
|
|
@ -1169,15 +1169,6 @@ en:
|
|||
|
||||
#end
|
||||
|
||||
# label_welcome_trustie: Trustie
|
||||
# label_welcome_trustie_project: Online projects hosting platform
|
||||
# label_welcome_trustie_course: Online Courses practice platform
|
||||
# label_welcome_trustie_contest: Online Contests practice platform
|
||||
# label_welcome_trustie_project_description: Software for Chinese college students and practitioners to provide social-oriented project management, code hosting, resource sharing, cooperation and exchange.
|
||||
# label_welcome_trustie_course_description: Teachers and Students for Chinese universities to provide social-oriented curriculum management, resource sharing, cooperation achieved, collaborative research.
|
||||
# label_welcome_trustie_contest_description: Software for Chinese college students and practitioners to provide social-oriented contest management, code hosting, resource sharing, cooperation and exchange.
|
||||
# label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs.
|
||||
|
||||
label_bid_if_agreement: If you like me, please press me #bai
|
||||
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ zh:
|
|||
label_brief_introduction: 个性签名
|
||||
label_my_brief_introduction: 今天的心情如何?留下你的脚印吧~
|
||||
|
||||
label_user_joinin: 加入时间
|
||||
label_user_join: 加入时间
|
||||
label_user_login: 最后登录
|
||||
|
||||
label_technical_title: 职称
|
||||
|
@ -213,6 +213,7 @@ zh:
|
|||
#
|
||||
# Followers & Fans
|
||||
#
|
||||
label_user_joinin: 加入时间
|
||||
label_x_contribute_to:
|
||||
zero: "参与了 %{count} 个项目"
|
||||
one: "参与了 %{count} 个项目——"
|
||||
|
|
|
@ -763,7 +763,7 @@ zh:
|
|||
label_feedback_fail: "留言失败"
|
||||
label_user_login: "最后登录"
|
||||
label_user_mail: "邮件地址"
|
||||
label_user_joinin: "加入时间"
|
||||
|
||||
|
||||
|
||||
label_overview: "概述"
|
||||
|
@ -1411,13 +1411,7 @@ zh:
|
|||
label_project_sort: 排序方式
|
||||
|
||||
|
||||
label_welcome_trustie: Trustie
|
||||
label_welcome_trustie_project: 在线项目托管平台
|
||||
label_welcome_trustie_course: 在线课程实践平台
|
||||
label_welcome_trustie_contest: 在线竞赛实战平台
|
||||
label_welcome_trustie_project_description: 面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。
|
||||
label_welcome_trustie_course_description: 面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。
|
||||
label_welcome_trustie_contest_description: 面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。
|
||||
|
||||
label_user_project: 项目
|
||||
label_user_course: 课程
|
||||
label_user_homework: 作业
|
||||
|
|
|
@ -893,3 +893,22 @@ $(function(){
|
|||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
//firefox的pre标签换行
|
||||
$(document).ready(function () {
|
||||
var userAgent = navigator.userAgent.toLowerCase();
|
||||
var browser = {
|
||||
version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1],
|
||||
safari: /webkit/.test(userAgent),
|
||||
opera: /opera/.test(userAgent),
|
||||
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
|
||||
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
|
||||
};
|
||||
if (browser.mozilla || browser.opera){
|
||||
$("pre").addClass("break_word_firefox");
|
||||
}
|
||||
else{
|
||||
$("pre").addClass("break_word");
|
||||
}
|
||||
});
|
||||
|
|
|
@ -407,8 +407,23 @@ $(function(){
|
|||
});
|
||||
|
||||
//将右侧的最小高度设置成左侧高度,美化界面
|
||||
// firefox pre标签换行
|
||||
$(document).ready(function () {
|
||||
$("#RSide").css("min-height",$("#LSide").height()-30);
|
||||
var userAgent = navigator.userAgent.toLowerCase();
|
||||
var browser = {
|
||||
version: (userAgent.match(/.+(?:rv|it|ra|ie)[/: ]([d.]+)/) || [])[1],
|
||||
safari: /webkit/.test(userAgent),
|
||||
opera: /opera/.test(userAgent),
|
||||
msie: /msie/.test(userAgent) && !/opera/.test(userAgent),
|
||||
mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent)
|
||||
};
|
||||
if (browser.mozilla || browser.opera){
|
||||
$("pre").addClass("break_word_firefox");
|
||||
}
|
||||
else{
|
||||
$("pre").addClass("break_word");
|
||||
}
|
||||
});
|
||||
|
||||
// 日历选择日期后关闭
|
||||
|
|
|
@ -3150,6 +3150,11 @@ input[class~='m3p10'], .m3p10 {
|
|||
cursor:pointer;
|
||||
}
|
||||
|
||||
/*pre标签换行*/
|
||||
.break_word{word-break: break-all;word-wrap: break-word;}
|
||||
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
|
||||
|
||||
|
||||
/*lizanle 日誌搜索結果樣式*/
|
||||
.search_results {
|
||||
color: red;
|
||||
|
|
|
@ -212,6 +212,7 @@ a:hover.close_btn {background-position:-66px 0;}
|
|||
.show_btn {background-position:-119px 0;}
|
||||
.msgserver a:hover { color: #0fa9bb; }
|
||||
.break_word{word-break: break-all;word-wrap: break-word;}
|
||||
.break_word_firefox{white-space: pre-wrap;word-break: break-all;}
|
||||
/***** Ajax indicator ******/
|
||||
#ajax-indicator {
|
||||
position: absolute; /* fixed not supported by IE */
|
||||
|
|
Loading…
Reference in New Issue