Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/team-umlaut/umlaut
Browse files Browse the repository at this point in the history
  • Loading branch information
jrochkind committed Jan 9, 2014
2 parents 56a9c07 + 121256c commit 205bfd8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 20 deletions.
1 change: 1 addition & 0 deletions app/controllers/umlaut_configurable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def self.ensure_order!(first, second)

add_resolve_sections! do
div_id "help"
section_title "Question? Problem? Contact:"
html_area :sidebar
bg_update false
partial "help"
Expand Down
33 changes: 13 additions & 20 deletions app/views/resolve/_help.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
<div class="help-text-icon">?</div>

<div class="section_heading">
<h3>
Question? Problem? Contact:
</h3>
</div>

<ul class="response_list umlaut-help-list">
<% help.each do |help|
value_hash = help.view_data %>
<li><%= link_to value_hash[:display_text], {:controller=>'link_router', :id=>help.id}, 'target'=>"_blank" %>
<% unless value_hash[:note].blank? %>
<br />
<%= value_hash[:note] %>
<% end %>
</li>
<% end %>
</ul>

<div class="help-text-icon">?</div>
<%= render :partial => 'section_heading', :locals => {:presenter => renderer, :force_render => true} %>
<ul class="response_list umlaut-help-list">
<% help.each do |help|
value_hash = help.view_data %>
<li><%= link_to value_hash[:display_text], {:controller=>'link_router', :id=>help.id}, 'target'=>"_blank" %>
<% unless value_hash[:note].blank? %>
<br />
<%= value_hash[:note] %>
<% end %>
</li>
<% end %>
</ul>
12 changes: 12 additions & 0 deletions test/fixtures/service_responses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,15 @@ service_response10:
:citation_issue:
:citation_spage:
:debug_info: ! ' Target: GALEGROUP_IT_NEWSSTAND ; SFX object ID: 2670000000017711'
service_response11:
service_id: SFX
display_text: Ask a Librarian
url: "http://library.edu/ask"
notes:
request: nytimes
service_type_value_name: help
service_data: |
---
:display_text: Ask a Librarian
:url: http://library.edu/ask
7 changes: 7 additions & 0 deletions test/functional/resolve_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ class ResolveControllerTest < ActionController::TestCase
assert_select section, ".response_list", 1
end
end
assert_select ".umlaut-sidebar .umlaut-section.help" do |sections|
assert_equal 1, sections.size
sections.each do |section|
assert_select section, ".section_heading h3", { :count => 1, :text => "Question? Problem? Contact:" }
assert_select section, ".response_list", 1
end
end
end

test_with_cassette("POSTed OpenURL redirects to GET", :resolve, :match_requests_on => [:method, :uri_without_ctx_tim]) do
Expand Down

0 comments on commit 205bfd8

Please sign in to comment.