From 6277542fcbb2a473399547f061f76606bb4634dc Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Wed, 16 Nov 2011 15:13:28 -0600 Subject: [PATCH] Bump to version 3.1.1 --- HISTORY.textile | 6 ++++++ app/helpers/hydra/blacklight_helper_behavior.rb | 4 +--- app/views/catalog/_document_list.html.erb | 4 ++-- lib/hydra-head/version.rb | 2 +- lib/hydra/submission_workflow.rb | 3 +-- test_support/features/mods_asset_edit.feature | 2 +- test_support/spec/helpers/blacklight_helper_spec.rb | 9 +++++++++ 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/HISTORY.textile b/HISTORY.textile index 9ddf213d3..7f7908c31 100644 --- a/HISTORY.textile +++ b/HISTORY.textile @@ -1,3 +1,9 @@ +h3. 3.1.1 +* Fixed bug where selected facet was not html_safe +* Fixed document_list, called when sorting by object_type_facet +* Don't issue two notice messags when saving document. + + h3. 3.1.0 * Updated to ActiveFedora 3.1.1 * Update rake tasks to leverage jettywrapper diff --git a/app/helpers/hydra/blacklight_helper_behavior.rb b/app/helpers/hydra/blacklight_helper_behavior.rb index e87cd3194..e7b466716 100644 --- a/app/helpers/hydra/blacklight_helper_behavior.rb +++ b/app/helpers/hydra/blacklight_helper_behavior.rb @@ -72,9 +72,7 @@ def render_document_partial(doc, action_name, locals={}) # Removing the [remove] link from the default selected facet display def render_selected_facet_value(facet_solr_field, item) - '' + - render_facet_value(facet_solr_field, item, :suppress_link => true) + - '' + content_tag(:span, render_facet_value(facet_solr_field, item, :suppress_link => true), :class => "selected") end diff --git a/app/views/catalog/_document_list.html.erb b/app/views/catalog/_document_list.html.erb index 14799af75..06edaffa1 100644 --- a/app/views/catalog/_document_list.html.erb +++ b/app/views/catalog/_document_list.html.erb @@ -2,10 +2,10 @@
<% facet_name = grouping_facet %> <%- if facet_name -%> - <%- @response.docs.group_by {|d| d.get(facet_name)}.each do |grouping| -%> + <%- @response.docs.group_by {|d| d[facet_name]}.each do |grouping| -%> <%= render :partial => 'catalog/_index_partials/default_group', :locals => {:docs => grouping[1], :facet_name => facet_name, :facet_value => grouping[0].to_s} %> <%- end -%> <%- else -%> <%= render :partial => 'catalog/_index_partials/default_group', :locals => {:docs => @response.docs, :facet_name => nil, :facet_value => nil} %> <%- end -%> -
\ No newline at end of file + diff --git a/lib/hydra-head/version.rb b/lib/hydra-head/version.rb index b973fbc13..0979d69bb 100644 --- a/lib/hydra-head/version.rb +++ b/lib/hydra-head/version.rb @@ -1,4 +1,4 @@ module HydraHead - VERSION = "3.1.0" + VERSION = "3.1.1" end diff --git a/lib/hydra/submission_workflow.rb b/lib/hydra/submission_workflow.rb index 15de5574e..6b089322f 100644 --- a/lib/hydra/submission_workflow.rb +++ b/lib/hydra/submission_workflow.rb @@ -48,7 +48,6 @@ def params_for_next_step_in_wokflow return_params[:new_asset] = true end if params[:wf_step] == last_step_in_workflow or params.has_key?(:finish) - flash[:notice] << "
Your object has been saved and you have been redirected to the display view." return_params[:viewing_context] = "browse" return_params[:action] = "show" return_params[:wf_step] = nil @@ -134,4 +133,4 @@ def workflow_config Hydra.config[:submission_workflow] end -end \ No newline at end of file +end diff --git a/test_support/features/mods_asset_edit.feature b/test_support/features/mods_asset_edit.feature index 17ed7fa39..a3b7a21da 100644 --- a/test_support/features/mods_asset_edit.feature +++ b/test_support/features/mods_asset_edit.feature @@ -50,7 +50,7 @@ Feature: Edit a ModsAsset object When I am on the edit additional_info page for hydrangea:fixture_mods_article1 When I press "Save and Finish" Then I should see "Switch to edit view" - And I should see "Your object has been saved" + And I should see "Your changes have been saved" Scenario: html5 valid Given I am logged in as "archivist1@example.com" diff --git a/test_support/spec/helpers/blacklight_helper_spec.rb b/test_support/spec/helpers/blacklight_helper_spec.rb index dc3a8bbdc..69bfcaa2b 100644 --- a/test_support/spec/helpers/blacklight_helper_spec.rb +++ b/test_support/spec/helpers/blacklight_helper_spec.rb @@ -18,6 +18,15 @@ helper.document_partial_name('has_model_s' => ["info:fedora/hull-cModel:genericContent"]).should == "generic_contents" end end + describe "render_selected_facet_value" do + it "should be html_safe and not have the remove link" do + item = stub("item", :value=>'two', :hits=>9) + + ret_val = helper.render_selected_facet_value("one", item) + ret_val.should == "two (9)" + ret_val.should be_html_safe + end + end describe "render_head_content" do before (:each) do helper.expects(:content_for).with(:head).returns("My added content")