Commit 68ef367f60ebc31942f68cd96f657f3c53c5537c
1 parent
8c9153c0
Exists in
master
Fix pairwise disabled at control panel
Showing
2 changed files
with
14 additions
and
3 deletions
Show diff stats
lib/pairwise_plugin/pairwise_content.rb
@@ -59,9 +59,17 @@ class PairwisePlugin::PairwiseContent < Article | @@ -59,9 +59,17 @@ class PairwisePlugin::PairwiseContent < Article | ||
59 | embeded = options.has_key? "embeded" | 59 | embeded = options.has_key? "embeded" |
60 | prompt_id = options["prompt_id"] | 60 | prompt_id = options["prompt_id"] |
61 | pairwise_content = self | 61 | pairwise_content = self |
62 | - proc do | ||
63 | - locals = {:pairwise_content => pairwise_content, :source => source, :embeded => embeded, :prompt_id => prompt_id } | ||
64 | - render :file => 'content_viewer/prompt', :locals => locals | 62 | + |
63 | + if not Environment.default.enabled_plugins.include? "PairwisePlugin" | ||
64 | + proc do | ||
65 | + locals = {:pairwise_content => pairwise_content, :source => source, :embeded => embeded, :prompt_id => prompt_id } | ||
66 | + render :file => 'content_viewer/closed_pool', :locals => locals | ||
67 | + end | ||
68 | + else | ||
69 | + proc do | ||
70 | + locals = {:pairwise_content => pairwise_content, :source => source, :embeded => embeded, :prompt_id => prompt_id } | ||
71 | + render :file => 'content_viewer/prompt', :locals => locals | ||
72 | + end | ||
65 | end | 73 | end |
66 | end | 74 | end |
67 | 75 |