Apache Lucene open-source search software
remove views now within the Flare plugin
Erik Hatcher0658c389808b
diff --git a/client/ruby/flare/app/controllers/browse_controller.rb b/client/ruby/flare/app/controllers/browse_controller.rbdeleted file mode 100644index 173d798c0f5..00000000000--- a/client/ruby/flare/app/controllers/browse_controller.rb+++ /dev/null@@ -1,15 +0,0 @@-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--class BrowseController < ApplicationController- flare-enddiff --git a/client/ruby/flare/app/controllers/document_controller.rb b/client/ruby/flare/app/controllers/document_controller.rbdeleted file mode 100755index 48290af353a..00000000000--- a/client/ruby/flare/app/controllers/document_controller.rb+++ /dev/null@@ -1,17 +0,0 @@-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.---class DocumentController < ApplicationController- # Currently not used, as partials are used for rendering documents in search results- # TODO: how best to allow pluggable document rendering?-enddiff --git a/client/ruby/flare/app/controllers/simile_controller.rb b/client/ruby/flare/app/controllers/simile_controller.rbdeleted file mode 100755index ae78a437bed..00000000000--- a/client/ruby/flare/app/controllers/simile_controller.rb+++ /dev/null@@ -1,47 +0,0 @@-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.---class SimileController < ApplicationController- before_filter :flare_before-- def exhibit- @data = @flare.search(0, 10)-- # Exhibit seems to require a label attribute to be happy- @data.each {|d| d['label'] = d['title_text']}-- respond_to do |format|- format.html # renders exhibit.rhtml- format.json { render :json => {'items' => @data}.to_json } # Exhibit seems to require data to be in a 'items' Hash- end- end-- def timeline- @data = @flare.search(0, 10)-- respond_to do |format|- format.html # renders timeline.rhtml- format.xml # renders timeline.rxml- end- end-- #TODO: this is duplicated from flare's- private- def flare_before- # TODO: allow source of context to be configurable.- session[:flare_context] ||= Flare::Context.new(SOLR_CONFIG)-- @flare = session[:flare_context]- end--enddiff --git a/client/ruby/flare/app/views/browse/index.rhtml b/client/ruby/flare/app/views/browse/index.rhtmldeleted file mode 100644index 20e4d24d63f..00000000000--- a/client/ruby/flare/app/views/browse/index.rhtml+++ /dev/null@@ -1,109 +0,0 @@-<div id="sidebar"><div class="boxContent">- <div class="searchbar">- <% form_tag(:action=>'add_query') do %>- <%= text_field_with_auto_complete :search, :query %>- <%=submit_tag "search"%>- <% end %>- </div>-<!-- <h2>browse facets</h2> -->--<% if @flare.facet_queries.size > 0%>-<h4>- saved searches-</h4>-<ul>-<% @flare.facet_queries.each do |name,value|- count = @response.data['facet_counts']['facet_queries'][value[:real_query]]-%>-<li>- <%= image_tag "pie_#{(count * 100.0 / @response.total_hits).ceil rescue 0}.png"%>- <%= link_to "#{name} (#{count})", {:action => 'add_saved_search', :name=>name}, {:title => value.inspect}%>- <%= link_to "*", {:action => 'show_saved', :name => name}, {:target => '_blank'}%>- <%=link_to image_tag("x-close.gif"), :action => :remove_saved_search, :name => name %>-</li>-<% end %>-</ul>-<% end %>-<% @flare.facet_fields.each do |field|%>- <h4>-<%= facet_label(field)%> <%=link_to "[browse]", :action => 'facet', :field => field%>-<!-- <%=link_to field, :action => 'facet', :field => field%> -->-</h4>-- <ul>- <% @response.field_facets(field).each do |f| %>- <li>- <%= image_tag "pie_#{(f.value * 100.0 / @response.total_hits).ceil}.png"%>- <%= link_to "#{f.name} (#{f.value})", :action => 'add_filter', :field=>field, :value=>f.name%>- </li>- <% end %>- </ul>-<% end %>-<span class="exhibit"><%=link_to image_tag("simile-exhibit.png"), :controller => :simile, :action => :exhibit %></span>-</div></div>--<div id="variables">- <div class="clear">- <%=link_to '[clear constraints]', :action => 'clear'%>- </div>--<div>- <span class="varheader">Saved searches:</span>- <div id="queries">- <% @flare.applied_facet_queries.each_with_index do |q, i| %>- <%=link_to q[:negative] ? "-" : "+", :action => :invert_saved_constraint, :index => i%>- <%=q[:name]%>- <%=link_to image_tag("x-close.gif"), :action => :remove_saved_constraint, :index => i %><br/>- <% end %>- </div>-<span class="varheader">Queries:</span>- <div id="queries">-<% @flare.queries.each_with_index do |q,i| %>-<%=link_to q[:negative] ? "-" : '+', :action => :invert_query, :index => i%>-<span id="query_<%=i%>"><%=q[:query]%></span>-<%= in_place_editor "query_#{i}", :url=> url_for(:action=>"update_query", :index=>i, :script=>true) %>-<%=link_to image_tag("x-close.gif"), :action => :remove_query, :index => i %><br/>-<% end %>- </div>-</div>--<div>-<span class="varheader">Filters:</span>- <div id="filters">-<% @flare.filters.each_with_index do |filter, i| %>- <%=link_to filter[:negative] ? "-" : "+", :action => :invert_filter, :index => i%>- <%=filter[:field]%>:<%=filter[:value]%>- <%=link_to image_tag("x-close.gif"), :action => :remove_filter, :index => i %><br/>-<% end %>- </div>-</div>--<div class="clear">- <%=link_to '[clear constraints]', :action => 'clear'%>-</div>--<% form_tag({:action=>'save'},{:id => 'savesearch', :style => "display:none;"}) do %>- <%= text_field_tag :name, "", {:size => 10, :id => "savesearch_name"} %>- <%= link_to_function "save", "document.forms['savesearch'].submit();" -%>- <%= link_to_function "cancel", "Element.toggle('savesearch'); Element.toggle('savesearch_link')" -%>-<% end %>-<%= link_to_function "[save these constraints]", "Element.toggle('savesearch'); Element.toggle('savesearch_link'); $('savesearch_name').focus()", {:id => "savesearch_link"} -%>--</div>--<% if @flare.empty_constraints? %>- search or facet to see results-<% else %>--<div class="resultsheader">Results <strong><%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%></strong> of <strong><%[email protected]_hits%></strong></div>--<div id="results"><table cellpadding="10">- <% @response.each do |doc| %>- <%= render :partial => "document/document_#{SOLR_ENV}", :locals => {:doc => doc, :response => @response}%>- <% end %>-</table>-</div>--<div class="resultsheader"><%=link_to_if @flare.page != 1, "<<", :page => @flare.page - 1%> Results <strong><%=[@start + 1,@response.total_hits].min%>-<%=[@response.total_hits,@results_per_page + @start].min%></strong> of <strong><%[email protected]_hits%></strong><%=link_to_if @flare.page < (@response.total_hits.to_f / @results_per_page).ceil, ">>", :page => @flare.page + 1%></div>--<% end %>\ No newline at end of filediff --git a/client/ruby/flare/app/views/document/_document_delicious.rhtml b/client/ruby/flare/app/views/document/_document_delicious.rhtmlindex 099e2420b7a..f71217afe68 100755--- a/client/ruby/flare/app/views/document/_document_delicious.rhtml+++ b/client/ruby/flare/app/views/document/_document_delicious.rhtml@@ -1,11 +1,11 @@<tr valign="top"><td>- <%=image_tag "http://images.amazon.com/images/P/#{doc['asin_display']}.01.MZZZZZZZ" %>+ <%=image_tag "http://images.amazon.com/images/P/#{doc['id']}.01.MZZZZZZZ" %></td><td><table class="entry"><tr>- <td class="title" colspan="2"><%=link_to doc['title_text'], "http://www.amazon.com/exec/obidos/ASIN/#{doc['asin_display']}"%></td>+ <td class="title" colspan="2"><%=link_to doc['title_text'], "http://www.amazon.com/exec/obidos/ASIN/#{doc['id']}"%></td></tr><% doc.each do |k,v|; highlighting = response.highlighted(doc['id'], k) %><tr><td class="field"><%=k%>:</td><td><%= highlighting ? "...#{highlighting}..." : (v.respond_to?('join') ? v.join(',') : v.to_s)%></td></tr>diff --git a/client/ruby/flare/app/views/document/_document_development.rhtml b/client/ruby/flare/app/views/document/_document_development.rhtmldeleted file mode 100755index 6d25c471576..00000000000--- a/client/ruby/flare/app/views/document/_document_development.rhtml+++ /dev/null@@ -1,12 +0,0 @@-<tr valign="top">- <td>- <table class="entry">- <tr>- <td class="title" colspan="2"><%=doc['title_text']%></td>- </tr>- <% doc.each do |k,v|; highlighting = response.highlighted(doc['id'], k) %>- <tr><td class="field"><%=k%>:</td><td><%= highlighting ? "...#{highlighting}..." : (v.respond_to?('join') ? v.join(',') : v.to_s)%></td></tr>- <% end %>- </table>- </td>-</tr>diff --git a/client/ruby/flare/app/views/simile/exhibit.rhtml b/client/ruby/flare/app/views/simile/exhibit.rhtmldeleted file mode 100644index 8a39faccd05..00000000000--- a/client/ruby/flare/app/views/simile/exhibit.rhtml+++ /dev/null@@ -1,24 +0,0 @@-<html>- <head>- <title>SIMILE Exhibit view</title>-- <link href="exhibit.json" type="application/json" rel="exhibit/data" />-- <script src="http://static.simile.mit.edu/exhibit/api/exhibit-api.js"- type="text/javascript"></script>- </head>- <body>- <h1>SIMILE Exhibit view</h1>- <table width="100%">- <tr valign="top">- <td>- <div id="exhibit-control-panel"></div>- <div id="exhibit-view-panel"></div>- </td>- <td width="25%">- <div id="exhibit-browse-panel" ex:facets="<%= @flare.facet_fields.collect {|f| ".#{f}"}.join(',') -%>"></div>- </td>- </tr>- </table>- </body>- </html>\ No newline at end of filediff --git a/client/ruby/flare/app/views/simile/timeline.rhtml b/client/ruby/flare/app/views/simile/timeline.rhtmldeleted file mode 100755index d8119ad551d..00000000000--- a/client/ruby/flare/app/views/simile/timeline.rhtml+++ /dev/null@@ -1,46 +0,0 @@-<html>- <head>- ...- <script src="http://simile.mit.edu/timeline/api/timeline-api.js" type="text/javascript"></script>- <script type="text/javascript">- var tl;- function onLoad() {- var eventSource = new Timeline.DefaultEventSource();- var bandInfos = [- Timeline.createBandInfo({- eventSource: eventSource,- date: "Jun 28 2006 00:00:00 GMT",- width: "70%",- intervalUnit: Timeline.DateTime.DECADE,- intervalPixels: 200- }),- Timeline.createBandInfo({- eventSource: eventSource,- date: "Jun 28 2006 00:00:00 GMT",- width: "30%",- intervalUnit: Timeline.DateTime.YEAR,- intervalPixels: 200- })- ];- bandInfos[0].syncWith = 1;- bandInfos[0].highlight = true;-- tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);- Timeline.loadXML("timeline.xml", function(xml, url) { eventSource.loadXML(xml, url); });- }-- var resizeTimerID = null;- function onResize() {- if (resizeTimerID == null) {- resizeTimerID = window.setTimeout(function() {- resizeTimerID = null;- tl.layout();- }, 500);- }- }- </script>- </head>- <body onload="onLoad();" onresize="onResize();">- <div id="my-timeline" style="height: 300px; border: 1px solid #aaa"></div>- </body>-</html>diff --git a/client/ruby/flare/app/views/simile/timeline.rxml b/client/ruby/flare/app/views/simile/timeline.rxmldeleted file mode 100755index d3d2518e537..00000000000--- a/client/ruby/flare/app/views/simile/timeline.rxml+++ /dev/null@@ -1,50 +0,0 @@-# The ASF licenses this file to You under the Apache License, Version 2.0-# (the "License"); you may not use this file except in compliance with-# the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--xml.data do- @data.each do |doc|- xml.event(doc['title_text'],- :start => doc[SOLR_CONFIG[:timeline_dates].to_s],- :end => doc[SOLR_CONFIG[:timeline_dates].to_s],- :title => doc['title_text'],- :image => SOLR_CONFIG[:image_proc] ? SOLR_CONFIG[:image_proc].call(doc) : nil)- end-end--# Amazon images: http://www.betaversion.org/~stefano/linotype/news/66/-# <data>-# <event-# start="May 28 2006 09:00:00 GMT"-# end="Jun 15 2006 09:00:00 GMT"-# isDuration="true"-# title="Writing Timeline documentation"-# image="http://simile.mit.edu/images/csail-logo.gif"-# >-# A few days to write some documentation for <a href="http://simile.mit.edu/timeline/">Timeline</a>.-# </event>-#-# <event-# start="Jun 16 2006 00:00:00 GMT"-# end="Jun 26 2006 00:00:00 GMT"-# title="Friend's wedding"-# >-# I'm not sure precisely when my friend's wedding is.-# </event>-#-# <event-# start="Aug 02 2006 00:00:00 GMT"-# title="Trip to Beijing"-# link="http://travel.yahoo.com/"-# >-# Woohoo!-# </event>-# </data>\ No newline at end of filediff --git a/client/ruby/flare/config/environment.rb b/client/ruby/flare/config/environment.rbindex 7c78b8b166c..11770858190 100644--- a/client/ruby/flare/config/environment.rb+++ b/client/ruby/flare/config/environment.rb@@ -69,7 +69,7 @@ solr_environments = {:delicious => {:timeline_dates => :published_year_facet,- :image_proc => Proc.new {|doc| "http://images.amazon.com/images/P/#{doc['asin_display']}.01.MZZZZZZZ"},+ :image_proc => Proc.new {|doc| "http://images.amazon.com/images/P/#{doc['id']}.01.MZZZZZZZ"},},:tang => {diff --git a/client/ruby/flare/test/test_helper.rb b/client/ruby/flare/test/test_helper.rbindex 0af2507df6a..376b9e422a1 100644--- a/client/ruby/flare/test/test_helper.rb+++ b/client/ruby/flare/test/test_helper.rb@@ -6,7 +6,6 @@ require File.expand_path(File.dirname(__FILE__) + "/../config/environment")require 'application'require 'test/unit'require 'action_controller/test_process'-require 'action_web_service/test_invoke'require 'breakpoint'#require 'test_help'