课程首页添加新增课程按钮

course_group
sw 11 years ago
parent 535cf74f1f
commit b88fdcefd8

@ -9,7 +9,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-left: 8px"><a href="http://contest.trustie.net/">contest.trustie.net</td> <td style="padding-left: 8px"><a href="http://contest.trustie.net/">contest.trustie.net</a></td>
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'welcome', :action => 'contest' %> > 详情</td> <td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_contest_innovate), :controller => 'welcome', :action => 'contest' %> > 详情</td>
</tr> </tr>
</table> </table>

@ -69,7 +69,6 @@
<% else %> <% else %>
<!-- 竖排 --> <!-- 竖排 -->
<div id="praise_tread_<%= obj.id %>" style="float:right;"> <div id="praise_tread_<%= obj.id %>" style="float:right;">
<% @is_valuate = is_praise_or_tread(obj,user_id)%> <% @is_valuate = is_praise_or_tread(obj,user_id)%>
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 --> <% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %> <% @flag = @is_valuate.first.praise_or_tread %>

@ -0,0 +1,8 @@
<% if User.current.logged?%>
<% if User.current.user_extensions.identity == 0 %>
<%= link_to(l(:label_course_new), {:controller => 'courses', :action => 'new'},
:class => 'icon icon-add') if User.current.allowed_to?(:add_course,nil, :global => true) %>
<% end %>
<% end %>
&nbsp;&nbsp;&nbsp;&nbsp;
<%= link_to "更多>>", {:controller => 'courses', :action => 'index', :school_id => school_id} %>

@ -85,7 +85,7 @@
<%school_course=[]%> <%school_course=[]%>
<% end %> <% end %>
<% if (school_course.count == 0) %> <% if (school_course.count == 0) %>
<span><%= link_to "更多>>", {:controller => 'courses', :action => 'index', :school_id => nil} %></span> <span><%= render :partial => 'more_course', :locals => {:school_id => nil}%></span>
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">
<ul class="d-p-projectlist"> <ul class="d-p-projectlist">
@ -103,11 +103,11 @@
<% else %> <% else %>
<% if school_course.count < 10 %> <% if school_course.count < 10 %>
<span> <span>
<%= link_to "更多>>", {:controller => 'courses', :action => 'index', :school_id => nil} %> <%= render :partial => 'more_course', :locals => {:school_id => nil}%>
</span> </span>
<% else %> <% else %>
<span> <span>
<%= link_to "更多>>", {:controller => 'courses', :action => 'index', :school_id => @school_id} %> <%= render :partial => 'more_course', :locals => {:school_id => @school_id}%>
</span> </span>
<% end %> <% end %>
<div class="d-p-projectlist-box"> <div class="d-p-projectlist-box">

Loading…
Cancel
Save