|
|
|
@ -6,49 +6,44 @@
|
|
|
|
|
<%= form_tag(courses_search_path, :method => :get) do %>
|
|
|
|
|
<table width="940px">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_all) %></td>
|
|
|
|
|
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>
|
|
|
|
|
<td class="location-list"><strong><%= l(:label_user_location) %> :</strong></td>
|
|
|
|
|
<td rowspan="2">
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<%= link_to(l(:label_course_new), {:controller => 'courses', :action => 'new', :course => 0, :course_type => (@course_type||=0)}, :class => 'icon icon-add') if User.current.allowed_to?(:add_course, nil, :global => true) %>
|
|
|
|
|
<% if User.current.logged?%>
|
|
|
|
|
<% if User.current.user_extensions.identity == 0 %>
|
|
|
|
|
<%= link_to(l(:label_course_new), {:controller => 'courses', :action => 'new', :course => 1}, :class => 'icon icon-add') if User.current.allowed_to?(:add_course, nil, :global => true) %></td>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
|
|
|
|
<td rowspan="2">
|
|
|
|
|
<div class="course-search" style="float: right">
|
|
|
|
|
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
|
|
|
|
<%= hidden_field_tag 'course_type', params[:course_type] %>
|
|
|
|
|
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</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>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 8px">
|
|
|
|
|
<a><%= link_to request.host()+"/courses", :controller => 'courses', :action => 'index', :course_type => 0 %> </a>
|
|
|
|
|
</td>
|
|
|
|
|
<td><%= link_to l(:field_homepage), home_path %>
|
|
|
|
|
> <%= link_to l(:label_course_all), :controller => 'courses', :action => 'index', :course_type => 0 %></td>
|
|
|
|
|
<td style="padding-left: 8px"><a><%= link_to request.host()+"/course", :controller => 'courses', :action => 'course', :course_type => 1 %> </a></td>
|
|
|
|
|
<td ><%=link_to l(:field_homepage), home_path %> > <%=link_to l(:label_course_practice), :controller => 'courses', :action => 'course', :course_type => 1 %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<%= sort_courses(@s_type) %>
|
|
|
|
|
<div id="courses-index">
|
|
|
|
|
<% if @courses %>
|
|
|
|
|
<%= render_course_hierarchy(@courses) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= sort_course(@s_type, @course_type, @school_id)%>
|
|
|
|
|
|
|
|
|
|
<div id="projects-index">
|
|
|
|
|
<%= render_project_hierarchy(@projects)%>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="pagination">
|
|
|
|
|
<ul>
|
|
|
|
|
<% if @course_pages %>
|
|
|
|
|
<%= pagination_links_full @course_pages, @course_count %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= pagination_links_full @project_pages, @project_count %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<p style="text-align:right;">
|
|
|
|
|
<span class="my-course"><%= l(:label_my_courses) %></span>
|
|
|
|
|
<span class="my-project"><%= l(:label_my_course) %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
@ -57,14 +52,13 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% content_for :sidebar do %>
|
|
|
|
|
|
|
|
|
|
<%= form_tag({}, :method => :get) do %>
|
|
|
|
|
<h3><%= l(:label_course_all) %></h3>
|
|
|
|
|
<label for="closed"><%= check_box_tag 'closed', 1, params[:closed] %> <%= l(:label_show_closed_courses) %></label>
|
|
|
|
|
<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)) -%>
|
|
|
|
|
<% html_title(l(:label_new_course)) -%>
|
|
|
|
|