Permalink
Browse files

Adding an .emptyfile for log dir

  • Loading branch information...
1 parent aedc30a commit daab7f9d554b5a8f29cfa06b16615be3702980bc @adamhjk committed Dec 10, 2007
@@ -64,6 +64,7 @@ def bulk_tag
@heading = "Search Results"
end
end
+ render :template => "dashboard/bulk_tag.js.rjs"
end
private
@@ -176,11 +176,15 @@ def all_node_destroy
# POST /tags/:id/nodes
def all_node_add
- @tag = Tag.find(params[:id])
+ @tag = Tag.find(params[:id], :include => [ :nodes ])
unless @tag.nodes.detect { |n| n.description == params[:new_node] }
- node = Node.find(:all, :conditions => [ "description = ?", params[:new_node] ])
- @tag.nodes << node
- node.each { |n| n.solr_save }
+ node = Node.find(:first, :conditions => [ "description = ?", params[:new_node] ])
+ if node
+ @tag.nodes << node
+ node.solr_save
+ else
+ flash[:add_notice] = "Cannot find node #{params[:new_node]}"
+ end
end
if request.xhr?
render(:partial => "/tags/tagged_nodes",
@@ -13,6 +13,9 @@
</div>
<% div_style = visible ? "" : "display: none;" -%>
<div id="tag_node_list_<%= tag.id %>" class="tag_node_list" style="<%= div_style %>">
+<% if flash.has_key?(:add_notice) %>
+<p style="color: green"><%= flash[:add_notice] %></p>
+<% end %>
<% if current_user.readwrite == true -%>
<% form_tag(url_for(:controller => "tags", :action => "all_node_add", :id => tag.id),
:id => "tag_#{tag.id}_add_node", :class => "remote_form", :update => "tag_list_#{tag.id}") do -%>
@@ -11,6 +11,7 @@
:action => "all_update",
:submit => "Submit",
:remote => false,
+ :update => "tag_show_header",
:url => url_for(:controller => "tags", :action => "all_update", :id => @tag.id)
}%>
</div>
View
@@ -103,7 +103,7 @@
:action => "all_destroy",
:conditions => { :method => :delete }
- map.connect "tags/:id;edit",
+ map.connect "tags/:id/edit",
:controller => "tags",
:action => "all_edit",
:conditions => { :method => :get }
View
No changes.

0 comments on commit daab7f9

Please sign in to comment.