Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
commit
faab40456a
@ -1,2 +1,18 @@
|
||||
module SoftapplicationsHelper
|
||||
def sort_softapplication(state)
|
||||
content = ''.html_safe
|
||||
case state
|
||||
when 0
|
||||
content << content_tag('li', link_to(l(:label_sort_by_time), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '1'}))
|
||||
content << content_tag('li', link_to(l(:label_sort_by_active), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '0'}, :class=>"selected"), :class=>"selected")
|
||||
|
||||
when 1
|
||||
content << content_tag('li', link_to(l(:label_sort_by_time), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '1'}, :class=>"selected"), :class=>"selected")
|
||||
content << content_tag('li', link_to(l(:label_sort_by_active), {controller: 'softapplications', action: 'index' ,:softapplication_sort_type => '0'}))
|
||||
end
|
||||
content = content_tag('ul', content)
|
||||
content_tag('div', content, :class => "tabs")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
<%
|
||||
id = "finish_course_#{project.id}"
|
||||
display = (project.course_extra.teacher.id == User.current.id )
|
||||
display = (project.course_extra.teacher.id == User.current.id || User.current.admin?)
|
||||
%>
|
||||
|
||||
<% if display && course_endTime_timeout?(project) #如果课程已结束%>
|
||||
<%= link_to '重启课程', restartcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要重启课程?') %>
|
||||
<% if display #如果课程已结束%>
|
||||
<% linkPath = course_endTime_timeout?(project) ? restartcourse_project_path(project) : finishcourse_project_path(project, format: :js) %>
|
||||
<% desc = course_endTime_timeout?(project) ? '重启' : '关闭' %>
|
||||
|
||||
<%= link_to "#{desc}课程", linkPath, :remote => true, :method => :post, :id => id, :confirm => ("确定要#{desc}课程?") %>
|
||||
<% else %>
|
||||
<%= link_to '关闭课程', finishcourse_project_path(project), :remote => true, :method => :post, :id => id, :confirm => ('确定要关闭课程?') %>
|
||||
<!-- 关闭课程block -->
|
||||
<% end %>
|
||||
|
@ -0,0 +1,22 @@
|
||||
<div class="top-content">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="info_font" style="width: 240px; color: #15bccf">创新竞赛社区</td>
|
||||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="300px">
|
||||
<div class="project-search" style="float: right">
|
||||
<%= text_field_tag 'name', params[:name], :size => 25 %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="padding-left: 8px"><%=link_to request.host()+"/softapplications", :controller=>'softapplications', :action=>'index' %></td>
|
||||
<td ><%=link_to l(:field_homepage), home_path %> >
|
||||
<%=link_to l(:label_contest_softapplication), :controller=>'softapplications', :action=>'index' %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
Before Width: | Height: | Size: 58 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue