-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addapted tags so that we can use <r:input type='checkbox' name='tagge…
…d[]' value='foo'/> to set tags with checkbox.
- Loading branch information
Showing
9 changed files
with
86 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Bricks | ||
module Tags | ||
module Zafu | ||
def r_tag_cloud | ||
if node_kind_of?(Node) | ||
node_name = @context[:parent_node] || node | ||
else | ||
node_name = @context[:previous_node] | ||
end | ||
|
||
if @params[:in] == 'project' || @params[:in] == 'section' | ||
filter = " AND nodes.project_id = \#{Node.connection.quote(#{node_name}.get_#{@params[:in]}_id)}" | ||
else | ||
filter = '' | ||
end | ||
|
||
method = "Link.find_by_sql(%Q{SELECT COUNT(nodes.id) AS count, links.comment FROM links INNER JOIN nodes ON nodes.id = links.source_id WHERE \#{@node.secure_scope('nodes')} AND links.target_id IS NULL#{filter} GROUP BY links.comment ORDER BY links.comment})" | ||
open_context(:method => method, :class => [Link]) | ||
end | ||
end # Zafu | ||
end # Tags | ||
end # Bricks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters