修复tag的bug
This commit is contained in:
parent
0c89ef0360
commit
51249e26f3
|
@ -24,13 +24,17 @@ class TagsController < ApplicationController
|
|||
@users_results = get_users_by_tag($selected_tags)
|
||||
|
||||
@obj_id = params[:obj_id]
|
||||
case params[:object_flag]
|
||||
@obj_flag = params[:object_flag]
|
||||
|
||||
case @obj_flag
|
||||
when '1' then
|
||||
@obj = User.find_by_id(@obj_id)
|
||||
when '2' then
|
||||
@obj = Project.find_by_id(@obj_id)
|
||||
when '3' then
|
||||
@obj = Issue.find_by_id(@obj_id)
|
||||
when '4'
|
||||
@obj = Bid.find_by_id(@obj_id)
|
||||
else
|
||||
@obj = nil
|
||||
end
|
||||
|
|
|
@ -73,8 +73,7 @@
|
|||
<li id="issue-<%= issue.id %>" class="hascontextmenu-1 <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<% column_content = ( query.inline_columns.map {|column| "#{column_content_new(column, issue)}"}) %>
|
||||
|
||||
<%= render :partial => "/praise_tread/praise_tread",
|
||||
:locals => {:obj => issue,:user_id =>User.current.id}%>
|
||||
<!-- 在这里添加赞和踩-->
|
||||
|
||||
<% if issue.tracker.name == 'Bug' %>
|
||||
<%= image_tag("/images/task.png", :class => "img-tag-issues") %>
|
||||
|
|
|
@ -27,9 +27,8 @@
|
|||
<%= render_issue_subject_with_tree(@issue) %>
|
||||
</div>
|
||||
|
||||
<!-- 顶和踩 -->
|
||||
<%= render :partial => "/praise_tread/praise_tread",
|
||||
:locals => {:obj => @issue,:user_id =>User.current.id}%>
|
||||
<!-- 顶和踩 在这里添加 -->
|
||||
|
||||
|
||||
<p class="author">
|
||||
<%= authoring @issue.created_on, @issue.author %>.
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<%= textilizable @project.name %>
|
||||
</div>
|
||||
<div>
|
||||
<% if @project.watched_by?(User.current) %>
|
||||
<% unless User.current.member_of? @project %>
|
||||
<%= watcher_link(@project, User.current) %>
|
||||
<% end %>
|
||||
</div></td>
|
||||
|
|
|
@ -4,6 +4,6 @@ $('#related_tags').html('<%= j(render :partial => "related_tags",
|
|||
:locals => {:related_tags => $related_tags })%>')
|
||||
|
||||
$('#show_results').html('<%= j(render :partial => "tag_search_results",:locals => {:issues_results => @issues_results,
|
||||
:projects_results => @projects_results,:users_results => @users_results })%>')
|
||||
:projects_results => @projects_results,:users_results => @users_results,:show_flag => @show_flag })%>')
|
||||
|
||||
|
|
@ -4,5 +4,5 @@ $('#related_tags').html('<%= j(render :partial => "related_tags",
|
|||
:locals => {:related_tags => $related_tags })%>')
|
||||
|
||||
$('#show_results').html('<%= j(render :partial => "tag_search_results",:locals => {:issues_results => @issues_results,
|
||||
:projects_results => @projects_results,:users_results => @users_results })%>')
|
||||
:projects_results => @projects_results,:users_results => @users_results,:show_flag => @show_flag })%>')
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<div id="show_results">
|
||||
<%= render :partial => "tag_search_results",:locals => {:issues_results => @issues_results,
|
||||
:projects_results => @projects_results,:users_results => @users_results }%>
|
||||
:projects_results => @projects_results,:users_results => @users_results ,:show_flag => @obj_flag}%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddUserIdToShares < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :shares, :user_id, :integer
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue