Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
a167262fc0
|
@ -271,8 +271,7 @@ class CoursesController < ApplicationController
|
||||||
@issue_custom_fields = IssueCustomField.sorted.all
|
@issue_custom_fields = IssueCustomField.sorted.all
|
||||||
@trackers = Tracker.sorted.all
|
@trackers = Tracker.sorted.all
|
||||||
|
|
||||||
if User.current.user_extensions.identity == 0
|
if @course.save
|
||||||
if @course.save
|
|
||||||
#unless User.current.admin?
|
#unless User.current.admin?
|
||||||
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
|
||||||
m = Member.new(:user => User.current, :roles => [r])
|
m = Member.new(:user => User.current, :roles => [r])
|
||||||
|
@ -298,15 +297,13 @@ class CoursesController < ApplicationController
|
||||||
}
|
}
|
||||||
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'courses', :action => 'show', :id => @course.id) }
|
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'courses', :action => 'show', :id => @course.id) }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
#@course.destroy
|
#@course.destroy
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :action => 'new', :layout => 'base' } #Added by young
|
format.html { render :action => 'new', :layout => 'base' } #Added by young
|
||||||
format.api { render_validation_errors(@course) }
|
format.api { render_validation_errors(@course) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def course
|
def course
|
||||||
|
|
|
@ -1,26 +1,36 @@
|
||||||
|
|
||||||
<div id="floatpoint" STYLE="position:absolute;visibility:visible;" >
|
<div id="floatpoint" class="course_ad" >
|
||||||
<table border=0 bordercolor="#FFFFFF" bgcolor="#faebd7">
|
<table border=0 width="180px" >
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center bgcolor=#E3E3E3 >
|
<td align=center bgcolor=#15bccf >
|
||||||
联系我们
|
<span class="ad_title"><%= l(:label_contact_us) %></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td><p class="ad_content"><%= l(:label_course_ad_description) %></p></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center bgcolor="#ececec" >
|
||||||
|
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/12/user_newfeedback">黄井泉</a><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center bgcolor="orange" >
|
<td align=center bgcolor="#ececec" >
|
||||||
<a href="/" target="_blank" >QQ:1234566</a><br>
|
Tel:15388083362<br>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
<td align=center bgcolor="#ececec" >
|
||||||
|
<%= l(:label_course_adcolick) %><a href="http://user.trustie.net/users/6/user_newfeedback">王林春</a><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=center bgcolor="orange" >
|
<td align=center bgcolor="#ececec" >
|
||||||
<a href="/" target="_blank" >Email:1234566@qq.com</a><br>
|
Tel:13467631747<br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var XX=1300; // 浮动层的X坐标,即左边距
|
var XX=1150; // 浮动层的X坐标,即左边距
|
||||||
var xstep=1; // 移动步长,此参数越小,移动越平滑,最小值为1
|
var xstep=1; // 移动步长,此参数越小,移动越平滑,最小值为1
|
||||||
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
|
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
|
||||||
var YY=0;
|
var YY=0;
|
||||||
|
|
|
@ -58,10 +58,10 @@
|
||||||
$('.download_icon').find("a").attr("target", "_blank");
|
$('.download_icon').find("a").attr("target", "_blank");
|
||||||
$('.download_icon').each(function(){
|
$('.download_icon').each(function(){
|
||||||
$(this).mouseenter(function(event) {
|
$(this).mouseenter(function(event) {
|
||||||
$(this).find('img').attr("src", "/images/button/download_focus.png")
|
$(this).find('img').attr("src", "<%= path_to_image("/images/button/download_focus.png") %>")
|
||||||
});
|
});
|
||||||
$(this).mouseleave(function(event) {
|
$(this).mouseleave(function(event) {
|
||||||
$(this).find('img').attr("src", "/images/button/download.png")
|
$(this).find('img').attr("src", "<%= path_to_image("/images/button/download.png") %>")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
if(navigator.appName=="Microsoft Internet Explorer"){
|
if(navigator.appName=="Microsoft Internet Explorer"){
|
||||||
|
|
|
@ -8,12 +8,13 @@
|
||||||
<p class="font_description">
|
<p class="font_description">
|
||||||
|
|
||||||
<%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
|
<%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'courses',:action=>'index'}, :class => 'icon icon-add' %>
|
||||||
|
<%= link_to "#{l(:label_course_new)}", {:controller => 'courses', :action => 'new'}, :class => 'icon icon-add' %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="user_course_list menu-div">
|
<div class="user_course_list menu-div">
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<%= link_to"#{l(:label_course_view_student)}",courses_path, :class => 'icon icon-add' %>
|
<%= link_to "#{l(:label_course_new)}", new_course_path, class: 'icon icon-add' if @user == User.current %>
|
||||||
<ul>
|
<ul>
|
||||||
<li mode='doing' class="on">进行中</li>
|
<li mode='doing' class="on">进行中</li>
|
||||||
<li mode='end'>已完结</li>
|
<li mode='end'>已完结</li>
|
||||||
|
|
|
@ -2132,6 +2132,8 @@ zh:
|
||||||
label_record: 湘ICP备09019772
|
label_record: 湘ICP备09019772
|
||||||
label_check_comment: 查看通知评论
|
label_check_comment: 查看通知评论
|
||||||
label_notification: 通知公告
|
label_notification: 通知公告
|
||||||
|
label_course_ad_description: 课程模块正在优化中,使用过程中如有问题请您与我们联系,感谢大家的支持!
|
||||||
|
label_course_adcolick: 请点击:
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
|
|
@ -9,6 +9,21 @@ h4, .wiki h3 {font-size: 13px;}
|
||||||
h4 {border-bottom: 1px dotted #bbb;}
|
h4 {border-bottom: 1px dotted #bbb;}
|
||||||
/*huang*/
|
/*huang*/
|
||||||
/*current position*/
|
/*current position*/
|
||||||
|
.course_ad{
|
||||||
|
position:absolute;
|
||||||
|
visibility:visible;
|
||||||
|
background:#ffffff
|
||||||
|
}
|
||||||
|
|
||||||
|
.ad_title{
|
||||||
|
color: #FFFFFF;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ad_content{
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
.contest_count{
|
.contest_count{
|
||||||
width: 20%;
|
width: 20%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
|
Loading…
Reference in New Issue