From: <pau...@us...> - 2010-03-12 02:35:45
|
Revision: 651 http://dlf-aquifer.svn.sourceforge.net/dlf-aquifer/?rev=651&view=rev Author: paulnsorensen Date: 2010-03-12 02:35:38 +0000 (Fri, 12 Mar 2010) Log Message: ----------- Paul's latest changes Modified Paths: -------------- ruby/trunk/aquifer/app/controllers/collection_controller.rb ruby/trunk/aquifer/app/controllers/home_controller.rb ruby/trunk/aquifer/app/controllers/search_controller.rb ruby/trunk/aquifer/app/helpers/application_helper.rb ruby/trunk/aquifer/app/models/collection.rb ruby/trunk/aquifer/app/models/search.rb ruby/trunk/aquifer/app/views/collection/_mods_element.rhtml ruby/trunk/aquifer/app/views/collection/list.rhtml ruby/trunk/aquifer/app/views/collection/shortlist.rhtml ruby/trunk/aquifer/app/views/collection/show.rhtml ruby/trunk/aquifer/app/views/home/_footer.rhtml ruby/trunk/aquifer/app/views/home/_front_widget.rhtml ruby/trunk/aquifer/app/views/home/_list.rhtml ruby/trunk/aquifer/app/views/home/_tree_widget_node.rhtml ruby/trunk/aquifer/app/views/home/about.rhtml ruby/trunk/aquifer/app/views/home/contact_us.rhtml ruby/trunk/aquifer/app/views/home/faq.rhtml ruby/trunk/aquifer/app/views/home/help.rhtml ruby/trunk/aquifer/app/views/home/index.rhtml ruby/trunk/aquifer/app/views/layouts/search.rhtml ruby/trunk/aquifer/app/views/meta_search/search.rhtml ruby/trunk/aquifer/app/views/search/_brief_field.rhtml ruby/trunk/aquifer/app/views/search/_brief_record.rhtml ruby/trunk/aquifer/app/views/search/_facet_box.rhtml ruby/trunk/aquifer/app/views/search/_facet_menu.rhtml ruby/trunk/aquifer/app/views/search/_field.rhtml ruby/trunk/aquifer/app/views/search/_link_to_source.rhtml ruby/trunk/aquifer/app/views/search/_meta_search.rhtml ruby/trunk/aquifer/app/views/search/_record.rhtml ruby/trunk/aquifer/app/views/search/_thumbnail.rhtml ruby/trunk/aquifer/app/views/search/full_record.rhtml ruby/trunk/aquifer/app/views/search/index.rhtml Added Paths: ----------- ruby/trunk/aquifer/app/views/collection/_collection_list.rhtml ruby/trunk/aquifer/app/views/home/_header.rhtml ruby/trunk/aquifer/app/views/home/index_orig.rhtml ruby/trunk/aquifer/app/views/home/layout.rhtml ruby/trunk/aquifer/app/views/home/layout2.rhtml ruby/trunk/aquifer/app/views/home/load_front_widget_data.rhtml ruby/trunk/aquifer/app/views/home/load_places_widget_data.rhtml ruby/trunk/aquifer/app/views/home/load_subjects_widget_data.rhtml ruby/trunk/aquifer/app/views/home/load_times_widget_data.rhtml ruby/trunk/aquifer/app/views/layouts/default.rhtml ruby/trunk/aquifer/app/views/layouts/home_orig.rhtml ruby/trunk/aquifer/app/views/layouts/search_orig.rhtml ruby/trunk/aquifer/app/views/search/_collection_box.rhtml ruby/trunk/aquifer/app/views/search/_facet_list.rhtml ruby/trunk/aquifer/app/views/search/_search_bar.rhtml ruby/trunk/aquifer/app/views/search/load_front_widget.rhtml ruby/trunk/aquifer/app/views/search/loading.rhtml ruby/trunk/aquifer/app/views/search/search_collections.rhtml Modified: ruby/trunk/aquifer/app/controllers/collection_controller.rb =================================================================== --- ruby/trunk/aquifer/app/controllers/collection_controller.rb 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/controllers/collection_controller.rb 2010-03-12 02:35:38 UTC (rev 651) @@ -1,5 +1,5 @@ class CollectionController < ApplicationController - layout "search" + layout "default" def index list @@ -12,10 +12,10 @@ def list if params[:q].blank? - @collections2 = Collection.paginate(:page=>params[:page],:per_page=>12,:order=>'title_sort',:conditions=>"oai_id!=''") + @collections2 = Collection.paginate(:page=>params[:page],:per_page=>15,:order=>'title_sort',:conditions=>"oai_id!=''") else rlike = make_mysql_collection_qry(params[:q]) - @collections2 = Collection.paginate(:page=>params[:page],:per_page=>12,:order=>'title_sort',:conditions=>"oai_id!=''#{rlike}") + @collections2 = Collection.paginate(:page=>params[:page],:per_page=>15,:order=>'title_sort',:conditions=>"oai_id!=''#{rlike}") end end Modified: ruby/trunk/aquifer/app/controllers/home_controller.rb =================================================================== --- ruby/trunk/aquifer/app/controllers/home_controller.rb 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/controllers/home_controller.rb 2010-03-12 02:35:38 UTC (rev 651) @@ -1,25 +1,30 @@ class HomeController < ApplicationController - layout 'search', :except=>[:maintenance] + layout 'default', :except=>[:maintenance,:load_subjects_widget_data,:load_places_widget_data,:load_times_widget_data] @@last_widget_cache = Time.local(2000,1,1) @@last_featured_collections_update = Time.local(2000,1,1,1,0) - @@featured_collections = Array.new(9) + @@featured_collections = Array.new(11) + + @@last_time_tree_cache = Time.local(2000,1,1) + @@last_place_tree_cache = Time.local(2000,1,1) + @@last_subject_tree_cache = Time.local(2000,1,1) + -# def index -# @featured_coll = FeaturedCollection.find(:first) -# @item_cnt = Item.count('id',:conditions => nil).to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,") -# @coll_cnt = Collection.count('id',:conditions => nil) -# @fmt_cnt = 9 -# -# front_widget if params[:ffw]=='true' #force a refresh of the front widget -# # a better expiration should be done, but this is ok -# # no caching on dev because class level vars, not held there -# cache_age = Time.now - @@last_widget_cache -# unless read_fragment({}) and cache_age < 0.5.days -# front_widget # setup facet widget -# @@last_widget_cache = Time.now -# end -# end + # def index + # @featured_coll = FeaturedCollection.find(:first) + # @item_cnt = Item.count('id',:conditions => nil).to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,") + # @coll_cnt = Collection.count('id',:conditions => nil) + # @fmt_cnt = 9 + # + # front_widget if params[:ffw]=='true' #force a refresh of the front widget + # # a better expiration should be done, but this is ok + # # no caching on dev because class level vars, not held there + # cache_age = Time.now - @@last_widget_cache + # unless read_fragment({}) and cache_age < 0.5.days + # front_widget # setup facet widget + # @@last_widget_cache = Time.now + # end + # end def index @item_cnt = Item.count('id',:conditions => nil).to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,") @@ -28,6 +33,38 @@ featured_collections + + + tag_cloud + + end + + + def load_subjects_widget_data + cache_age = Time.now - @@last_subject_tree_cache + unless params[:ffw]=='true' or read_fragment({}) and cache_age < 1.days + subject_tree + @@last_subject_tree_cache = Time.now + end + end + + def load_times_widget_data + cache_age = Time.now - @@last_time_tree_cache + unless params[:ffw]=='true' or read_fragment({}) and cache_age < 1.days + time_tree + @@last_time_tree_cache = Time.now + end + end + + def load_places_widget_data + cache_age = Time.now - @@last_place_tree_cache + unless params[:ffw]=='true' or read_fragment({}) and cache_age < 1.days + place_tree + @@last_place_tree_cache = Time.now + end + end + + def load_front_widget_data front_widget if params[:ffw]=='true' #force a refresh of the front widget # a better expiration should be done, but this is ok # no caching on dev because class level vars, not held there @@ -37,204 +74,205 @@ @@last_widget_cache = Time.now end +end -# list - - tag_cloud - - end - - - - +def layout + +end - - def home2 +def home2 - end +end - def maintenance +def maintenance - end +end - def about +def about - end +end - def help +def help - end +end - def contact_us +def contact_us - end +end - def message_sent - UserFeedback.deliver_feedback( params ) - end +def message_sent +UserFeedback.deliver_feedback( params ) +end - def faq +def faq - end +end - def conditions_of_use +def conditions_of_use - end +end - def tools +def tools - end +end - def debug - unless User.get_current.is_super_user? - render(:status=>'403 Forbidden') - end - end +def debug +unless User.get_current.is_super_user? + render(:status=>'403 Forbidden') +end +end - private +private - def featured_collections - cache_age = Time.now - @@last_featured_collections_update - unless read_fragment({}) and cache_age < 1.day - colls=Collection.find(:all) +def featured_collections +cache_age = Time.now - @@last_featured_collections_update +unless read_fragment({}) and cache_age < 1.day + colls=Collection.find(:all) - old_ids = Array.new(9) + old_ids = Array.new(11) - @@featured_collections.each do |collection| - old_ids.push(collection.object_id) - end + @@featured_collections.each do |collection| + old_ids.push(collection.object_id) + end - @@featured_collections.clear + @@featured_collections.clear + new_ids = Array(11) - begin - next_coll = rand(colls.length) - if !old_ids.include?(next_coll) && colls[next_coll].get_image_url != "" - @@featured_collections.push(colls[next_coll]) - end - end while @@featured_collections.size < 9 - - #make featured collections always update at about the same time regardless of when the page is browsed - @@last_featured_collections_update = Time.mktime(Time.now.year, Time.now.month, Time.now.day, 1, 0, 0) - - @featured_colls = @@featured_collections + begin + next_coll = rand(colls.length) + if !old_ids.include?(next_coll) && !new_ids.include?(next_coll) && colls[next_coll].get_image_url != "" + @@featured_collections.push(colls[next_coll]) + new_ids.push(next_coll) end - end + end while @@featured_collections.size < 11 + #make featured collections always update at about the same time regardless of when the page is browsed + @@last_featured_collections_update = Time.mktime(Time.now.year, Time.now.month, Time.now.day, 1, 0, 0) + @featured_colls = @@featured_collections +end +end - def list - @collections2 = Collection.paginate(:page=>params[:page],:per_page=>9,:order=>'title_sort',:conditions=>"oai_id!=''") - end - - - def tag_cloud - @heading_tag = 'a' - per_page = 30 +def tag_cloud +@heading_tag = 'a' +per_page = 30 # order = "item_count/grand_total desc, item_count desc, normalized_text" - order = "hs.item_count desc, normalized_text" +order = "hs.item_count desc, normalized_text" - @collection_id = 0 - conditions = ["headings.tags like '%%#{@heading_tag}%%' and hs.tag = '#{@heading_tag}' and hs.collection_id = #{@collection_id}"] +@collection_id = 0 +conditions = ["headings.tags like '%%#{@heading_tag}%%' and hs.tag = '#{@heading_tag}' and hs.collection_id = #{@collection_id}"] # @legal_sorts = ['frequency','uniqueness','rarity','heading'] # @legal_sorts.insert( 0, 'distinctiveness' ) unless @collection_id == 0 - joins = "left join heading_stats hs on ( headings.id = hs.heading_id )" +joins = "left join heading_stats hs on ( headings.id = hs.heading_id )" - puts "conditions=#{conditions.inspect}" - @headings = Heading.paginate( :page => params[:page], :joins => joins, :conditions => conditions, :order => order, :per_page => per_page ) - end +puts "conditions=#{conditions.inspect}" +@headings = Heading.paginate( :page => params[:page], :joins => joins, :conditions => conditions, :order => order, :per_page => per_page ) +end +def time_tree +facet_counts,recs = SolrSearch.search('',['year_facet'],[]) +@time_tree = Hash.new +year_facets = facet_counts['facet_fields']['year_facet'] - # build simple trees for various front page facets - # node is hash 'name' => [link_to_options,count,children] - def front_widget - facet_counts,recs = SolrSearch.search('',['year_facet'],[]) - - @time_tree = Hash.new - year_facets = facet_counts['facet_fields']['year_facet'] - - year_facets.keys.sort.each do |year| - next if year.to_i < 1600 or year.to_i > Time.new.year - century = ( year.to_i / 100 * 100 ).to_i - decade = ( year.to_i / 10 * 10 ).to_i - records = year_facets[ year ] - - unless @time_tree[ century ] - @time_tree[ century ] = {:name=>"#{century}'s",:records=>0,:children=>Hash.new} - end - - node = @time_tree[ century ] - node[ :records ] += records - - unless node[ :children ][ decade ] - node[ :children ][ decade ] = { - :name=>"#{decade}'s", - :link_options=>{:controller=>'search',:action=>'',:new_search=>1,:facet_tag=>'decade_facet',:facet_browse => decade, :facet=> "year"}, - :records=>0, - :children=>Hash.new - } - end - node = node[ :children ][ decade ] - node[ :records ] += records - node[ :children ][ year ] = { - :name=>year, - :link_options=>{ - :controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'year_facet', :facet_browse => year, :facet => "state"}, - :records=>records - } - end - - facet_counts,recs = SolrSearch.search('',['city_state_facet'],[]) - @place_tree = Hash.new - place_facets = facet_counts['facet_fields']['city_state_facet'] - - place_facets.keys.sort.each do |place| - match = /(.*), ([A-Z][A-Z])/.match( place ) - city = match[1] - state_code = match[2] - state = UsState.code_to_name( match[2] ) - next unless state - records = place_facets[ place ] - - unless @place_tree[ state ] - @place_tree[ state ] = { - :name=>state, - :link_options=>{ - :controller => 'search', :action=>'index',:new_search=>1, - :facet_tag => 'state_facet', :facet_browse => state_code, :facet => "city_state" - }, - :records=>0, - :children=>Hash.new - } - end - @place_tree[ state ][ :records ] += records - @place_tree[ state ][ :children ][ city ] = { - :name=>city, - :link_options=>{ - :controller => 'search', :action=>'index',:new_search=>1, - :facet_tag => 'city_state_facet', :facet_browse => place, :facet => "decade" - }, - :records=>records - } - end - - @subject_tree = Hash.new - Collection.get_asho_subject_hash.each do |k,v| - @subject_tree[ k ] = { - :name=>k, - :link_options=>{ - :controller => 'search', :action=>'index',:new_search=>1, - :facet_tag => 'asho_subject_facet', :facet_browse => k, :facet => "set_spec" - }, - :records=>v[0] - } - end +year_facets.keys.sort.each do |year| + next if year.to_i < 1600 or year.to_i > Time.new.year + century = ( year.to_i / 100 * 100 ).to_i + decade = ( year.to_i / 10 * 10 ).to_i + records = year_facets[ year ] + + unless @time_tree[ century ] + @time_tree[ century ] = {:name=>"#{century}'s",:records=>0,:children=>Hash.new} end + node = @time_tree[ century ] + node[ :records ] += records + + unless node[ :children ][ decade ] + node[ :children ][ decade ] = { + :name=>"#{decade}'s", + :link_options=>{:controller=>'search',:action=>'',:new_search=>1,:facet_tag=>'decade',:facet_browse => decade, :facet=> "year"}, + :records=>0, + :children=>Hash.new + } + end + node = node[ :children ][ decade ] + node[ :records ] += records + node[ :children ][ year ] = { + :name=>year, + :link_options=>{ + :controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'year', :facet_browse => year, :facet => "state"}, + :records=>records + } end +end +def place_tree +facet_counts,recs = SolrSearch.search('',['city_state_facet'],[]) +@place_tree = Hash.new +place_facets = facet_counts['facet_fields']['city_state_facet'] + +place_facets.keys.sort.each do |place| + match = /(.*), ([A-Z][A-Z])/.match( place ) + city = match[1] + state_code = match[2] + state = UsState.code_to_name( match[2] ) + next unless state + records = place_facets[ place ] + + unless @place_tree[ state ] + @place_tree[ state ] = { + :name=>state, + :link_options=>{ + :controller => 'search', :action=>'index',:new_search=>1, + :facet_tag => 'state', :facet_browse => state_code, :facet => "city_state" + }, + :records=>0, + :children=>Hash.new + } + end + @place_tree[ state ][ :records ] += records + @place_tree[ state ][ :children ][ city ] = { + :name=>city, + :link_options=>{ + :controller => 'search', :action=>'index',:new_search=>1, + :facet_tag => 'city_state', :facet_browse => place, :facet => "decade" + }, + :records=>records + } +end +end + +def subject_tree +@subject_tree = Hash.new +Collection.get_asho_subject_hash.each do |k,v| + @subject_tree[ k ] = { + :name=>k, + :link_options=>{ + :controller => 'search', :action=>'index',:new_search=>1, + :facet_tag => 'subject', :facet_browse => k, :facet => "set_spec" + }, + :records=>v[0] + } +end +end + +# build simple trees for various front page facets +# node is hash 'name' => [link_to_options,count,children] +def front_widget + +# if params[:data]=='times' + + +# elsif params[:data]=='places' + +# elsif params[:data]=='subjects' + +end + +end Modified: ruby/trunk/aquifer/app/controllers/search_controller.rb =================================================================== --- ruby/trunk/aquifer/app/controllers/search_controller.rb 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/controllers/search_controller.rb 2010-03-12 02:35:38 UTC (rev 651) @@ -1,6 +1,7 @@ class SearchController < ApplicationController - layout "search", :except => [:raw_mods_record,:timeline,:map_data,:add_tags] - + # layout "search", :except => [:raw_mods_record,:timeline,:map_data,:add_tags] + layout "default", :except => [:raw_mods_record,:timeline,:map_data,:add_tags,:search_collections] + require 'open-uri' require 'cgi' require 'csv' @@ -167,9 +168,11 @@ flash[:notice] = "No records found" end -# rescue -# logger.error( 'problem doing search #{$!}') -# flash[:notice] = "There was a problem with your search" + # search_collections + + # rescue + # logger.error( 'problem doing search #{$!}') + # flash[:notice] = "There was a problem with your search" end def log_search( term, hits ) @@ -200,8 +203,8 @@ @num_found = HeadingItem.count( count_conditions ) @items = Item.paginate( :joins => "left join heading_items hi on (items.id = hi.item_id) ", - :conditions => conditions, - :page => params[ :page ] ) + :conditions => conditions, + :page => params[ :page ] ) # next line fixes id, which were munged by join @items.each {|item| item.id = item.item_id } @@ -288,8 +291,8 @@ end def record_follow - item_id = params[ :id ] - ItemHistory.log( item_id, 'f' ) + @item_id = params[ :id ] + ItemHistory.log( @item_id, 'f' ) #puts "item #{item_id} followed to source" render( :layout => false ) @@ -322,9 +325,9 @@ @xsl_transform = XslTransform.find( @transform_id ) @xsl = @xsl_transform.xsl @transform_doc = REXML::Document.new( @xsl ) -# @xsl_transform_kind = @xsl_transform.kind -# @trans = open("http://localhost:8585/#{@xsl_transform.kind}?item_id=#{@item.id}&transform_id=#{params[:transform_id]}" ) -# @transform_output = @trans.read + # @xsl_transform_kind = @xsl_transform.kind + # @trans = open("http://localhost:8585/#{@xsl_transform.kind}?item_id=#{@item.id}&transform_id=#{params[:transform_id]}" ) + # @transform_output = @trans.read xslt.xsl = @xsl # xslt.xml = REXML::Document.new @transform_input @@ -375,7 +378,48 @@ local_item = items[0] redirect_to :action => 'full_record', :id => local_item.id end - + + + + def search_collections + if params[:q].blank? + @collections2 = Collection.paginate(:page=>params[:page],:per_page=>15,:order=>'title_sort',:conditions=>"oai_id!=''") + else + rlike = make_mysql_collection_qry(params[:q]) + @collections2 = Collection.paginate(:page=>params[:page],:per_page=>15,:order=>'title_sort',:conditions=>"oai_id!=''#{rlike}") + end + end + + + def split_for_query(q) + #take a query string and split it into its words and phrases, such as + # "this "is a" test becomes" ["this", "is a", "test"] + ret=[] + re = /([^"]*)("[^"]*")*/im + re2 = /\S+/im + + q.scan(re) do |words, literal| + unless words.blank? + words.scan(re2) do |word| + ret << word.gsub(/'/,"''") + end + end + + unless literal.blank? + ret << literal[1..-2].gsub(/'/,"''").gsub(/\s+/,'[[:space:]]+') + end + end + ret + end + + def make_mysql_collection_qry(q) + ret = "" + split_for_query(q).each do |trm| + ret = ret + " and replace(raw_xml,'Grainger Engineering Library Information Center, University of Illinois at Urbana-Champaign','') rlike '<m:[^<]+#{trm}[^<]+</m:'" + end + ret + end + def timeline @start_year = params[:year] || 1923 render :layout => "timeline" @@ -410,34 +454,34 @@ @items = @search.get_items :limit => 200, :no_facet => true @items.each do |item| -# ttitle = ( item.mods_fields[ 'title' ][0] if item.mods_fields[ 'title' ] ) || "" -# field = Field.new( 'title', ttitle ) -# item.timeline_title = render_to_string :partial => "brief_field", :locals => { :item => item, :field => field } + # ttitle = ( item.mods_fields[ 'title' ][0] if item.mods_fields[ 'title' ] ) || "" + # field = Field.new( 'title', ttitle ) + # item.timeline_title = render_to_string :partial => "brief_field", :locals => { :item => item, :field => field } item.timeline_description = render_to_string :partial => "record", :locals => { :item => item, :mode => 'index', :display_fields => SearchOptions.full_tags } #puts "render s=#{item.timeline_description}" #puts "item id = #{item.id}" end -# last_year = 0 -# last_month = 1 -# @items.each do |item| -# key_date = item.mods_fields[ 'key_date' ] -# if key_date -# key_date = DateTime.parse( key_date[0] ) -# if key_date.year = last_year -# date_count += 1 -# key_date.month = last_month -# if date_count > 8 -# last_month != 1 -# date_count = 0 -# else -# last_year = key_date.year -# last_month = 1 -# end -# end -# item.mods_fields[ 'key_date' ] = [key_date.to_s] -# puts "item id=#{item.id} kd=#{item.mods_fields[ 'key_date' ].inspect}" -# end -# end + # last_year = 0 + # last_month = 1 + # @items.each do |item| + # key_date = item.mods_fields[ 'key_date' ] + # if key_date + # key_date = DateTime.parse( key_date[0] ) + # if key_date.year = last_year + # date_count += 1 + # key_date.month = last_month + # if date_count > 8 + # last_month != 1 + # date_count = 0 + # else + # last_year = key_date.year + # last_month = 1 + # end + # end + # item.mods_fields[ 'key_date' ] = [key_date.to_s] + # puts "item id=#{item.id} kd=#{item.mods_fields[ 'key_date' ].inspect}" + # end + # end year_counts = HashCount.new @items.each do |item| @@ -456,8 +500,8 @@ puts "timeline count=#{@items.length}" render :partial => 'timeline_json' -# rescue -# logger.error( 'problem doing search #{$!}') -# flash[:notice] = "There was a problem with your search" + # rescue + # logger.error( 'problem doing search #{$!}') + # flash[:notice] = "There was a problem with your search" end end Modified: ruby/trunk/aquifer/app/helpers/application_helper.rb =================================================================== --- ruby/trunk/aquifer/app/helpers/application_helper.rb 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/helpers/application_helper.rb 2010-03-12 02:35:38 UTC (rev 651) @@ -76,5 +76,6 @@ color_txt = "color:#{@@cloud_colors[0]};" unless hide_colours #puts "cloud style=#{[ size_txt, color_txt ].join}" - return [ color_txt, size_txt ].join +# return [ color_txt, size_txt ].join +return size_txt end Modified: ruby/trunk/aquifer/app/models/collection.rb =================================================================== --- ruby/trunk/aquifer/app/models/collection.rb 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/models/collection.rb 2010-03-12 02:35:38 UTC (rev 651) @@ -45,6 +45,8 @@ @@titles[set_spec]=t.to_s break end + else + @@titles[set_spec]='[title unavailable]' end return @@titles[set_spec] Modified: ruby/trunk/aquifer/app/models/search.rb =================================================================== --- ruby/trunk/aquifer/app/models/search.rb 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/models/search.rb 2010-03-12 02:35:38 UTC (rev 651) @@ -188,7 +188,7 @@ end def to_html_with_query_words_highlighted( s ) - ERB::Util::h( s ).gsub( get_search_words_regex, '<font color="red">\1</font>' ) + ERB::Util::h( s ).gsub( get_search_words_regex, '<span class="highlighted">\1</span>' ) end def advanced_params_to_query( params ) Added: ruby/trunk/aquifer/app/views/collection/_collection_list.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/collection/_collection_list.rhtml (rev 0) +++ ruby/trunk/aquifer/app/views/collection/_collection_list.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -0,0 +1,33 @@ +<% if collections %> + <% collections.each do |collection| %> + <% if collection %> + + <div class="collection"> + + <div class="thumbnailarea"> + <ul class="actions"> + <li><%= link_to('Go to Collection',collection.primary_display_location, :class => 'external') %></li> + + <li><%= link_to('Browse Records',{:controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'set_spec', :facet_browse => collection.set_spec}) %> (<%= commify(collection.count_set_spec) %>)</li> + <li><%= link_to('View Details',{:controller => 'collection', :action=>'show',:id=>collection.id}) %></li> + <%#*<li><%= link_to('View Headings',{:controller=>'heading',:action=>'list',:id=>SetSpec.set_spec_to_id(collection.set_spec)}) % ></li>%> + </ul> + <% if collection.get_image_url != "" %> + <%= link_to(image_tag(collection.get_image_url),collection.primary_display_location, :class=>'thumbnail') %> + <% else %> + <%= link_to(image_tag('image_unavailable.png'),collection.primary_display_location, :class => "thumbnail") %> + <% end %> + + </div> + <div class="collectioninfo"> + <% collection.mods.titleInfo({'@type'=>nil}).each do |t|%> + <b><%=truncate(t.to_s, 30)%></b><br/> + <% end %> + <% (collection.mods.originInfo.select {|orig| orig.publisher?}).each do |orig| %> + <%=truncate(orig.publisher[0].to_s.gsub(/\[\]/,''), 35)%> + <% end %> + </div> + </div> + <% end %> + <% end %> + <% end %> Property changes on: ruby/trunk/aquifer/app/views/collection/_collection_list.rhtml ___________________________________________________________________ Added: svn:executable + * Modified: ruby/trunk/aquifer/app/views/collection/_mods_element.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/collection/_mods_element.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/collection/_mods_element.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,12 +1,25 @@ - <% new_head=true %> - <% mods_element.each do |elem| %> - <tr> - <% if new_head %> - <th align='left' valign='top'><%=pre_label%><%=label.blank? ? h(elem.labelize) : label %><%=post_label%></th> - <% else %> - <td></td> - <% end %> - <td><%= auto_link(elem.to_s) %></td> - </tr> - <% new_head=false %> - <% end %> +<% first_item=true %> +<% label_str = '' %> +<% field_str = '' %> +<% mods_element.each do |elem| %> + <% if first_item %> + <% label_str = label.blank? ? h(elem.labelize) : label %> + <% else %> + <% field_str += '<br />' %> + <%end%> + <% field_str += auto_link(elem.to_s) %> + <% first_item=false %> +<% end %> + +<% if label_str != '' %> + <tr> + <td class="label"> + <%=pre_label%> + <%=label_str %> + <%=post_label%> + </td> + <td class="field"> + <%= field_str %> + </td> + </tr> +<% end %> \ No newline at end of file Modified: ruby/trunk/aquifer/app/views/collection/list.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/collection/list.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/collection/list.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,43 +1,17 @@ -<table width="100%" style="font:150% sans-serif; color: #226;"> - <tr> - <td align="left"> - Collection Pages: <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %> - </td> - <td align="center"> - <% form_tag do %> - <label title='Searches complete collection description; use quotes for exact phrase' for='q'>Search collections:</label> <%= text_field_tag :q, params[:q] %> <%= submit_tag 'GO' %> - <% end %> - </td> - <td align="right"> - <%= link_to('List View',{:action=>'shortlist',:page=>@collections2.current_page,:q=>params[:q]}) %> - </td> - </tr> -</table> - -<div style="clear:both;"></div> -<table frame='border' cellpadding='10'> -<% @collections2.in_groups_of(4) do |slice| %> - <tr> - <% slice.each do |collection| %> - <% if collection %> - <td align='center' valign='top'> - <%= link_to(image_tag(collection.get_image_url,:border=>'0'),collection.primary_display_location) %><br/> - <% collection.mods.titleInfo({'@type'=>nil}).each do |t|%> - <b><%=t%></b><br/> - <% end %> - <% (collection.mods.originInfo.select {|orig| orig.publisher?}).each do |orig| %> - <%=orig.publisher[0].to_s.gsub(/\[\]/,'')%><br/> - <% end %> - <br/> - - <%= link_to('Go to Collection',collection.primary_display_location) %> <%=image_tag("externallinks.gif")%>   - <%= link_to('Browse Records',{:controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'set_spec_facet', :facet_browse => collection.set_spec}) %> (<%= commify(collection.count_set_spec) %>)   - <%= link_to('View Details',{:action=>'show',:id=>collection.id}) %>   - <%= link_to('View Headings',{:controller=>'heading',:action=>'list',:id=>SetSpec.set_spec_to_id(collection.set_spec)}) %> - </td> - <% end %> - <% end %> - </tr> -<% end %> -</table> -<h1 class="top_border">Collection Pages: <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %></h1> \ No newline at end of file +<div class="pagemenu top clearfix"> + <div class="menuwrapper"> + <div class="menutext">Collections Pages:</div> + <div class="pagination"> <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %></div> + <div class="menubuttons"> + <%= link_to('List View',{:action=>'shortlist',:page=>@collections2.current_page,:q=>params[:q]}) %> + </div> + </div> +</div> +<div id="main_content"> + <div id="collectionlist" class="clearfix"> + <%= render :partial=>'collection_list', :locals => {:collections => @collections2}%> + </div> +</div> +<div class="pagemenu bottom clearfix"> + <div class="pagination bottom"> <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %></div> +</div> \ No newline at end of file Modified: ruby/trunk/aquifer/app/views/collection/shortlist.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/collection/shortlist.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/collection/shortlist.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,43 +1,41 @@ -<table width="100%" style="font:150% sans-serif; color: #226;"> - <tr> - <td align="left"> - Collection Pages: <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %> - </td> - <td align="center"> - <% form_tag do %> - <label title='Searches complete collection description; use quotes for exact phrase' for='q'>Search collections:</label> <%= text_field_tag :q, params[:q] %> <%= submit_tag 'GO' %> - <% end %> - </td> - <td align="right"> +<div class="pagemenu top clearfix"> + <div class="menuwrapper"> + <div class="menutext">Collections Pages:</div> + <div class="pagination"> <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %></div> + <div class="menubuttons"> <%= link_to('Grid View',{:action=>'list',:page=>@collections2.current_page,:q=>params[:q]}) %> - </td> - </tr> -</table> - -<div style="clear:both;"></div> -<table frame='border' rules='rows'> + </div> + </div> +</div> + + +<div class="clearfix"> <% cnt =0 %> <% @collections2.each do |collection| %> <% if collection %> <% cnt = cnt + 1%> - <% bkgnd = cnt % 2 == 0 ? "background-color:beige" : "" %> - <tr style="border-bottom:1px solid black;height:144px;<%=bkgnd%>"> - <td align="right" valign="top"><%= link_to(image_tag(collection.get_image_url,:border=>'0',:width=>'144'),collection.primary_display_location) %></td> - <td style="padding-left:2em" valign="top"> - <% collection.mods.titleInfo({'@type'=>nil}).each do |t|%> - <h2><%=t%></h2> + <% odd = cnt % 2 == 1 ? "odd" : "" %> + <div class="listitem clearfix <%=odd%>"> + <div style="float:left"> +<%= link_to(image_tag(collection.get_image_url,:border=>'0',:width=>'144'),collection.primary_display_location) %> + </div> + <div style="float:left; max-width: 70%; margin: 0 18px"> + <% collection.mods.titleInfo({'@type'=>nil}).each do |t|%> + <h3><%=t%></h3> <% end %> <% (collection.mods.originInfo.select {|orig| orig.publisher?}).each do |orig| %> <%=orig.publisher[0].to_s.gsub(/\[\]/,'')%><br/> <% end %> <p><%=collection.mods.abstract[0].to_s%></p> - <%= link_to('Go to Collection',collection.primary_display_location) %> <%=image_tag("externallinks.gif")%>   - <%= link_to('Browse Records',{:controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'set_spec_facet', :facet_browse => collection.set_spec}) %> (<%= commify(collection.count_set_spec) %>)   + <%= link_to('Go to Collection',collection.primary_display_location, :class=>'external') %>   + <%= link_to('Browse Records',{:controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'set_spec', :facet_browse => collection.set_spec}) %> (<%= commify(collection.count_set_spec) %>)   <%= link_to('View Details',{:action=>'show',:id=>collection.id}) %>   - <%= link_to('View Headings',{:controller=>'heading',:action=>'list',:id=>SetSpec.set_spec_to_id(collection.set_spec)}) %> - </td> - </tr> + <%#= link_to('View Headings',{:controller=>'heading',:action=>'list',:id=>SetSpec.set_spec_to_id(collection.set_spec)}) %> + </div> + </div> <% end %> <% end %> -</table> -<h1 class="top_border">Collection Pages: <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %></h1> \ No newline at end of file +</div> +<div class="pagemenu bottom clearfix"> + <div class="pagination bottom"> <%= will_paginate(@collections2, :container=>false, :params=>{:q=>params[:q]}) %></div> +</div> \ No newline at end of file Modified: ruby/trunk/aquifer/app/views/collection/show.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/collection/show.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/collection/show.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,31 +1,54 @@ -<div style='float:right;text-align:center;'> - <%=link_to(image_tag(@collection.get_image_url,:border=>0),@collection.primary_display_location)%> - <br/> - <br/> - <%= link_to('Go to Collection',@collection.primary_display_location) %> <%=image_tag("externallinks.gif")%>    - <%= link_to('Browse Records',{:controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'set_spec_facet', :facet_browse => @collection.set_spec}) %> (<%= @collection.count_set_spec %>)    - <%= link_to('View Headings',{:controller=>'heading',:action=>'list',:id=>SetSpec.set_spec_to_id(@collection.set_spec)}) %> + +<div class="columnmask twocolumn"> + <div class="leftposition"> + <div class="main_wrapper"> + <div id="main_content"> + + + <table class="details"> + <%= render(:partial=>'mods_element',:object=>@collection.mods.titleInfo({'@type'=>nil}),:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.titleInfo({'@type'=>'alternative'}),:locals=>{:pre_label=>'Alternative ',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.name,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.typeOfResource,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.genre,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.originInfo,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.language,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.physicalDescription,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.abstract,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.tableOfContents,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.targetAudience,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.note,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.subject,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.classification,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.relatedItem,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.identifier,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.location,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.accessCondition,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.part,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.extension,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + <%= render(:partial=>'mods_element',:object=>@collection.mods.recordInfo,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> + </table> + </div> + + </div> + <div id="aux_content"> + <div style='text-align: center'> + <%=link_to(image_tag(@collection.get_image_url),@collection.primary_display_location)%> + <br/> + <br/> + <ul style> + <li> + <%= link_to('Go to Collection',@collection.primary_display_location,:class=>'external') %> + + </li> + <li> + <%= link_to('Browse Records',{:controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'set_spec', :facet_browse => @collection.set_spec}) %> (<%= @collection.count_set_spec %>)    + </li> + </ul> +<%#= link_to('View Headings',{:controller=>'heading',:action=>'list',:id=>SetSpec.set_spec_to_id(@collection.set_spec)}) %> + </div> + + </div> + + </div> </div> -<table> - <%= render(:partial=>'mods_element',:object=>@collection.mods.titleInfo({'@type'=>nil}),:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.titleInfo({'@type'=>'alternative'}),:locals=>{:pre_label=>'Alternative ',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.name,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.typeOfResource,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.genre,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.originInfo,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.language,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.physicalDescription,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.abstract,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.tableOfContents,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.targetAudience,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.note,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.subject,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.classification,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.relatedItem,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.identifier,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.location,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.accessCondition,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.part,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.extension,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> - <%= render(:partial=>'mods_element',:object=>@collection.mods.recordInfo,:locals=>{:pre_label=>'',:label=>nil,:post_label=>''})%> -</table> Modified: ruby/trunk/aquifer/app/views/home/_footer.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/home/_footer.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/home/_footer.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,13 +1,17 @@ <div id="footer"> - <img src="/images/AmericanSocialHistoryOnl-52.gif" width="81" height="25" alt=""> - - <a href="/home/conditions_of_use" class="submenu3">conditions of use</a> - | - <a href="/home/faq" class="submenu3">faq</a> - | - <a href="/home/contact_us" class="submenu3">contact us</a> - <br/> - The Aquifer American Social History Online Project gratefully acknowledges - The Andrew W. Mellon Foundation for its support. - copyright © <%= Time.now.year %> + <div id="footer_menu" class="contain"> + <ul> + <li><a href="/home/conditions_of_use" class="submenu3">conditions of use</a></li> + <li> - </li> + <li><a href="/home/faq" class="submenu3">faq</a></li> + <li> - </li> + <li><a href="/home/contact_us" class="submenu3">contact us</a></li> + </ul> + </div> + <p> + <a rel="license" href="http://creativecommons.org/licenses/by/3.0/us/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/us/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/StillImage" property="dc:title" rel="dc:type">american history online</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="dlfaquifer.org" property="cc:attributionName" rel="cc:attributionURL">american history website</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/us/">Creative Commons Attribution 3.0 United States License</a>. + </p> + <p> + American History Online gratefully acknowledges The Andrew W. Mellon Foundation for its support. + </p> </div> \ No newline at end of file Modified: ruby/trunk/aquifer/app/views/home/_front_widget.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/home/_front_widget.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/home/_front_widget.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,5 +1,4 @@ -<% cache do %> -<div id="accordion" class=""> + <h3><a href="#">Subjects</a></h3> <div class="tree_widget"> <%= render :partial => "tree_widget_node", :locals => { :div_base => "subject_tree", :tree_nodes => @subject_tree, :depth=>0 } %> @@ -16,11 +15,3 @@ <div class="tree_widget"> <%= render :partial => "tree_widget_node", :locals => { :div_base => "time_tree", :tree_nodes => @time_tree, :depth=>0 } %> </div> - -</div> - -<%#*<script type="text/javascript">%> -<%#*var acc1 = new Spry.Widget.Accordion("Acc1");%> -<%#*</script>%> - -<% end %> \ No newline at end of file Added: ruby/trunk/aquifer/app/views/home/_header.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/home/_header.rhtml (rev 0) +++ ruby/trunk/aquifer/app/views/home/_header.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -0,0 +1,47 @@ +<div id="header" class="clearfix"> + <div id="header_top_container"> + <div id="header_top" class="clearfix"> + + <div id="logo" class=""> + + <%= link_to( image_tag( "ah_logo.png", :size=> "403x95", :border => 0, :alt => "Home" ), { :controller => :home, :action => "index" } ) %> + </div> + + <div id="header_controls" class=""> + + + + <div id="submenu" class=""> + + + <%#= link_to( 'tools', { :controller => :home, :action => :tools }, { :class => 'submenu' } ) %> + <%= link_to( 'contact us', { :controller => :home, :action => :contact_us }, { :class => 'submenu' } ) %> + <%= link_to( 'help', { :controller => :home, :action => :help }, { :class => 'submenu' } ) %> + <%= link_to( 'faq', { :controller => :home, :action => :faq }, { :class => 'submenu' } ) %> + + </div> + </div> + <h2 id="slogan">find and use primary resources from historical digital collections</h2> + + </div> + </div> + <div id="menubar_container"> + <div id="menubar" class=""> + + <%= render :partial => "search/search_bar", :controller => :search, :new_search => 1, :locals => { :params => params } %> + + + <div id="menuitems"> + <%= link_to( 'home', { :controller => :home, :action => :index }, { :class => 'menubarlink first' } ) %> + <%= link_to( 'about', { :controller => :home, :action => :about }, { :class => 'menubarlink' } ) %> + <%= link_to( 'collections', { :controller => :collection }, { :class => 'menubarlink' } ) %> + <%#= link_to( 'browse', { :controller => :heading }, { :class => 'menubarlink last' } ) %> + + </div> + + </div> + + + </div> + <div id="header_bottom" class="clearfix"><div id="header_bottom_container" class="contain clearfix"></div></div> + </div> \ No newline at end of file Property changes on: ruby/trunk/aquifer/app/views/home/_header.rhtml ___________________________________________________________________ Added: svn:executable + * Modified: ruby/trunk/aquifer/app/views/home/_list.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/home/_list.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/home/_list.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -30,7 +30,7 @@ <% end %> <br/> - <%= link_to('Go to Collection',collection.primary_display_location) %> <%=image_tag("externallinks.gif")%>   + <%= link_to('Go to Collection',collection.primary_display_location) %> <%=image_tag("externallink.png")%>   <%= link_to('Browse Records',{:controller => 'search', :action=>'',:new_search=>1,:facet_tag => 'set_spec_facet', :facet_browse => collection.set_spec}) %> (<%= commify(collection.count_set_spec) %>)   <%= link_to('View Details',{:action=>'show',:id=>collection.id}) %>   <%= link_to('View Headings',{:controller=>'heading',:action=>'list',:id=>SetSpec.set_spec_to_id(collection.set_spec)}) %> Modified: ruby/trunk/aquifer/app/views/home/_tree_widget_node.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/home/_tree_widget_node.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/home/_tree_widget_node.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,39 +1,39 @@ <% node_num = 0 %> <% tree_nodes.keys.sort.each do |key| %> - <% tree_node = tree_nodes[ key ] %> - <% if tree_node[ :children ] %> - <% ul_class = "widget_tree_nodes" %> - <% li_class = "widget_tree_node" %> - <% else %> - <% ul_class = "widget_leaf_nodes" %> - <% li_class = "widget_leaf_node" %> - <% end %> - <% if depth == 0 %> - <% ul_class += " root" %> - <% end %> - <%= "<ul class ='#{ul_class}'>" %> + <% tree_node = tree_nodes[ key ] %> + <% if tree_node[ :children ] %> + <% ul_class = "widget_tree_nodes" %> + <% li_class = "widget_tree_node" %> + <% else %> + <% ul_class = "widget_leaf_nodes" %> + <% li_class = "widget_leaf_node" %> + <% end %> + <% if depth == 0 %> + <% ul_class += " root" %> + <% end %> + <%= "<ul class ='#{ul_class}'>" %> - <% child_div = "#{div_base}_#{node_num}" %> - <% node_num += 1 %> + <% child_div = "#{div_base}_#{node_num}" %> + <% node_num += 1 %> - <%= "<li class ='#{li_class}'>" %> + <%= "<li class ='#{li_class}'>" %> - - <% if tree_node[ :link_options ] %> - <%= link_to( tree_node[ :name ], tree_node[ :link_options ] ) %> - <% else %> - <%= tree_node[ :name ] %> - <% end %> - <%#= " (#{tree_node[ :records ]} records)" %> - <%= "<span>(#{tree_node[ :records ]})</span>" %> - </li> - - <% if tree_node[ :children ] %> - <%#= "<div id=\"#{child_div}\" style=\"display:none;\" >" %> - <li class="widget_children"> - <%= render :partial => "tree_widget_node", :locals => { :div_base => child_div, :tree_nodes => tree_node[ :children ], :depth => depth+1 } %> - </li> - <%#*</div>%> - <% end %> - </ul> + + <% if tree_node[ :link_options ] %> + <%= link_to( tree_node[ :name ], tree_node[ :link_options ] ) %> + <% else %> + <%= tree_node[ :name ] %> + <% end %> + <%#= " (#{tree_node[ :records ]} records)" %> + <%= "<span>(#{tree_node[ :records ]})</span>" %> + </li> + + <% if tree_node[ :children ] %> + <%#= "<div id=\"#{child_div}\" style=\"display:none;\" >" %> + <li class="widget_children"> + <%= render :partial => "tree_widget_node", :locals => { :div_base => child_div, :tree_nodes => tree_node[ :children ], :depth => depth+1 } %> + </li> + <%#*</div>%> + <% end %> + </ul> <% end %> \ No newline at end of file Modified: ruby/trunk/aquifer/app/views/home/about.rhtml =================================================================== --- ruby/trunk/aquifer/app/views/home/about.rhtml 2010-01-28 19:28:17 UTC (rev 650) +++ ruby/trunk/aquifer/app/views/home/about.rhtml 2010-03-12 02:35:38 UTC (rev 651) @@ -1,97 +1,27 @@ -<table width="100%"> - <tr> - <td colspan="3" align="center" valign="top"> - <%= image_tag( "about_banner.jpg", { :width => "100%", :height => "183px" } ) %> - </td> - </tr> - <tr> - <td colspan="3" align="center" valign="top"> </td> - </tr> - <tr> - <td colspan="3" align="center" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td>home > about american social history online </td> - </tr> - <tr> - <td> </td> - </tr> - <tr> - <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td width="44%"> - <%= image_tag( "about.gif", { :size => "370x18" } ) %> - </td> - <td width="56%" class="submenu"> - <a href="http://wiki.dlib.indiana.edu/confluence/display/DLFAquifer">wiki</a> - | - <a href="http://sourceforge.net/projects/dlf-aquifer/">source forge</a> - </td> - </tr> - </table></td> - </tr> - - <tr> - <td> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td width="12%"> - <div> - <div style="float:left;padding-right:20px;padding-bottom:20px;"> - <%= image_tag( "about_sample.jpg", { :size => "92x92", :align => "left" } ) %> - </div> - <div> -<div style="float:right;width:12%;border:1px solid black;margin:1em;padding:1em"> -<p><strong>Aquifer Blogs</strong><br><br> -<a href="http://dlfaquifer.blogspot.com/">Aquifer (Group)</a><br> -<a href="http://mblog.lib.umich.edu/~khage/">Kat Hagedorn</a><br> -<a href="http://harumsusan.blogspot.com/">Susan Harum</a><br> -<a href="http://bitbrick.blogspot.com/">Chick Markley</a><br> -</div> -<p><strong>Aquifer American Social History Online (AASHO)</strong>: <strong>One Place - Many Collections </strong></p> -<p>Aquifer American Social History Online, a project of the<a href="http://www.dliglib.org"> Digital Library Federation</a>, provides scholars with access to distributed <a href="/collection">digital library collections</a> pertaining to 19th and 20th century United States social history. AASHO is available through locally supported tools so that you can find, organize, use, and share items from diverse collections. To optimize your teaching, learning and research while using Aquifer American Social History Online, we recommend that you:</p> -<ul> - <li>Sign up for an <a href="http://www.openid.org/">OpenID</a> to use when you login to AASHO. <span id="ctl00_ContentPlaceHolder1_ucPreamble"> With OpenID, you create a single username and password</span> that you can use to <span id="ctl00_ContentPlaceHolder1_ucPreamble2">log into an increasing number of sites without registering each time. </span>You can use Aquifer American Social History Online without registering, but logging in with your OpenID allows you to save your search histories, set your profile preferences, access a record in its native format, and access metadata transformation tools.</li> - <li>Download and install the <a href="http://www.zotero.org">Zotero</a> extention. Zotero is a free, easy-to-use research tool that helps you gather and organize resources (bibliography or full text of articles), and then lets you annotate, organize and share the results of your research. Please note that Zotero works only in Firefox.</li> -</ul> -<p>We welcome new partners and new collections. To find out more about partnering and contributing, please <a href="/contact_us">contact us</a>.</p> -<p><strong>Aquifer American Social History Online Products for Digital Library Development:</strong></p> -<p><strong>Guidelines </strong></p> -<p>The <a href="http://wiki.dlib.indiana.edu/confluence/display/DLFAquifer/Collection+Submission" mce_href="http://wiki.dlib.indiana.edu/confluence/display/DLFAquifer/Collection+Submission" rel="nofollow" linktype="raw" linktext="Collection Submission|http://wiki.dlib.indiana.edu/confluence/display/DLFAquifer/Collection+Submission">Collection Submission</a> document details how to make your collection available for harvesting.</p> -<p><a href="http://wiki.dlib.indiana.edu/confluence/download/attachments/28330/DLFMODS_ImplementationGuidelines_Version1.pdf?version=1">Digital Library Federation / Aquifer Implementation Guidelines for Sharable Metadata</a> and <a href="http://wiki.dlib.indiana.edu/confluence/download/attachments/28330/MODSGuidelines_Letter.pdf?version=1">release notes</a>, describing how MODS should be used for sharing metadata for use in the Aquifer initiative</p> -<p><a href="http://wiki.dlib.indiana.edu/confluence/display/DLFAquiferMeta/Levels+of+Compliance" mce_href="http://wiki.dlib.indiana.edu/confluence/display/DLFAquiferMeta/Levels+of+Compliance" rel="nofollow" linktype="raw" linktext="MODS Guidelines Levels of Adoption|http://wiki.dlib.indiana.edu/confluence/display/DLFAquiferMeta/Levels+of+Compliance">MODS Guidelines Levels of Adoption</a> provides guidance on the use of MODS for metadata. This document describes five general categories of user functionality that are likely to be supported by following specific recommendations from the Guidelines. It documents what functionality is possible when certain elements of the Guidelines are followed.</p> -<p><a href="http://wiki.dlib.indiana.edu/confluence/display/DLFAquiferMeta/FAQ+for+MODS+Guidelines+Implementers" mce_href="http://wiki.dlib.indiana.edu/confluence/display/DLFAquiferMeta/FAQ+for+MODS+Guidelines+Implementers" rel="nofollow" linktype="raw" linktext="FAQ for MODS Gu... [truncated message content] |