This commit is contained in:
sw 2014-11-17 17:45:00 +08:00
commit a167262fc0
6 changed files with 43 additions and 18 deletions

View File

@ -271,8 +271,7 @@ class CoursesController < ApplicationController
@issue_custom_fields = IssueCustomField.sorted.all
@trackers = Tracker.sorted.all
if User.current.user_extensions.identity == 0
if @course.save
if @course.save
#unless User.current.admin?
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])
@ -298,15 +297,13 @@ class CoursesController < ApplicationController
}
format.api { render :action => 'show', :status => :created, :location => url_for(:controller => 'courses', :action => 'show', :id => @course.id) }
end
else
else
#@course.destroy
respond_to do |format|
format.html { render :action => 'new', :layout => 'base' } #Added by young
format.api { render_validation_errors(@course) }
end
end
end
end
end
def course

View File

@ -1,26 +1,36 @@
<div id="floatpoint" STYLE="position:absolute;visibility:visible;" >
<table border=0 bordercolor="#FFFFFF" bgcolor="#faebd7">
<div id="floatpoint" class="course_ad" >
<table border=0 width="180px" >
<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>
</tr>
<tr>
<td align=center bgcolor="orange" >
<a href="/" target="_blank" >QQ:1234566</a><br>
<td align=center bgcolor="#ececec" >
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>
</tr>
<tr>
<td align=center bgcolor="orange" >
<a href="/" target="_blank" >Email:1234566@qq.com</a><br>
<td align=center bgcolor="#ececec" >
Tel:13467631747<br>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
var XX=1300; // 浮动层的X坐标,即左边距
var XX=1150; // 浮动层的X坐标,即左边距
var xstep=1; // 移动步长此参数越小移动越平滑最小值为1
var delay_time=60; // 每步的时间间隔,此参数越小,移动速度越快
var YY=0;

View File

@ -58,10 +58,10 @@
$('.download_icon').find("a").attr("target", "_blank");
$('.download_icon').each(function(){
$(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).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"){

View File

@ -8,12 +8,13 @@
<p class="font_description">
<%= 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>
<% end %>
<% else %>
<div class="user_course_list menu-div">
<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>
<li mode='doing' class="on">进行中</li>
<li mode='end'>已完结</li>

View File

@ -2132,6 +2132,8 @@ zh:
label_record: 湘ICP备09019772
label_check_comment: 查看通知评论
label_notification: 通知公告
label_course_ad_description: 课程模块正在优化中,使用过程中如有问题请您与我们联系,感谢大家的支持!
label_course_adcolick: 请点击:
#end
#end

View File

@ -9,6 +9,21 @@ h4, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;}
/*huang*/
/*current position*/
.course_ad{
position:absolute;
visibility:visible;
background:#ffffff
}
.ad_title{
color: #FFFFFF;
font-weight: bold;
}
.ad_content{
text-indent: 2em;
}
.contest_count{
width: 20%;
height: 60px;