From 6f54e1680d390f853544636689547cd81411ccb9 Mon Sep 17 00:00:00 2001 From: william Date: Tue, 13 Aug 2013 15:20:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86tag=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9Btag=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/tags_controller.rb | 2 ++ app/helpers/projects_helper.rb | 2 +- app/views/tags/_related_tags.html.erb | 6 +++-- app/views/tags/_selected_tags.html.erb | 4 ++-- app/views/tags/_show_projects.html.erb | 6 ++--- app/views/tags/_show_users.html.erb | 2 +- app/views/tags/_tag_name.html.erb | 32 ++++---------------------- app/views/tags/add_tag.js.erb | 4 ++-- app/views/tags/delete_tag.js.erb | 4 ++-- app/views/tags/index.html.erb | 11 +++++---- app/views/tags/show_all.html.erb | 13 ----------- public/stylesheets/application.css | 12 ++++++++++ 12 files changed, 39 insertions(+), 59 deletions(-) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 1d193ef42..35e99dc6c 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -53,6 +53,7 @@ class TagsController < ApplicationController def add_tag @tag = params[:tag] + @show_flag = params[:show_flag] $selected_tags << @tag $related_tags.delete(@tag) @@ -63,6 +64,7 @@ class TagsController < ApplicationController def delete_tag @tag = params[:tag] + @show_flag = params[:show_flag] $related_tags << @tag $selected_tags.delete(@tag) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index d4738a831..cbe57d1c7 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -85,7 +85,7 @@ module ProjectsHelper # this method is used to get all projects that tagged one tag # added by william def get_projects_by_tag(tag_name) - Project.tagged_with(tag_name).by_join_date + Project.tagged_with(tag_name) end end diff --git a/app/views/tags/_related_tags.html.erb b/app/views/tags/_related_tags.html.erb index b7ebd5899..84fb06923 100644 --- a/app/views/tags/_related_tags.html.erb +++ b/app/views/tags/_related_tags.html.erb @@ -1,9 +1,11 @@ <% if related_tags %>