umlaut 3.1.0.pre1 → 3.1.0.pre2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzY5Mzk3NDBhZjdkNGUxMDlkNWEyYmI2MzliNTU1OTM3NzUzM2RhNQ==
4
+ ZmJhZjg0NmE2MDAxZTZiODZkOWE3Yzg1YzczM2I2MDUxYzc0MzM5Nw==
5
5
  data.tar.gz: !binary |-
6
- YWQ1M2NjMDliOTQxODhjODg0YWY2MjY2MTg2ODkwYTNlNmIzOGMyMw==
6
+ OWU2MTA2NzMwMDE3NDFmZTBhZTZkMjk1NjhmYzczNmU3NmY0YThjYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZTcyNDJkOTA3NGMyOWQxMDQ2NjVmZjkyYzkzYTM2OGI5MDNlY2I3MDFmOWU3
10
- NGY2MzQ3YzdiNDI4NTUzZjg3ZTQyMzE0ZDAzNzEyZWVhODEwMjlhODFkNWFj
11
- MjFhMTkwMDdiNTdiYWE2ZmIwOGRmMTBkZTZkNDg4NzE4ZDEwMjA=
9
+ MjkxODY1ZGFjMjFkOTliN2RmYjU0OTUxN2MxOTQxYzY0OGExY2U5ODg3ZTc2
10
+ MDY2YmM5MmIxMDEyYTVjNjg5NDA4YjE4YmQ5NzI0ZDUzNDExYTkxMmMyNThh
11
+ ZTIzZmQ4YTgyMWIyYzcxYTM3ZDI3MDQxZGU5N2UwMjc2ODIyMDk=
12
12
  data.tar.gz: !binary |-
13
- YTVhNjI2MzI4Y2FkOWQzMmM0YjVjM2QyNGNlMDViOGExYWI3YTliYmUxNjZj
14
- NWEyMDhkODg2Mzc3ZjE1ZjNkYzQxZTIyZGIwMTQ4YWMxNWUwNjliZTlkZGYw
15
- MDUxYmU0OTZlZmY3YTcxNTZiMWQxY2Q4MDRkYWQ5Y2FlMmZlZjU=
13
+ ZTg3NzMxZDlhMWY1Mjc0MjIyOGY4OGZiMTNjNGViMzQzZTdjMmNiMDNhYzA4
14
+ ZWJkNzU5ZDEyYWQ4MjU4Mjk1MTY0YWJlMzhkMGExMDEyNWU5Y2I0MGU2NmQ3
15
+ YjdjNTVkOGM0YzlkMWUxNmRmMzc2ZWY0OWYyZDc4NzBjYzUyZDg=
@@ -52,9 +52,9 @@
52
52
  background-color: $backgroundColor;
53
53
  min-height: 20px;
54
54
 
55
- padding: 9px;
56
- margin-left: -9px; /* so left edge of text still lines up */
57
- margin-right: -9px;
55
+ padding: 12px;
56
+ margin-left: -12px; /* so left edge of text still lines up */
57
+ margin-right: -12px;
58
58
 
59
59
 
60
60
  border: 1px solid $borderColor;
@@ -75,6 +75,9 @@
75
75
  }
76
76
  .collection-str {
77
77
  font-weight: bold;
78
+ //leave room for book icon
79
+ padding-left: $umlautIndent;
80
+ text-indent: -$umlautIndent;
78
81
  }
79
82
  .umlaut-holding-notes {
80
83
  @extend .muted;
@@ -86,8 +89,10 @@
86
89
  min-height: 0;
87
90
  }
88
91
  .collection_str, .call-number, .holding-status, .holding-actions {
89
- min-height: 0;
90
92
  margin-left: 0;
93
+ @media (max-width: 767px) {
94
+ min-height: 0;
95
+ }
91
96
  }
92
97
  .call-number, .holding-status, .holding-actions {
93
98
  padding-left: $umlautIndent;
@@ -263,13 +268,11 @@
263
268
 
264
269
  .umlaut-available {
265
270
  color: $umlautAvailableColor;
266
- font-style: italic;
267
271
  font-size: $baseFontSize;
268
272
  }
269
273
 
270
274
  .umlaut-unavailable {
271
275
  color: $umlautUnavailableColor;
272
- font-style: italic;
273
276
  font-size: $baseFontSize;
274
277
  }
275
278
 
@@ -191,7 +191,7 @@ module ResolveHelper
191
191
  content_tag(:ul, :class=>options[:ul_class]) do
192
192
  safe_join(
193
193
  hidden_list.enum_for(:each_with_index).collect do |item, index|
194
- yield(item, index + options[:limit])
194
+ yield(item, index + options[:limit] - 1)
195
195
  end, " \n "
196
196
  )
197
197
  end
@@ -268,4 +268,4 @@ module ResolveHelper
268
268
  "#{start} – #{finish}:"
269
269
  end
270
270
  end
271
- end
271
+ end
@@ -413,6 +413,29 @@ class SectionRenderer
413
413
  @options[:section_prompt]
414
414
  end
415
415
 
416
+ # For a given resonse type section, returns a string that will change
417
+ # if the rendered HTML has changed, HTTP etag style.
418
+ #
419
+ # Output in API responses, used by partial html updater
420
+ # to know if a section needs to be updated on page.
421
+ #
422
+ # tag is created by appending:
423
+ # * the progress status for the section (in progress or not)
424
+ # * The current visibility status of the section
425
+ # * Number of responses in section
426
+ # * the timestamp of most recent response in section, if any.
427
+ def section_etag
428
+ parts = []
429
+
430
+ parts << self.services_in_progress?.to_s
431
+ parts << self.visible?.to_s
432
+ parts << responses_list.length
433
+ max = responses_list.max_by {|response| response.created_at}
434
+ parts << (max ? max.created_at.utc.strftime("%Y-%m-%d-%H:%M:%S") : "")
435
+
436
+ return parts.join("_")
437
+ end
438
+
416
439
 
417
440
  protected
418
441
 
@@ -1,6 +1,6 @@
1
1
  <div class="help-text-icon">?</div>
2
2
 
3
- <div class="section_heading"</div>
3
+ <div class="section_heading">
4
4
  <h3>
5
5
  Question? Problem? Contact:
6
6
  </h3>
@@ -8,17 +8,18 @@
8
8
  <div class="umlaut-holding">
9
9
  <div class="item_status_row">
10
10
  <div class="collection-and-number row-fluid">
11
- <div class="span6 collection-str"><%= target[:collection_str] %></div>
11
+ <div class="span7 collection-str"><i class="umlaut_icons-famfamfam-book"></i>
12
+ <%= target[:collection_str] %></div>
12
13
 
13
14
  <% # Set status class based on configured available statuses
14
15
  status_class = umlaut_config.holdings.available_statuses.include?(target[:status]) ? 'umlaut-available' : '' %>
15
- <div class="span6 holding-status <%= status_class %>"> <%= target[:status] %></div>
16
+ <div class="span5 holding-status <%= status_class %>"> <%= target[:status] %></div>
16
17
  </div>
17
18
 
18
19
  <div class="status-and-actions row-fluid">
19
- <div class="span6 call-number"><%= target[:call_number]%></div>
20
+ <div class="span7 call-number"><%= target[:call_number]%></div>
20
21
 
21
- <div class="holding-actions span6">
22
+ <div class="holding-actions span5">
22
23
  <%= link_to("More info", {:controller=>"link_router", :id=>p.id}, :target => "_blank", :class=>"more-info btn btn-mini") %>
23
24
  <% if target[:request_url] %>
24
25
  <%= link_to("Request", target[:request_url], :target => "_blank", :class=>"request btn btn-mini btn-primary") %>
@@ -16,6 +16,7 @@
16
16
  <% end %>
17
17
  </included_services>
18
18
  <service_load_complete value="<%= ! renderer.services_in_progress? %>" />
19
+ <etag><%= renderer.section_etag %></etag>
19
20
  <response_count value="<%= renderer.responses_list.length %>" />
20
21
  <html_content>
21
22
  <%= with_format("html") do
@@ -1,3 +1,3 @@
1
1
  module Umlaut
2
- VERSION = "3.1.0.pre1"
2
+ VERSION = "3.1.0.pre2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: umlaut
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.pre1
4
+ version: 3.1.0.pre2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind, et al
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-25 00:00:00.000000000 Z
11
+ date: 2013-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails