sufia 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/Gemfile +1 -4
  2. data/README.md +1 -1
  3. data/app/assets/javascripts/sufia.js +5 -312
  4. data/app/assets/javascripts/sufia/permissions.js +216 -0
  5. data/app/assets/javascripts/sufia/tabs.js +58 -0
  6. data/app/assets/stylesheets/generic_files.css +4 -0
  7. data/app/assets/stylesheets/jquery-ui.css +474 -0
  8. data/app/assets/stylesheets/{sufia.css → sufia.css.scss} +4 -1
  9. data/app/controllers/directory_controller.rb +17 -11
  10. data/app/controllers/users_controller.rb +5 -3
  11. data/app/models/datastreams/file_content_datastream.rb +2 -53
  12. data/app/views/batch/_metadata.html.erb +0 -1
  13. data/app/views/batch_edits/_metadata.html.erb +0 -1
  14. data/app/views/batch_edits/edit.html.erb +0 -1
  15. data/app/views/dashboard/_facet_pagination.html.erb +20 -39
  16. data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +1 -1
  17. data/app/views/dashboard/facet.html.erb +29 -34
  18. data/app/views/generic_files/_descriptions.html.erb +0 -1
  19. data/app/views/generic_files/_groups_description.html.erb +5 -0
  20. data/app/views/generic_files/_multiple_upload.html.erb +135 -0
  21. data/app/views/generic_files/_permission.html.erb +2 -5
  22. data/app/views/generic_files/_versioning.html.erb +0 -1
  23. data/app/views/generic_files/edit.html.erb +0 -3
  24. data/app/views/generic_files/new.html.erb +2 -138
  25. data/app/views/layouts/hydra-head.html.erb +1 -0
  26. data/app/views/users/index.html.erb +6 -4
  27. data/config/locales/sufia.en.yml +2 -0
  28. data/lib/sufia.rb +1 -1
  29. data/lib/sufia/file_content.rb +8 -0
  30. data/lib/sufia/file_content/extract_metadata.rb +53 -0
  31. data/lib/sufia/file_content/versions.rb +23 -0
  32. data/lib/sufia/files_controller_behavior.rb +17 -33
  33. data/lib/sufia/generic_file.rb +0 -8
  34. data/lib/sufia/generic_file/characterization.rb +0 -1
  35. data/lib/sufia/generic_file/thumbnail.rb +2 -4
  36. data/lib/sufia/jobs/unzip_job.rb +0 -1
  37. data/lib/sufia/user.rb +0 -3
  38. data/lib/sufia/version.rb +1 -1
  39. data/spec/controllers/batch_controller_spec.rb +11 -12
  40. data/spec/controllers/catalog_controller_spec.rb +2 -3
  41. data/spec/controllers/generic_files_controller_spec.rb +14 -16
  42. data/spec/controllers/single_use_link_controller_spec.rb +0 -1
  43. data/spec/models/batch_update_job_spec.rb +2 -3
  44. data/spec/models/checksum_audit_log_spec.rb +1 -2
  45. data/spec/models/file_content_datastream_spec.rb +1 -6
  46. data/spec/models/generic_file_spec.rb +2 -9
  47. data/spec/models/single_use_link_spec.rb +0 -2
  48. data/spec/models/transcode_video_job_spec.rb +1 -1
  49. data/spec/support/Gemfile +3 -5
  50. data/sufia.gemspec +2 -2
  51. data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.effect-highlight.js +50 -0
  52. data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.effect.js +1276 -0
  53. data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.position.js +498 -0
  54. metadata +26 -21
  55. data/app/assets/stylesheets/font-awesome-ie7.css +0 -645
  56. data/app/assets/stylesheets/font-awesome.css +0 -303
  57. data/app/views/catalog/_facet_pagination.html.erb +0 -28
  58. data/app/views/catalog/facet.html.erb +0 -27
  59. data/public/robots.txt +0 -4
  60. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
@@ -1,303 +0,0 @@
1
- /* Font Awesome
2
- the iconic font designed for use with Twitter Bootstrap
3
- -------------------------------------------------------
4
- The full suite of pictographic icons, examples, and documentation
5
- can be found at: http://fortawesome.github.com/Font-Awesome/
6
-
7
- License
8
- -------------------------------------------------------
9
- The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0:
10
- http://creativecommons.org/licenses/by/3.0/ A mention of
11
- 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable
12
- source code is considered acceptable attribution (most common on the web).
13
- If human readable source code is not available to the end user, a mention in
14
- an 'About' or 'Credits' screen is considered acceptable (most common in desktop
15
- or mobile software).
16
-
17
- Contact
18
- -------------------------------------------------------
19
- Email: dave@davegandy.com
20
- Twitter: http://twitter.com/fortaweso_me
21
- Work: http://lemonwi.se co-founder
22
-
23
- */
24
- @font-face {
25
- font-family: "FontAwesome";
26
- src: url('fontawesome-webfont.eot');
27
- src: url('fontawesome-webfont.eot?#iefix') format('eot'), url('fontawesome-webfont.woff') format('woff'), url('fontawesome-webfont.ttf') format('truetype'), url('fontawesome-webfont.svg#FontAwesome') format('svg');
28
- font-weight: normal;
29
- font-style: normal;
30
- }
31
-
32
- /* Font Awesome styles
33
- ------------------------------------------------------- */
34
- [class^="icon-"]:before, [class*=" icon-"]:before {
35
- font-family: FontAwesome;
36
- font-weight: normal;
37
- font-style: normal;
38
- display: inline-block;
39
- text-decoration: inherit;
40
- }
41
- a [class^="icon-"], a [class*=" icon-"] {
42
- display: inline-block;
43
- text-decoration: inherit;
44
- }
45
- /* makes the font 33% larger relative to the icon container */
46
- .icon-large:before {
47
- vertical-align: top;
48
- font-size: 1.3333333333333333em;
49
- }
50
- .btn [class^="icon-"], .btn [class*=" icon-"] {
51
- /* keeps button heights with and without icons the same */
52
-
53
- line-height: .9em;
54
- }
55
- li [class^="icon-"], li [class*=" icon-"] {
56
- display: inline-block;
57
- width: 1.25em;
58
- text-align: center;
59
- }
60
- li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] {
61
- /* 1.5 increased font size for icon-large * 1.25 width */
62
-
63
- width: 1.875em;
64
- }
65
- li[class^="icon-"], li[class*=" icon-"] {
66
- margin-left: 0;
67
- list-style-type: none;
68
- }
69
- li[class^="icon-"]:before, li[class*=" icon-"]:before {
70
- text-indent: -2em;
71
- text-align: center;
72
- }
73
- li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before {
74
- text-indent: -1.3333333333333333em;
75
- }
76
- /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
77
- readers do not read off random characters that represent icons */
78
- .icon-glass:before { content: "\f000"; }
79
- .icon-music:before { content: "\f001"; }
80
- .icon-search:before { content: "\f002"; }
81
- .icon-envelope:before { content: "\f003"; }
82
- .icon-heart:before { content: "\f004"; }
83
- .icon-star:before { content: "\f005"; }
84
- .icon-star-empty:before { content: "\f006"; }
85
- .icon-user:before { content: "\f007"; }
86
- .icon-film:before { content: "\f008"; }
87
- .icon-th-large:before { content: "\f009"; }
88
- .icon-th:before { content: "\f00a"; }
89
- .icon-th-list:before { content: "\f00b"; }
90
- .icon-ok:before { content: "\f00c"; }
91
- .icon-remove:before { content: "\f00d"; }
92
- .icon-zoom-in:before { content: "\f00e"; }
93
-
94
- .icon-zoom-out:before { content: "\f010"; }
95
- .icon-off:before { content: "\f011"; }
96
- .icon-signal:before { content: "\f012"; }
97
- .icon-cog:before { content: "\f013"; }
98
- .icon-trash:before { content: "\f014"; }
99
- .icon-home:before { content: "\f015"; }
100
- .icon-file:before { content: "\f016"; }
101
- .icon-time:before { content: "\f017"; }
102
- .icon-road:before { content: "\f018"; }
103
- .icon-download-alt:before { content: "\f019"; }
104
- .icon-download:before { content: "\f01a"; }
105
- .icon-upload:before { content: "\f01b"; }
106
- .icon-inbox:before { content: "\f01c"; }
107
- .icon-play-circle:before { content: "\f01d"; }
108
- .icon-repeat:before { content: "\f01e"; }
109
-
110
- /* \f020 doesn't work in Safari. all shifted one down */
111
- .icon-refresh:before { content: "\f021"; }
112
- .icon-list-alt:before { content: "\f022"; }
113
- .icon-lock:before { content: "\f023"; }
114
- .icon-flag:before { content: "\f024"; }
115
- .icon-headphones:before { content: "\f025"; }
116
- .icon-volume-off:before { content: "\f026"; }
117
- .icon-volume-down:before { content: "\f027"; }
118
- .icon-volume-up:before { content: "\f028"; }
119
- .icon-qrcode:before { content: "\f029"; }
120
- .icon-barcode:before { content: "\f02a"; }
121
- .icon-tag:before { content: "\f02b"; }
122
- .icon-tags:before { content: "\f02c"; }
123
- .icon-book:before { content: "\f02d"; }
124
- .icon-bookmark:before { content: "\f02e"; }
125
- .icon-print:before { content: "\f02f"; }
126
-
127
- .icon-camera:before { content: "\f030"; }
128
- .icon-font:before { content: "\f031"; }
129
- .icon-bold:before { content: "\f032"; }
130
- .icon-italic:before { content: "\f033"; }
131
- .icon-text-height:before { content: "\f034"; }
132
- .icon-text-width:before { content: "\f035"; }
133
- .icon-align-left:before { content: "\f036"; }
134
- .icon-align-center:before { content: "\f037"; }
135
- .icon-align-right:before { content: "\f038"; }
136
- .icon-align-justify:before { content: "\f039"; }
137
- .icon-list:before { content: "\f03a"; }
138
- .icon-indent-left:before { content: "\f03b"; }
139
- .icon-indent-right:before { content: "\f03c"; }
140
- .icon-facetime-video:before { content: "\f03d"; }
141
- .icon-picture:before { content: "\f03e"; }
142
-
143
- .icon-pencil:before { content: "\f040"; }
144
- .icon-map-marker:before { content: "\f041"; }
145
- .icon-adjust:before { content: "\f042"; }
146
- .icon-tint:before { content: "\f043"; }
147
- .icon-edit:before { content: "\f044"; }
148
- .icon-share:before { content: "\f045"; }
149
- .icon-check:before { content: "\f046"; }
150
- .icon-move:before { content: "\f047"; }
151
- .icon-step-backward:before { content: "\f048"; }
152
- .icon-fast-backward:before { content: "\f049"; }
153
- .icon-backward:before { content: "\f04a"; }
154
- .icon-play:before { content: "\f04b"; }
155
- .icon-pause:before { content: "\f04c"; }
156
- .icon-stop:before { content: "\f04d"; }
157
- .icon-forward:before { content: "\f04e"; }
158
-
159
- .icon-fast-forward:before { content: "\f050"; }
160
- .icon-step-forward:before { content: "\f051"; }
161
- .icon-eject:before { content: "\f052"; }
162
- .icon-chevron-left:before { content: "\f053"; }
163
- .icon-chevron-right:before { content: "\f054"; }
164
- .icon-plus-sign:before { content: "\f055"; }
165
- .icon-minus-sign:before { content: "\f056"; }
166
- .icon-remove-sign:before { content: "\f057"; }
167
- .icon-ok-sign:before { content: "\f058"; }
168
- .icon-question-sign:before { content: "\f059"; }
169
- .icon-info-sign:before { content: "\f05a"; }
170
- .icon-screenshot:before { content: "\f05b"; }
171
- .icon-remove-circle:before { content: "\f05c"; }
172
- .icon-ok-circle:before { content: "\f05d"; }
173
- .icon-ban-circle:before { content: "\f05e"; }
174
-
175
- .icon-arrow-left:before { content: "\f060"; }
176
- .icon-arrow-right:before { content: "\f061"; }
177
- .icon-arrow-up:before { content: "\f062"; }
178
- .icon-arrow-down:before { content: "\f063"; }
179
- .icon-share-alt:before { content: "\f064"; }
180
- .icon-resize-full:before { content: "\f065"; }
181
- .icon-resize-small:before { content: "\f066"; }
182
- .icon-plus:before { content: "\f067"; }
183
- .icon-minus:before { content: "\f068"; }
184
- .icon-asterisk:before { content: "\f069"; }
185
- .icon-exclamation-sign:before { content: "\f06a"; }
186
- .icon-gift:before { content: "\f06b"; }
187
- .icon-leaf:before { content: "\f06c"; }
188
- .icon-fire:before { content: "\f06d"; }
189
- .icon-eye-open:before { content: "\f06e"; }
190
-
191
- .icon-eye-close:before { content: "\f070"; }
192
- .icon-warning-sign:before { content: "\f071"; }
193
- .icon-plane:before { content: "\f072"; }
194
- .icon-calendar:before { content: "\f073"; }
195
- .icon-random:before { content: "\f074"; }
196
- .icon-comment:before { content: "\f075"; }
197
- .icon-magnet:before { content: "\f076"; }
198
- .icon-chevron-up:before { content: "\f077"; }
199
- .icon-chevron-down:before { content: "\f078"; }
200
- .icon-retweet:before { content: "\f079"; }
201
- .icon-shopping-cart:before { content: "\f07a"; }
202
- .icon-folder-close:before { content: "\f07b"; }
203
- .icon-folder-open:before { content: "\f07c"; }
204
- .icon-resize-vertical:before { content: "\f07d"; }
205
- .icon-resize-horizontal:before { content: "\f07e"; }
206
-
207
- .icon-bar-chart:before { content: "\f080"; }
208
- .icon-twitter-sign:before { content: "\f081"; }
209
- .icon-facebook-sign:before { content: "\f082"; }
210
- .icon-camera-retro:before { content: "\f083"; }
211
- .icon-key:before { content: "\f084"; }
212
- .icon-cogs:before { content: "\f085"; }
213
- .icon-comments:before { content: "\f086"; }
214
- .icon-thumbs-up:before { content: "\f087"; }
215
- .icon-thumbs-down:before { content: "\f088"; }
216
- .icon-star-half:before { content: "\f089"; }
217
- .icon-heart-empty:before { content: "\f08a"; }
218
- .icon-signout:before { content: "\f08b"; }
219
- .icon-linkedin-sign:before { content: "\f08c"; }
220
- .icon-pushpin:before { content: "\f08d"; }
221
- .icon-external-link:before { content: "\f08e"; }
222
-
223
- .icon-signin:before { content: "\f090"; }
224
- .icon-trophy:before { content: "\f091"; }
225
- .icon-github-sign:before { content: "\f092"; }
226
- .icon-upload-alt:before { content: "\f093"; }
227
- .icon-lemon:before { content: "\f094"; }
228
- .icon-phone:before { content: "\f095"; }
229
- .icon-check-empty:before { content: "\f096"; }
230
- .icon-bookmark-empty:before { content: "\f097"; }
231
- .icon-phone-sign:before { content: "\f098"; }
232
- .icon-twitter:before { content: "\f099"; }
233
- .icon-facebook:before { content: "\f09a"; }
234
- .icon-github:before { content: "\f09b"; }
235
- .icon-unlock:before { content: "\f09c"; }
236
- .icon-credit-card:before { content: "\f09d"; }
237
- .icon-rss:before { content: "\f09e"; }
238
-
239
- .icon-hdd:before { content: "\f0a0"; }
240
- .icon-bullhorn:before { content: "\f0a1"; }
241
- .icon-bell:before { content: "\f0a2"; }
242
- .icon-certificate:before { content: "\f0a3"; }
243
- .icon-hand-right:before { content: "\f0a4"; }
244
- .icon-hand-left:before { content: "\f0a5"; }
245
- .icon-hand-up:before { content: "\f0a6"; }
246
- .icon-hand-down:before { content: "\f0a7"; }
247
- .icon-circle-arrow-left:before { content: "\f0a8"; }
248
- .icon-circle-arrow-right:before { content: "\f0a9"; }
249
- .icon-circle-arrow-up:before { content: "\f0aa"; }
250
- .icon-circle-arrow-down:before { content: "\f0ab"; }
251
- .icon-globe:before { content: "\f0ac"; }
252
- .icon-wrench:before { content: "\f0ad"; }
253
- .icon-tasks:before { content: "\f0ae"; }
254
-
255
- .icon-filter:before { content: "\f0b0"; }
256
- .icon-briefcase:before { content: "\f0b1"; }
257
- .icon-fullscreen:before { content: "\f0b2"; }
258
-
259
- .icon-group:before { content: "\f0c0"; }
260
- .icon-link:before { content: "\f0c1"; }
261
- .icon-cloud:before { content: "\f0c2"; }
262
- .icon-beaker:before { content: "\f0c3"; }
263
- .icon-cut:before { content: "\f0c4"; }
264
- .icon-copy:before { content: "\f0c5"; }
265
- .icon-paper-clip:before { content: "\f0c6"; }
266
- .icon-save:before { content: "\f0c7"; }
267
- .icon-sign-blank:before { content: "\f0c8"; }
268
- .icon-reorder:before { content: "\f0c9"; }
269
- .icon-list-ul:before { content: "\f0ca"; }
270
- .icon-list-ol:before { content: "\f0cb"; }
271
- .icon-strikethrough:before { content: "\f0cc"; }
272
- .icon-underline:before { content: "\f0cd"; }
273
- .icon-table:before { content: "\f0ce"; }
274
-
275
- .icon-magic:before { content: "\f0d0"; }
276
- .icon-truck:before { content: "\f0d1"; }
277
- .icon-pinterest:before { content: "\f0d2"; }
278
- .icon-pinterest-sign:before { content: "\f0d3"; }
279
- .icon-google-plus-sign:before { content: "\f0d4"; }
280
- .icon-google-plus:before { content: "\f0d5"; }
281
- .icon-money:before { content: "\f0d6"; }
282
- .icon-caret-down:before { content: "\f0d7"; }
283
- .icon-caret-up:before { content: "\f0d8"; }
284
- .icon-caret-left:before { content: "\f0d9"; }
285
- .icon-caret-right:before { content: "\f0da"; }
286
- .icon-columns:before { content: "\f0db"; }
287
- .icon-sort:before { content: "\f0dc"; }
288
- .icon-sort-down:before { content: "\f0dd"; }
289
- .icon-sort-up:before { content: "\f0de"; }
290
-
291
- .icon-envelope-alt:before { content: "\f0e0"; }
292
- .icon-linkedin:before { content: "\f0e1"; }
293
- .icon-undo:before { content: "\f0e2"; }
294
- .icon-legal:before { content: "\f0e3"; }
295
- .icon-dashboard:before { content: "\f0e4"; }
296
- .icon-comment-alt:before { content: "\f0e5"; }
297
- .icon-comments-alt:before { content: "\f0e6"; }
298
- .icon-bolt:before { content: "\f0e7"; }
299
- .icon-sitemap:before { content: "\f0e8"; }
300
- .icon-umbrella:before { content: "\f0e9"; }
301
- .icon-paste:before { content: "\f0ea"; }
302
-
303
- .icon-user-md:before { content: "\f200"; }
@@ -1,28 +0,0 @@
1
- <% if @pagination.has_previous? || @pagination.has_next? %>
2
- <div class="prev_next_links">
3
- <% if @pagination.has_previous? -%>
4
- <%= link_to('« Previous', catalog_facet_path( @pagination.params_for_previous_url( params) ) , :class=>:prev_page) %>
5
- <% else -%>
6
- <span class="disabled ui-state-active prev_page">« Previous</span>
7
- <% end -%>
8
-
9
- <% if @pagination.has_next? -%>
10
- <%= link_to('Next »', catalog_facet_path( @pagination.params_for_next_url(params)), :class => :next_page ) %>
11
- <% else -%>
12
- <span class="disabled ui-state-active next_page">Next »</span>
13
- <% end -%>
14
-
15
- </div>
16
- <% end %>
17
-
18
- <div class="sort_options">
19
- <% if @pagination.sort == 'index' -%>
20
- <span class="disabled az">A-Z Sort</span><%= link_to_unless(@pagination.sort == 'count', "Numerical Sort",
21
- @pagination.params_for_resort_url('count', params), :class => "sort_change numeric") %>
22
- <% elsif @pagination.sort == 'count' -%>
23
- <%= link_to("A-Z Sort", @pagination.params_for_resort_url('index', params),
24
- :class => "sort_change az") %><span class="disabled numeric">Numerical Sort</span>
25
- <% end -%>
26
- </div>
27
-
28
-
@@ -1,27 +0,0 @@
1
- <div class="facet_extended_list">
2
- <% sidebar_items << capture do %>
3
- <p><%= link_back_to_catalog %></p>
4
- <% end %>
5
-
6
- <div class="facet_pagination top">
7
- <%= render :partial=>'facet_pagination' %>
8
- </div>
9
-
10
- <h3><%= facet_field_labels[params[:id]] %></h3>
11
-
12
- <ul class="facet_extended_list">
13
- <% @pagination.items.each do |item| %>
14
- <li>
15
- <% if facet_in_params?( params[:id], item.value ) %>
16
- <%= render_selected_facet_value(params[:id], item) %>
17
- <% else %>
18
- <%= render_facet_value(params[:id], item) %>
19
- <% end -%>
20
- </li>
21
- <% end %>
22
- </ul>
23
-
24
- <div class="facet_pagination bottom">
25
- <%= render :partial=>'facet_pagination' %>
26
- </div>
27
- </div>
@@ -1,4 +0,0 @@
1
- Sitemap: http://scholarsphere.psu.edu/sitemap.xml
2
-
3
- User-agent: *
4
- Disallow: /nothing