socialforge/app/views/courses/index.html.erb

78 lines
2.7 KiB
Plaintext
Raw Normal View History

<% @nav_dispaly_course_all_label = 1
@nav_dispaly_forum_label = 1
@nav_dispaly_course_label = nil
@nav_dispaly_store_all_label = 1 %>
<% content_for :header_tags do %>
2014-06-03 09:39:33 +08:00
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
<% end %>
<div class="top-content">
2014-06-13 08:39:17 +08:00
<%= form_tag(:controller => 'courses', :action => 'search', :method => :get) do %>
2014-06-03 09:39:33 +08:00
<table width="940px">
<tr>
<td class="info_font" style="width: 240px;" rowspan="2">
<a href="http://<%= Setting.host_course%>" style="color: #15bccf;">
<%= l(:label_courses_community)%>
</a>
</td>
<td class="location-list">
<strong><%= l(:label_user_location) %> :</strong>
</td>
2014-06-03 09:39:33 +08:00
<td rowspan="2">
2014-06-03 09:56:54 +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>
2014-06-03 09:56:54 +08:00
<% end %>
2014-06-03 09:39:33 +08:00
<% end %>
2014-06-03 09:56:54 +08:00
</td>
<td rowspan="2" >
<div class="course-search" style="float: right">
<%= text_field_tag 'name', params[:name], :size => 30 %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
</div>
</td>
</tr>
2014-06-03 09:39:33 +08:00
<tr>
<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-06-03 09:39:33 +08:00
</tr>
</table>
<% end %>
</div>
<%= sort_course(@s_type, @school_id)%>
2014-06-03 09:56:54 +08:00
<div id="courses-index" class="projects-index">
<%if @courses%>
<%= render_course_hierarchy(@courses)%>
<%end%>
</div>
<div class="pagination">
2014-06-03 09:39:33 +08:00
<ul>
<%= pagination_links_full @course_pages, @course_count %>
2014-06-03 09:39:33 +08:00
</ul>
</div>
<% if User.current.logged? %>
2014-06-03 09:39:33 +08:00
<p style="text-align:right;">
<span class="my-course"><%= l(:label_my_course) %></span>
2014-06-03 09:39:33 +08:00
</p>
<% end %>
<% content_for :sidebar do %>
2014-06-03 09:39:33 +08:00
<%= form_tag({}, :method => :get) do %>
2014-06-03 09:56:54 +08:00
<h3><%= l(:label_project_plural) %></h3>
<label for="closed"><%= check_box_tag 'closed', 1, params[:closed] %> <%= l(:label_show_closed_projects) %></label>
2014-06-03 09:39:33 +08:00
<p>
<%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %>
</p>
<% end %>
<% end %>
2014-06-03 09:56:54 +08:00
<% html_title(l(:label_new_course)) -%>