Skip to content

Commit

Permalink
Bump to version 3.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Nov 16, 2011
1 parent d35877c commit 6277542
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 9 deletions.
6 changes: 6 additions & 0 deletions HISTORY.textile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions app/helpers/hydra/blacklight_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
'<span class="selected">' +
render_facet_value(facet_solr_field, item, :suppress_link => true) +
'</span>'
content_tag(:span, render_facet_value(facet_solr_field, item, :suppress_link => true), :class => "selected")
end


Expand Down
4 changes: 2 additions & 2 deletions app/views/catalog/_document_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<div id="documents">
<% 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 -%>
</div>
</div>
2 changes: 1 addition & 1 deletion lib/hydra-head/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module HydraHead
VERSION = "3.1.0"
VERSION = "3.1.1"
end

3 changes: 1 addition & 2 deletions lib/hydra/submission_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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] << "<br/>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
Expand Down Expand Up @@ -134,4 +133,4 @@ def workflow_config
Hydra.config[:submission_workflow]
end

end
end
2 changes: 1 addition & 1 deletion test_support/features/mods_asset_edit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
Expand Down
9 changes: 9 additions & 0 deletions test_support/spec/helpers/blacklight_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "<span class=\"selected\">two (9)</span>"
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")
Expand Down

0 comments on commit 6277542

Please sign in to comment.