2014-10-23 11:30:34 +08:00
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
|
|
|
<% end %>
|
|
|
|
<div class="top-content">
|
|
|
|
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
|
|
|
|
<table width="940px">
|
|
|
|
<tr>
|
2014-12-11 15:51:01 +08:00
|
|
|
<td class="info_font" style="width: 240px;" rowspan="2">
|
|
|
|
<a href="http://<%= Setting.host_course%>" style="color: #15bccf;">
|
2015-03-10 09:45:36 +08:00
|
|
|
<%= l(:label_courses_community)%>
|
2014-12-11 15:51:01 +08:00
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="location-list">
|
|
|
|
<strong><%= l(:label_user_location) %> :</strong>
|
|
|
|
</td>
|
2015-01-09 10:57:33 +08:00
|
|
|
<td rowspan="2" valign="bottom">
|
2014-10-23 11:30:34 +08:00
|
|
|
<% 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) %></td>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td rowspan="2" >
|
|
|
|
<div class="project-search" style="float: right">
|
|
|
|
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
|
|
|
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2014-12-11 15:51:01 +08:00
|
|
|
<td >
|
|
|
|
<%=link_to l(:field_homepage), home_path %> >
|
|
|
|
<a href="http://<%= Setting.host_course%>" class="link_other_item">
|
|
|
|
<%=l(:label_courses_management_platform)%>
|
|
|
|
</a>
|
|
|
|
</td>
|
2014-10-23 11:30:34 +08:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2015-08-14 16:24:43 +08:00
|
|
|
<% if @courses && !@courses.empty? %>
|
|
|
|
<div id="courses-index">
|
|
|
|
<%= render_course_hierarchy(@courses)%>
|
|
|
|
</div>
|
2014-10-23 11:30:34 +08:00
|
|
|
<% else %>
|
2015-08-14 16:24:43 +08:00
|
|
|
<%= render :partial => 'layouts/no_content'%>
|
2014-10-23 11:30:34 +08:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="pagination">
|
|
|
|
<ul>
|
2015-08-14 16:24:43 +08:00
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
2014-10-23 11:30:34 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<p style="text-align:right;">
|
|
|
|
<span class="my-project"><%= l(:label_my_course) %></span>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%# other_formats_links do |f| %>
|
|
|
|
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
|
|
<%# end %>
|
|
|
|
|
|
|
|
<% content_for :sidebar do %>
|
|
|
|
<%= form_tag({}, :method => :get) do %>
|
|
|
|
<h3><%= l(:label_project_plural) %></h3>
|
|
|
|
<label for="closed"><%= check_box_tag 'closed', 1, params[:closed] %> <%= l(:label_show_closed_projects) %></label>
|
|
|
|
<p>
|
|
|
|
<%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% html_title(l(:label_course_all)) -%>
|