issue:socialForge#381

This commit is contained in:
yanxd 2014-04-24 08:46:10 +08:00
parent 6a2626c90e
commit 2052d36abe
6 changed files with 7 additions and 7 deletions

View File

@ -227,8 +227,8 @@ class ProjectsController < ApplicationController
def search def search
#modified by nie #modified by nie
project_type = params[:project_type] project_type = params[:project_type].to_i
projects_all = (project_type.eql? Project::ProjectType_project) ? Project.project_entities : Project.course_entities projects_all = (project_type.eql? Project::ProjectType_course) ? Project.course_entities : Project.project_entities
@projects = projects_all.visible @projects = projects_all.visible
@projects = @projects.visible.like(params[:name]) if params[:name].present? @projects = @projects.visible.like(params[:name]) if params[:name].present?
@offset, @limit = api_offset_and_limit({:limit => 10}) @offset, @limit = api_offset_and_limit({:limit => 10})

View File

@ -33,7 +33,7 @@
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td> <td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td rowspan="2" width="250px"> <td rowspan="2" width="250px">
<div class="top-content-search" style="display:none"> <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 %> <%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'project_type', params[:project_type] %> <%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %> <%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>

View File

@ -30,7 +30,7 @@
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td> <td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td rowspan="2" width="250px"> <td rowspan="2" width="250px">
<div class="top-content-search"> <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 %> <%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'project_type', params[:project_type] %> <%= hidden_field_tag 'project_type', params[:project_type] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %> <%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>

View File

@ -3,7 +3,7 @@
<% end %> <% end %>
<div class="top-content"> <div class="top-content">
<%= form_tag(:controller => 'projects', :action => 'search', :method => :get) do %> <%= form_tag(projects_search_path, :method => :get) do %>
<table width="940px"> <table width="940px">
<tr> <tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td> <td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_course_practice) %></td>

View File

@ -3,7 +3,7 @@
<% end %> <% end %>
<div class="top-content"> <div class="top-content">
<%= form_tag(:controller => 'projects', :action => "search", :method => :get) do %> <%= form_tag(projects_search_path, :method => :get) do %>
<table width="940px"> <table width="940px">
<tr> <tr>
<td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_project_deposit) %></td> <td class="info_font" style="width: 220px; color: #15bccf"><%= l(:label_project_deposit) %></td>

View File

@ -2,7 +2,7 @@
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %> <%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
<% end %> <% end %>
<div class="top-content"> <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" %> <% if params[:project_type] == "1" %>
<table width="940px"> <table width="940px">
<tr> <tr>