issue:socialForge#381
This commit is contained in:
parent
6a2626c90e
commit
2052d36abe
|
@ -227,8 +227,8 @@ class ProjectsController < ApplicationController
|
|||
|
||||
def search
|
||||
#modified by nie
|
||||
project_type = params[:project_type]
|
||||
projects_all = (project_type.eql? Project::ProjectType_project) ? Project.project_entities : Project.course_entities
|
||||
project_type = params[:project_type].to_i
|
||||
projects_all = (project_type.eql? Project::ProjectType_course) ? Project.course_entities : Project.project_entities
|
||||
@projects = projects_all.visible
|
||||
@projects = @projects.visible.like(params[:name]) if params[:name].present?
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search" style="display:none">
|
||||
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
|
||||
<%= form_tag(projects_search_path, :method => :get) do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
|
||||
<td rowspan="2" width="250px">
|
||||
<div class="top-content-search">
|
||||
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
|
||||
<%= form_tag(projects_search_path, :method => :get) do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20 %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<% end %>
|
||||
|
||||
<div class="top-content">
|
||||
<%= form_tag(:controller => 'projects', :action => 'search', :method => :get) do %>
|
||||
<%= form_tag(projects_search_path, :method => :get) do %>
|
||||
<table width="940px">
|
||||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<% end %>
|
||||
|
||||
<div class="top-content">
|
||||
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
|
||||
<%= form_tag(projects_search_path, :method => :get) do %>
|
||||
<table width="940px">
|
||||
<tr>
|
||||
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_project_deposit) %></td>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
||||
<% end %>
|
||||
<div class="top-content">
|
||||
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %>
|
||||
<%= form_tag(projects_search_path, :method => :get) do %>
|
||||
<% if params[:project_type] == "1" %>
|
||||
<table width="940px">
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue