-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8753061
commit 01ce08f
Showing
6 changed files
with
110 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
//= require leaflet | ||
//= require native.history | ||
//= require_tree ./templates | ||
|
||
!function(global) { | ||
'use strict'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
app/assets/javascripts/geoblacklight/templates/index_map_info.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<div class="index-map-info"> | ||
{{#if title}} | ||
<h3>{{title}}</h3> | ||
{{/if}} | ||
<div class=""> | ||
{{#if thumbnailUrl}} | ||
{{#if websiteUrl}} | ||
<a href="{{websiteUrl}}"> | ||
<img src="{{thumbnailUrl}}" class="img-responsive"> | ||
</a> | ||
{{else}} | ||
<img src="{{thumbnailUrl}}"> | ||
{{/if}} | ||
{{/if}} | ||
<dl> | ||
{{#if websiteUrl}} | ||
<dt>Website</dt> | ||
<dd><a href="{{websiteUrl}}">{{websiteUrl}}</a></dd> | ||
{{/if}} | ||
{{#if downloadUrl}} | ||
<dt>Download</dt> | ||
<dd><a href="{{downloadUrl}}">{{downloadUrl}}</a></dd> | ||
{{/if}} | ||
{{#if recordIdentifier}} | ||
<dt>Record Identifier</dt> | ||
<dd>{{recordIdentifier}}</dd> | ||
{{/if}} | ||
{{#if label}} | ||
<dt>Label</dt> | ||
<dd>{{label}}</dd> | ||
{{/if}} | ||
{{#if note}} | ||
<dt>Note</dt> | ||
<dd>{{note}}</dd> | ||
{{/if}} | ||
</dl> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'spec_helper' | ||
|
||
feature 'Index map' do | ||
scenario 'displays index map viewer', js: true do | ||
visit solr_document_path('stanford-fb897vt9938') | ||
# Wait until SVG elements are added | ||
expect(page).to have_css '.leaflet-overlay-pane svg' | ||
page.first('svg g path').click | ||
within '.index-map-info' do | ||
expect(page).to have_css 'h3', text: 'Dabao Kinbōzu -- ダバオ近傍圖' | ||
expect(page).to have_css 'a img[src="https://stacks.stanford.edu/image/iiif/zh828kt2136%2Fzh828kt2136_00_0001/full/!400,400/0/default.jpg"]' | ||
within 'dl' do | ||
expect(page).to have_css 'dt', text: 'Website' | ||
expect(page).to have_css 'dd a', text: 'http://purl.stanford.edu/zh828kt2136' | ||
expect(page).to have_css 'dt', text: 'Download' | ||
expect(page).to have_css 'dd a', text: 'https://embed.stanford.edu/iframe?url=https://purl.stanford.edu/zh828kt2136&hide_title=true#' | ||
expect(page).to have_css 'dt', text: 'Record Identifier' | ||
expect(page).to have_css 'dd', text: '10532136' | ||
expect(page).to have_css 'dt', text: 'Label' | ||
expect(page).to have_css 'dd', text: 'SHEET 8' | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters