sufia 3.7.2 → 4.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/Gemfile +3 -0
  4. data/README.md +88 -11
  5. data/SUFIA_VERSION +1 -1
  6. data/app/assets/images/old_main_tulips.jpg +0 -0
  7. data/app/assets/javascripts/contact_form.js +0 -16
  8. data/app/assets/javascripts/jquery.blacklightTagCloud.js +44 -0
  9. data/app/assets/javascripts/jquery.tagcloud.js +116 -0
  10. data/app/assets/javascripts/jquery.tinysort.min.js +7 -0
  11. data/app/assets/javascripts/sufia.js +41 -44
  12. data/app/assets/javascripts/sufia/edit_metadata.js +1 -1
  13. data/app/assets/javascripts/sufia/editor.js +12 -0
  14. data/app/assets/javascripts/sufia/featured_works.js +64 -0
  15. data/app/assets/javascripts/sufia/fileupload.js +1 -1
  16. data/app/assets/javascripts/sufia/multiForm.js +1 -1
  17. data/app/assets/javascripts/sufia/permissions.js +4 -8
  18. data/app/assets/javascripts/sufia/single_use_link.js +1 -2
  19. data/app/assets/javascripts/sufia/trophy.js +42 -27
  20. data/app/assets/javascripts/terms_of_service.js +1 -1
  21. data/app/assets/stylesheets/dashboard.css.scss +81 -40
  22. data/app/assets/stylesheets/featured.css.scss +16 -0
  23. data/app/assets/stylesheets/fileupload/{jquery.fileupload-ui.css → jquery.fileupload-ui.css.erb} +2 -2
  24. data/app/assets/stylesheets/{generic_files.css → generic_files.css.erb} +6 -7
  25. data/app/assets/stylesheets/header.css.scss +93 -0
  26. data/app/assets/stylesheets/home-page.css.scss +50 -0
  27. data/app/assets/stylesheets/nestable.css.scss +111 -0
  28. data/app/assets/stylesheets/styles.css.scss +106 -0
  29. data/app/assets/stylesheets/sufia.css.scss +13 -8
  30. data/app/assets/stylesheets/tagcloud.css +83 -0
  31. data/app/assets/stylesheets/usage-stats.css +30 -0
  32. data/app/controllers/batch_controller.rb +0 -1
  33. data/app/controllers/concerns/sufia/catalog.rb +64 -0
  34. data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +16 -13
  35. data/app/controllers/content_blocks_controller.rb +8 -0
  36. data/app/controllers/featured_work_lists_controller.rb +16 -0
  37. data/app/controllers/featured_works_controller.rb +26 -0
  38. data/app/controllers/mailbox_controller.rb +1 -1
  39. data/app/controllers/pages_controller.rb +7 -0
  40. data/app/controllers/single_use_links_viewer_controller.rb +2 -5
  41. data/app/controllers/tinymce_assets_controller.rb +12 -0
  42. data/app/helpers/content_block_helper.rb +21 -0
  43. data/app/helpers/generic_file_helper.rb +2 -2
  44. data/app/helpers/sufia_helper.rb +8 -4
  45. data/app/helpers/trophy_helper.rb +15 -7
  46. data/app/models/content_block.rb +2 -0
  47. data/app/models/featured_work_list.rb +42 -0
  48. data/app/models/tinymce_asset.rb +3 -0
  49. data/app/uploaders/tinymce_asset_uploader.rb +51 -0
  50. data/app/views/_add_assets_links.html.erb +0 -16
  51. data/app/views/_controls.html.erb +17 -0
  52. data/app/views/_flash_msg.html.erb +2 -18
  53. data/app/views/_footer.html.erb +10 -15
  54. data/app/views/_ga.html.erb +0 -16
  55. data/app/views/_logo.html.erb +2 -2
  56. data/app/views/_masthead.html.erb +9 -36
  57. data/app/views/_user_util_links.html.erb +16 -11
  58. data/app/views/advanced/_advanced_search_facets.html.erb +0 -16
  59. data/app/views/advanced/_advanced_search_fields.html.erb +0 -16
  60. data/app/views/advanced/_advanced_search_help.html.erb +0 -16
  61. data/app/views/advanced/_facet_layout.html.erb +0 -16
  62. data/app/views/advanced/_facet_limit.html.erb +0 -16
  63. data/app/views/advanced/index.html.erb +2 -18
  64. data/app/views/batch/_metadata.html.erb +3 -3
  65. data/app/views/batch/edit.html.erb +4 -21
  66. data/app/views/catalog/_facet_limit.html.erb +11 -12
  67. data/app/views/catalog/_featured_researcher.html.erb +2 -0
  68. data/app/views/catalog/_home.html.erb +6 -2
  69. data/app/views/catalog/_home_content.html.erb +36 -0
  70. data/app/views/catalog/_home_header.html.erb +15 -0
  71. data/app/views/catalog/_recent_document.html.erb +1 -1
  72. data/app/views/catalog/_recents.html.erb +3 -4
  73. data/app/views/catalog/_search_form.html.erb +13 -9
  74. data/app/views/catalog/_tagcloud.html.erb +7 -0
  75. data/app/views/catalog/index.html.erb +4 -10
  76. data/app/views/contact_form/create.html.erb +0 -16
  77. data/app/views/contact_form/new.html.erb +0 -16
  78. data/app/views/dashboard/_constraints.html.erb +3 -19
  79. data/app/views/dashboard/_did_you_mean.html.erb +0 -16
  80. data/app/views/dashboard/_document_list.html.erb +0 -16
  81. data/app/views/dashboard/_facet_layout.html.erb +1 -17
  82. data/app/views/dashboard/_facet_limit.html.erb +5 -5
  83. data/app/views/dashboard/_facet_selected.html.erb +1 -17
  84. data/app/views/dashboard/_facets.html.erb +0 -18
  85. data/app/views/dashboard/_heading.html.erb +1 -1
  86. data/app/views/dashboard/_index_partials/_default_group.html.erb +7 -23
  87. data/app/views/dashboard/_index_partials/_list_files.html.erb +62 -57
  88. data/app/views/dashboard/_search_form.html.erb +10 -7
  89. data/app/views/dashboard/_show_partials/_default.html.erb +0 -18
  90. data/app/views/dashboard/_show_partials/_default_details.html.erb +0 -16
  91. data/app/views/dashboard/_show_partials/_facets.html.erb +0 -16
  92. data/app/views/dashboard/_sort_and_per_page.html.erb +10 -9
  93. data/app/views/dashboard/facet.html.erb +4 -19
  94. data/app/views/dashboard/index.html.erb +27 -49
  95. data/app/views/error/401.html.erb +1 -17
  96. data/app/views/error/404.html.erb +0 -16
  97. data/app/views/error/500.html.erb +0 -16
  98. data/app/views/error/single_use_error.html.erb +1 -17
  99. data/app/views/generic_files/_asset_deleted_flash.html.erb +0 -16
  100. data/app/views/generic_files/_asset_permissions_denial_flash.html.erb +0 -16
  101. data/app/views/generic_files/_asset_saved_flash.html.erb +0 -16
  102. data/app/views/generic_files/_asset_updated_flash.html.erb +0 -16
  103. data/app/views/generic_files/_breadcrumbs.html.erb +0 -16
  104. data/app/views/generic_files/_browse_everything.html.erb +24 -0
  105. data/app/views/generic_files/_descriptions.html.erb +1 -1
  106. data/app/views/generic_files/_field_form.html.erb +5 -5
  107. data/app/views/generic_files/_media_display.html.erb +3 -3
  108. data/app/views/generic_files/_permission_form.html.erb +5 -5
  109. data/app/views/generic_files/_rights_modal.html.erb +13 -29
  110. data/app/views/generic_files/_show_actions.html.erb +13 -1
  111. data/app/views/generic_files/_versioning.html.erb +14 -10
  112. data/app/views/generic_files/citation.html.erb +0 -16
  113. data/app/views/generic_files/edit.html.erb +10 -12
  114. data/app/views/generic_files/edit_fields/_default.html.erb +1 -1
  115. data/app/views/generic_files/edit_fields/_description.html.erb +1 -1
  116. data/app/views/generic_files/edit_fields/_resource_type.html.erb +2 -3
  117. data/app/views/generic_files/edit_fields/_rights.html.erb +1 -1
  118. data/app/views/generic_files/new.html.erb +11 -26
  119. data/app/views/generic_files/show.html.erb +7 -25
  120. data/app/views/generic_files/stats.html.erb +141 -0
  121. data/app/views/homepage/_featured.html.erb +11 -0
  122. data/app/views/homepage/_featured_fields.html.erb +18 -0
  123. data/app/views/homepage/_featured_works.html.erb +17 -0
  124. data/app/views/homepage/_sortable_featured.html.erb +26 -0
  125. data/app/views/layouts/_head_tag_content.html.erb +1 -1
  126. data/app/views/layouts/_homepage_sidebar2.html.erb +14 -0
  127. data/app/views/layouts/error.html.erb +3 -21
  128. data/app/views/layouts/homepage.html.erb +8 -37
  129. data/app/views/layouts/sufia-dashboard.html.erb +46 -0
  130. data/app/views/layouts/sufia-one-column.html.erb +8 -24
  131. data/app/views/layouts/sufia-two-column.html.erb +9 -8
  132. data/app/views/pages/show.html.erb +4 -0
  133. data/app/views/single_use_links_viewer/show.html.erb +2 -2
  134. data/app/views/static/agreement.html.erb +0 -17
  135. data/app/views/static/help.html.erb +0 -17
  136. data/app/views/static/mendeley.html.erb +0 -16
  137. data/app/views/static/subject_libraries.html.erb +0 -17
  138. data/app/views/static/terms.html.erb +0 -16
  139. data/app/views/static/zotero.html.erb +0 -16
  140. data/app/views/users/_activity_log.html.erb +2 -2
  141. data/app/views/users/_contributions.html.erb +6 -2
  142. data/app/views/users/_follower_modal.html.erb +2 -2
  143. data/app/views/users/_following_modal.html.erb +2 -2
  144. data/app/views/users/_left_sidebar.html.erb +1 -1
  145. data/app/views/users/_notify_link.html.erb +1 -1
  146. data/app/views/users/_notify_number.html.erb +1 -1
  147. data/app/views/users/_profile_actions.html.erb +3 -3
  148. data/app/views/users/_profile_tabs.html.erb +1 -1
  149. data/app/views/users/_search_form.html.erb +3 -2
  150. data/app/views/users/_social_media_info.html.erb +3 -3
  151. data/app/views/users/_trophy_edit.html.erb +2 -2
  152. data/app/views/users/_user_info.html.erb +27 -27
  153. data/app/views/users/_vitals.html.erb +2 -2
  154. data/app/views/users/edit.html.erb +39 -39
  155. data/app/views/users/index.html.erb +3 -3
  156. data/app/views/users/show.html.erb +7 -9
  157. data/config/locales/sufia.en.yml +15 -7
  158. data/config/routes.rb +12 -9
  159. data/lib/generators/sufia/sufia_generator.rb +18 -15
  160. data/lib/generators/sufia/templates/catalog_controller.rb +11 -73
  161. data/lib/generators/sufia/templates/config/tinymce.yml +7 -0
  162. data/lib/sufia.rb +7 -0
  163. data/lib/sufia/downloads_controller_behavior.rb +3 -4
  164. data/lib/sufia/files_controller_behavior.rb +38 -27
  165. data/lib/sufia/version.rb +1 -1
  166. data/spec/controllers/batch_controller_spec.rb +1 -1
  167. data/spec/controllers/batch_edits_controller_spec.rb +5 -5
  168. data/spec/controllers/catalog_controller_spec.rb +37 -58
  169. data/spec/controllers/content_blocks_controller_spec.rb +37 -0
  170. data/spec/controllers/downloads_controller_spec.rb +3 -11
  171. data/spec/controllers/featured_work_lists_controller_spec.rb +20 -0
  172. data/spec/controllers/featured_works_controller_spec.rb +50 -0
  173. data/spec/controllers/generic_files_controller_spec.rb +74 -9
  174. data/spec/controllers/mailbox_controller_spec.rb +1 -1
  175. data/spec/controllers/pages_controller_spec.rb +25 -0
  176. data/spec/controllers/single_use_links_controller_spec.rb +1 -1
  177. data/spec/controllers/single_use_links_viewer_controller_spec.rb +1 -1
  178. data/spec/controllers/tinymce_assets_controller_spec.rb +39 -0
  179. data/spec/controllers/users_controller_spec.rb +3 -8
  180. data/spec/factories/content_blocks.rb +4 -0
  181. data/spec/factories/featured_works.rb +4 -0
  182. data/spec/factories/generic_files.rb +46 -39
  183. data/spec/factories/users.rb +18 -18
  184. data/spec/features/browse_dashboard_files_spec.rb +6 -7
  185. data/spec/features/browse_files_spec.rb +9 -6
  186. data/spec/features/cloud_upload_spec.rb +18 -0
  187. data/spec/features/single_use_links_spec.rb +2 -3
  188. data/spec/helpers/content_block_helper_spec.rb +31 -0
  189. data/spec/helpers/generic_file_helper_spec.rb +3 -3
  190. data/spec/helpers/sufia_helper_spec.rb +13 -81
  191. data/spec/helpers/trophy_helper_spec.rb +39 -0
  192. data/spec/jobs/import_url_job_spec.rb +1 -1
  193. data/spec/jobs/ingest_local_file_job_spec.rb +1 -1
  194. data/spec/lib/sufia/usage_statistics_spec.rb +75 -0
  195. data/spec/models/ability_spec.rb +31 -0
  196. data/spec/models/active_fedora_pid_based_job_spec.rb +1 -1
  197. data/spec/models/audit_job_spec.rb +1 -1
  198. data/spec/models/batch_spec.rb +1 -1
  199. data/spec/models/batch_update_job_spec.rb +1 -1
  200. data/spec/models/event_jobs_spec.rb +1 -1
  201. data/spec/models/featured_work_list_spec.rb +23 -0
  202. data/spec/models/featured_work_spec.rb +42 -0
  203. data/spec/models/fits_datastream_spec.rb +2 -2
  204. data/spec/models/generic_file/reload_on_save_spec.rb +1 -1
  205. data/spec/models/generic_file/web_form_spec.rb +4 -4
  206. data/spec/models/generic_file_spec.rb +41 -40
  207. data/spec/models/pageview.rb +19 -0
  208. data/spec/models/properties_datastream_spec.rb +2 -2
  209. data/spec/models/solr_document_spec.rb +9 -0
  210. data/spec/models/user_spec.rb +2 -2
  211. data/spec/routing/featured_works_route_spec.rb +16 -0
  212. data/spec/routing/route_spec.rb +10 -15
  213. data/spec/spec_helper.rb +3 -0
  214. data/spec/support/lib/generators/test_app_generator.rb +19 -8
  215. data/spec/views/dashboard/facet_limit.html.erb_spec.rb +2 -2
  216. data/spec/views/generic_file/show.html.erb_spec.rb +44 -0
  217. data/spec/views/generic_file/stats.html.erb_spec.rb +47 -0
  218. data/spec/views/users/_follower_modal.html.erb_spec.rb +18 -0
  219. data/spec/views/users/_following_modal.html.erb_spec.rb +18 -0
  220. data/spec/views/users/index.html.erb_spec.rb +1 -1
  221. data/sufia-models/app/models/batch.rb +1 -1
  222. data/sufia-models/app/models/concerns/sufia/properties_datastream_behavior.rb +30 -0
  223. data/sufia-models/app/models/concerns/sufia/user.rb +1 -1
  224. data/sufia-models/app/models/datastreams/batch_rdf_datastream.rb +4 -7
  225. data/sufia-models/app/models/datastreams/fits_datastream.rb +3 -0
  226. data/sufia-models/app/models/datastreams/generic_file_rdf_datastream.rb +53 -51
  227. data/sufia-models/app/models/datastreams/properties_datastream.rb +1 -15
  228. data/sufia-models/app/models/featured_work.rb +22 -0
  229. data/sufia-models/app/models/sufia/pageview.rb +9 -0
  230. data/sufia-models/{lib/sufia/models → app/services/sufia}/id_service.rb +0 -0
  231. data/sufia-models/{lib/sufia/models → app/services/sufia}/noid.rb +0 -0
  232. data/sufia-models/app/services/sufia/usage_statistics.rb +73 -0
  233. data/sufia-models/config/locales/sufia.en.yml +3 -4
  234. data/sufia-models/lib/generators/sufia/models/install_generator.rb +23 -8
  235. data/sufia-models/lib/generators/sufia/models/templates/config/analytics.yml +9 -0
  236. data/sufia-models/lib/generators/sufia/models/templates/config/mime_types.rb +6 -0
  237. data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +11 -2
  238. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_content_blocks.rb +10 -0
  239. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_featured_works.rb +12 -0
  240. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_tinymce_assets.rb +8 -0
  241. data/sufia-models/lib/generators/sufia/models/usagestats_generator.rb +19 -0
  242. data/sufia-models/lib/sufia/ability.rb +34 -0
  243. data/sufia-models/lib/sufia/models/engine.rb +5 -3
  244. data/sufia-models/lib/sufia/models/generic_file.rb +4 -2
  245. data/sufia-models/lib/sufia/models/generic_file/export.rb +3 -3
  246. data/sufia-models/lib/sufia/models/generic_file/featured.rb +14 -0
  247. data/sufia-models/lib/sufia/models/solr_document_behavior.rb +11 -4
  248. data/sufia-models/lib/sufia/models/version.rb +1 -1
  249. data/sufia-models/sufia-models.gemspec +6 -5
  250. data/sufia.gemspec +6 -4
  251. data/tasks/release.rake +1 -0
  252. data/tasks/sufia-dev.rake +5 -1
  253. data/vendor/assets/javascripts/flot/excanvas.js +1428 -0
  254. data/vendor/assets/javascripts/flot/jquery.flot.js +3137 -0
  255. data/vendor/assets/javascripts/flot/jquery.flot.selection.js +360 -0
  256. data/vendor/assets/javascripts/flot/jquery.flot.time.js +431 -0
  257. data/vendor/assets/javascripts/nestable.js +647 -0
  258. data/vendor/assets/javascripts/video.js +135 -126
  259. data/{app → vendor}/assets/stylesheets/video-js.css.erb +7 -6
  260. metadata +155 -33
  261. data/app/assets/stylesheets/application-bootstrap.css.erb +0 -295
  262. data/app/assets/stylesheets/audio-js.css +0 -3
  263. data/app/assets/stylesheets/blacklight_more_facets.css +0 -427
  264. data/app/assets/stylesheets/bootstrap.min.css.erb +0 -1433
  265. data/app/assets/stylesheets/contact_form.css +0 -4
  266. data/app/assets/stylesheets/reset_body.css +0 -4
  267. data/app/assets/stylesheets/trophy.css +0 -7
  268. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +0 -84
  269. data/app/helpers/facets_helper.rb +0 -3
  270. data/app/helpers/sufia/facets_helper_behavior.rb +0 -23
  271. data/app/views/catalog/_home_text.html.erb +0 -10
  272. data/app/views/generic_files/_dropbox_import.html.erb +0 -3
  273. data/app/views/generic_files/upload/_dropbox_chooser.html.erb +0 -39
  274. data/app/views/static/about.html.erb +0 -21
  275. data/spec/helpers/render_constraints_helper_behavior_spec.rb +0 -42
@@ -1,19 +1,3 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  <!DOCTYPE html>
18
2
  <html>
19
3
  <head>
@@ -24,7 +8,7 @@ limitations under the License.
24
8
  <div class="column second">
25
9
  <h1>Single Use Link Expired or Not Found</h1>
26
10
  <p>
27
- <%= t('sufia.product_name') %> could not locate the single use link.
11
+ <%= t('sufia.product_name') %> could not locate the single use link.
28
12
  This link either expired or had been used previously. We apologize
29
13
  for the inconvenience. You might be interested in using
30
14
  <a href="/help/">the help page</a> for looking up
@@ -1,17 +1 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  The file has been deleted.
@@ -1,19 +1,3 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  The file(s)
18
2
  <% generic_files.first(20).each do |gf|%>
19
3
  <%= link_to(gf, generic_file_url(gf.noid)) %><%= ',' unless gf == generic_files.last %>
@@ -1,19 +1,3 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  The file(s)
18
2
  <% generic_files.first(20).each do |gf|%>
19
3
  <%= link_to(gf, generic_file_url(gf.noid)) %><%= ',' unless gf == generic_files.last %>
@@ -1,17 +1 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  The file <%= link_to(generic_file, sufia.generic_file_url(generic_file.noid)) %> has been updated.
@@ -1,19 +1,3 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  <%# convert class variable to a local variable if the local hasn't been set %>
18
2
  <% generic_file = @generic_file unless generic_file %>
19
3
 
@@ -0,0 +1,24 @@
1
+ <%= render partial: 'generic_files/upload/agreement' %>
2
+ <%= render partial: 'generic_files/upload/alerts' %>
3
+ <div class="well">
4
+ <%= form_tag(sufia.generic_files_path, id: 'browse_everything_form', method: 'post') do %>
5
+ <%= render partial: 'generic_files/upload/tos_checkbox' %>
6
+ <%= hidden_field_tag(:batch_id, @batch_noid) %>
7
+ <%= button_tag(t('sufia.upload.browse_everything.browse_files_button'), type: 'button', class: 'btn btn-large btn-success', id: "browse-btn",
8
+ 'data-toggle' => 'browse-everything', 'data-route' => browse_everything_engine.root_path,
9
+ 'data-target' => '#browse_everything_form' ) %>
10
+ <%= button_tag("Submit selected files", type: 'submit', class: 'activate-submit btn btn-large btn-primary', id: "submit-btn") %>
11
+ <% end %>
12
+
13
+ <p id="status">0 items selected</p>
14
+ </div>
15
+ <script>
16
+ // Update the count in #status element when user selects files.
17
+ $(document).ready(function() {
18
+ $('#browse-btn').browseEverything()
19
+ .done(function(data) {
20
+ $('#status').html(data.length.toString() + " <%= t('sufia.upload.browse_everything.files_selected')%>")
21
+ $('#submit-btn').html("Submit "+data.length.toString() + " selected files")
22
+ })
23
+ });
24
+ </script>
@@ -4,7 +4,7 @@
4
4
  <div id="descriptions_display" class="tab-pane active">
5
5
  <%= form_for generic_file, :url => sufia.generic_file_path(@generic_file), :html => {:multipart => true, :class => 'form-horizontal'} do |f| %>
6
6
  <%= hidden_field_tag('redirect_tab', 'descriptions') %>
7
- <h2 class="non lower">Descriptions <small class="pull-right"><span class="error">*</span> indicates required fields</small> </h2>
7
+ <h1>Descriptions <span class="pull-right required-field">* indicates required fields</span></h1>
8
8
  <div class="well">
9
9
 
10
10
  <% (generic_file.terms_for_editing).each do |term| %>
@@ -1,11 +1,11 @@
1
1
  <% render_req ||= true # render_req is true for single file edit, false for batch edit%>
2
- <div class="control-group">
2
+ <div class="form-group">
3
3
  <% vals = generic_file[key] %>
4
4
  <% if render_req && required?(key) %>
5
- <% tmp = '<span class="error">*</span>' + get_label(key) %>
6
- <%= f.label key, tmp.html_safe, :class=>"control-label" %>
5
+ <% tmp = '<span class="required-field">*</span>' + get_label(key) %>
6
+ <%= f.label key, tmp.html_safe, :class=>"col-sm-3 control-label" %>
7
7
  <% else %>
8
- <%= f.label key, get_label(key), :class=>"control-label"%>
8
+ <%= f.label key, get_label(key), :class=>"col-sm-3 control-label"%>
9
9
  <% end %>
10
10
 
11
11
  <% if key == :resource_type %>
@@ -16,4 +16,4 @@
16
16
  <%= render_edit_field_partial(key, record: generic_file, f:f, v: v, index: index, render_req: render_req) %>
17
17
  <% end %>
18
18
  <% end %>
19
- </div><!-- /control-group -->
19
+ </div><!-- /.form-group -->
@@ -1,5 +1,5 @@
1
1
  <% if @generic_file.image? %>
2
- <%= link_to image_tag(sufia.download_path(@generic_file, datastream_id: 'thumbnail'),{width:"338", alt:"Download the full-sized image of #{@generic_file.title.first}"})+"Download the full-sized image", sufia.download_path(@generic_file), { target:"_new", title:"Download the full-sized image"}%>
2
+ <%= link_to image_tag(sufia.download_path(@generic_file, datastream_id: 'thumbnail'),{class:"img-responsive", alt:"Download the full-sized image of #{@generic_file.title.first}"})+"Download the full-sized image", sufia.download_path(@generic_file), { target:"_new", title:"Download the full-sized image"}%>
3
3
  <% elsif @generic_file.video? %>
4
4
  <video controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
5
5
  <source src="<%= sufia.download_path(@generic_file, datastream_id: 'webm') %>" type="video/webm" />
@@ -13,7 +13,7 @@
13
13
  Your browser does not support the audio tag.
14
14
  </audio>
15
15
  <% elsif @generic_file.pdf?%>
16
- <%= link_to image_tag(sufia.download_path(@generic_file, datastream_id: 'thumbnail'),{width:"338", alt:"Download the full-sized PDF of #{@generic_file.title.first}"})+"Download the full-sized PDF", sufia.download_path(@generic_file), { target:"_new", title:"Download the full-sized PDF"}%>
16
+ <%= link_to image_tag(sufia.download_path(@generic_file, datastream_id: 'thumbnail'),{class:"img-responsive", alt:"Download the full-sized PDF of #{@generic_file.title.first}"})+"Download the full-sized PDF", sufia.download_path(@generic_file), { target:"_new", title:"Download the full-sized PDF"}%>
17
17
  <% else %>
18
- <%= link_to image_tag("default.png", {alt:"No preview available", width:"338", height:"493"}), sufia.download_path(@generic_file), { target:"_new", title:"Download the document"} %>
18
+ <%= link_to image_tag("default.png", {alt:"No preview available", class:"img-responsive"}), sufia.download_path(@generic_file), { target:"_new", title:"Download the document"} %>
19
19
  <% end %>
@@ -13,7 +13,7 @@
13
13
  <div class="row">
14
14
  <p class="pull-right">
15
15
  <!-- Button to trigger modal -->
16
- <a href="#myModal" role="button" class="btn btn-warning" data-toggle="modal">What's this <i class="icon-question-sign icon-large"></i></a>
16
+ <a href="#myModal" role="button" class="btn btn-warning" data-toggle="modal">What's this <i class="glyphicon glyphicon-question-sign icon-large"></i></a>
17
17
  <!-- Modal -->
18
18
  <div class="modal hide" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
19
19
  <div class="modal-header">
@@ -32,7 +32,7 @@
32
32
  <p>
33
33
  Permissions in <%=t('sufia.product_name') %> are hierarchical. This means that you cannot set the visibility of a file to <span class="label label-success">Open Access</span> or
34
34
  <span class="label label-info"><%=t('sufia.institution_name') %></span> and simultaneously try to restrict the access of a single user. However, you may mark the visibility of
35
- a file as <span class="label label-important">Private</span> and then grant access to particular users and/or groups for that file in the &quot;Share With&quot;
35
+ a file as <span class="label label-danger">Private</span> and then grant access to particular users and/or groups for that file in the &quot;Share With&quot;
36
36
  section.
37
37
  </p>
38
38
 
@@ -56,9 +56,9 @@
56
56
  </div>
57
57
  </p>
58
58
  </div>
59
- <div class="control-group">
60
- <h3>Visibility - <small>who should have the ability to read and download</small></h3>
61
- <div class="controls">
59
+ <h3>Visibility - <small>who should have the ability to read and download</small></h3>
60
+ <div class="form-group">
61
+ <div class="controls">
62
62
  <label class="radio">
63
63
  <input type="radio" id="visibility_open" name="visibility" value="<%=Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC %>" <% if !public_perm.blank? %> checked="true"<% end %>/> <span class="label label-success">Open Access</span> Visible to the world.
64
64
  </label>
@@ -1,22 +1,6 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  <div class="modal-div">
18
2
  <!-- Button to trigger modal -->
19
- <a href="#rightsModal" role="button" class="btn btn-warning fright" data-toggle="modal">License Descriptions <i class="icon-question-sign icon-large"></i></a>
3
+ <a href="#rightsModal" role="button" class="btn btn-warning fright" data-toggle="modal">License Descriptions <i class="glyphicon glyphicon-question-sign icon-large"></i></a>
20
4
  <!-- Modal -->
21
5
  <div class="modal hide" id="rightsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
22
6
  <div class="modal-header">
@@ -25,25 +9,25 @@ limitations under the License.
25
9
  </div>
26
10
  <div class="modal-body" aria-hidden="true">
27
11
  <p>Creative Commons licenses can take the following combinations, which is what a depositor sees on the page where metadata (descriptions) are entered. Via the drop-down menu, the depositor may select any of the following licenses (these are all described at "About the Licenses" on the Creative Commons site):
28
- </p> <ul>
29
- <li><b>Attribution 3.0: CC BY</b><br/>
30
- With this license you allow others to "distribute, remix, tweak, and build" on your deposited content - including for commercial purposes - provided they attribute you as the original creator.</li>
12
+ </p> <ul>
13
+ <li><b>Attribution 3.0: CC BY</b><br/>
14
+ With this license you allow others to "distribute, remix, tweak, and build" on your deposited content - including for commercial purposes - provided they attribute you as the original creator.</li>
31
15
  <li><b>Attribution-Share-Alike 3.0: CC BY-SA</b> <br/>
32
- With this license you allow others to "remix, tweak, and build" on your deposited content, including for commercial uses, provided they attribute you as the original creator AND incorporate the same level of licensing (i.e., CC BY-SA) for the newly resulting creation. "All new works based on yours will carry the same license, so any derivatives will also allow commercial use."</li>
16
+ With this license you allow others to "remix, tweak, and build" on your deposited content, including for commercial uses, provided they attribute you as the original creator AND incorporate the same level of licensing (i.e., CC BY-SA) for the newly resulting creation. "All new works based on yours will carry the same license, so any derivatives will also allow commercial use."</li>
33
17
  <li><b>Attribution-NoDerivs 3.0: CC BY-ND </b><br/>
34
- With this license you permit "redistribution, commercial and non-commercial," provided the content remains unaltered and intact (i.e., whole) and provided you are attributed as the original creator.</li>
35
- <li><b>Attribution-Non-Commercial 3.0: CC BY-NC</b><br/>
36
- With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways. While they must credit you as the original creator and while the remixed, tweaked, or expanded upon content must remain non-commercial, they do not have to apply identical license terms on the new content.</li>
37
- <li><b>Attribution-NonCommercial-NoDerivs 3.0 CC BY-NC-ND</b><br/>
18
+ With this license you permit "redistribution, commercial and non-commercial," provided the content remains unaltered and intact (i.e., whole) and provided you are attributed as the original creator.</li>
19
+ <li><b>Attribution-Non-Commercial 3.0: CC BY-NC</b><br/>
20
+ With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways. While they must credit you as the original creator and while the remixed, tweaked, or expanded upon content must remain non-commercial, they do not have to apply identical license terms on the new content.</li>
21
+ <li><b>Attribution-NonCommercial-NoDerivs 3.0 CC BY-NC-ND</b><br/>
38
22
  With this license you share your work with others and allow them to download your work, provided they attribute you as the creator and refrain from changing the content in any way and from using it for commercial means. </li>
39
- <li><b>Attribution-Non-Commercial-Share-Alike 3.0: CC BY-NC-SA</b><br/>
40
- With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways, provided they give you credit (as the original creator) and also apply the same license level to the newly resulting creations.</li>
41
- <li><b>Attribution-Non-Commercial-Share-Alike-NoDerivs 3.0: CC BY-NC-SA-ND</b><br/>
23
+ <li><b>Attribution-Non-Commercial-Share-Alike 3.0: CC BY-NC-SA</b><br/>
24
+ With this license you allow others to "remix, tweak, and build" on your content in non-commercial ways, provided they give you credit (as the original creator) and also apply the same license level to the newly resulting creations.</li>
25
+ <li><b>Attribution-Non-Commercial-Share-Alike-NoDerivs 3.0: CC BY-NC-SA-ND</b><br/>
42
26
  With this license you share your work with others and allow them to download it, provided they attribute you as the creator; they must also refrain from changing the content in any way and from using it for commercial means. </li>
43
27
  <li><b>Public Domain Mark 1.0 </b><br/>
44
28
  When content is in the public domain, it has no known copyright owner. </li>
45
29
  <li><b>CC0 1.0 Universal </b><br/>
46
- With this license you are waiving your rights as copyright owner to the content you upload. This means your content may be distributed and reused without attribution, without restriction. CC0 is a license that one applies to one's own work; rarely does one apply it to another's work, unless one has the appropriate rights to do so.</li>
30
+ With this license you are waiving your rights as copyright owner to the content you upload. This means your content may be distributed and reused without attribution, without restriction. CC0 is a license that one applies to one's own work; rarely does one apply it to another's work, unless one has the appropriate rights to do so.</li>
47
31
  </ul>
48
32
  </p>
49
33
  <p> Please note: Another license option that is listed is <b>"All rights reserved."</b> With this license you - as the copyright holder - reserve all rights held under copyright law, such as for distribution and creation of derivative works. This means that no one can use your content in a work - such as a presentation or article - or create derivatives from it without your permission.</p>
@@ -1,11 +1,24 @@
1
1
  <h2 class="non lower">Actions</h2>
2
2
  <p>
3
3
  <%= link_to "Download", sufia.download_path(@generic_file.noid) %>
4
+ <% if Sufia.config.usage_statistics %>
5
+ &nbsp;|&nbsp;
6
+ <%= link_to "Statistics", sufia.stats_generic_file_path(@generic_file), id: 'stats' %>
7
+ <% end %>
4
8
  <% if can? :edit, @generic_file %>
5
9
  &nbsp;|&nbsp;
6
10
  <%= link_to "Edit", sufia.edit_generic_file_path(@generic_file) unless @generic_file.processing? %>
7
11
  <%= "File is being processed you may edit once it is complete" if @generic_file.processing? %>
8
12
  <%end %>
13
+ <% if can?(:create, FeaturedWork) %>
14
+ <% if FeaturedWork.can_create_another? && !@generic_file.featured?%>
15
+ &nbsp;|&nbsp;
16
+ <%= link_to "Feature", sufia.featured_work_path(@generic_file, format: :json), data: {behavior: 'feature'} %>
17
+ <% elsif @generic_file.featured? %>
18
+ &nbsp;|&nbsp;
19
+ Featured
20
+ <% end %>
21
+ <% end %>
9
22
  </p>
10
23
  <p>Export to:
11
24
  <%= link_to 'EndNote', sufia.generic_file_path(@generic_file.noid, :format => 'endnote') %>
@@ -27,4 +40,3 @@
27
40
 
28
41
  <!-- COinS hook for Zotero -->
29
42
  <span class="Z3988" title="<%= @generic_file.export_as_openurl_ctx_kev %>"></span>
30
-
@@ -1,21 +1,25 @@
1
1
  <div id="versioning_display" class="tab-pane">
2
- <h2 class="non lower">Versions</h2>
2
+ <h2>Versions</h2>
3
3
  <div class="well">
4
4
  <%= form_for @generic_file, :url => sufia.generic_file_path(@generic_file), :html => {:multipart => true, :class => 'form-horizontal'} do |f| %>
5
5
  <%= hidden_field_tag('redirect_tab', 'versions') %>
6
6
  <h3>Upload New Version</h3>
7
- <p>Upload a new version of this file from your computer.</p>
8
- <p id="upload_field">
9
- <%= file_field_tag "filedata" %>
10
- </p>
11
- <%= f.button '<i class="icon-upload-alt"></i> Upload New Version'.html_safe, :name => "update_versioning", :id => "upload_submit", :onclick => "confirmation_needed = false;", :class => "btn-primary btn-mini" %>
7
+ <div class="form-group">
8
+ <div class="col-xs-12">
9
+ <p>Upload a new version of this file from your computer.</p>
10
+ <p id="upload_field">
11
+ <%= file_field_tag "filedata" %>
12
+ </p>
13
+ <%= f.button '<i class="glyphicon glyphicon-upload"></i> Upload New Version'.html_safe, :name => "update_versioning", :id => "upload_submit", :onclick => "confirmation_needed = false;", :class => "btn-primary btn-mini" %>
14
+ </div>
15
+ </div>
12
16
  <hr />
13
17
  <h3>Restore Previous Version</h3>
14
18
  <% @generic_file.content.versions.each_with_index do |version, index| %>
15
- <div class="control-group">
16
- <div>
19
+ <div class="form-group">
20
+ <div class="col-xs-12">
17
21
  <label class="radio">
18
- <%= radio_button_tag(:revision, version.versionID, index == 0) %>
22
+ <%= radio_button_tag(:revision, version.versionID, index == 0) %>
19
23
  <%# label_tag("revision_#{version.versionID}".to_sym, "Restore from #{version.dsCreated.localtime.to_formatted_s(:long_ordinal)} [by #{@generic_file.content.version_committer(version)}]") %>
20
24
  Restore from <%= version.dsCreateDate.localtime.to_formatted_s(:long_ordinal) %> [by <%= @generic_file.content.version_committer(version) %>]
21
25
  </label>
@@ -23,7 +27,7 @@
23
27
  </div>
24
28
  <% end %>
25
29
  <div id="save_version_note" class="alert hide">You must click &quot;Save Revision&quot; to revert a previous version of this file</div>
26
- <%= f.button '<i class="icon-save"></i> Save Revision'.html_safe, :type => 'submit', :class => 'btn-primary btn-mini', :onclick => "confirmation_needed = false;", :name => "revert_submit", :id => "revert_submit" %>
30
+ <%= f.button '<i class="glyphicon glyphicon-save"></i> Save Revision'.html_safe, :type => 'submit', :class => 'btn-primary btn-mini', :onclick => "confirmation_needed = false;", :name => "revert_submit", :id => "revert_submit" %>
27
31
  <% end %>
28
32
  </div> <!-- /well -->
29
33
  </div> <!-- /row -->
@@ -1,19 +1,3 @@
1
- <%#
2
- Copyright © 2012 The Pennsylvania State University
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- %>
16
-
17
1
  <h4>Citation Formats</h4>
18
2
 
19
3
  <h4>MLA</h4>
@@ -25,26 +25,24 @@ $("a[rel=popover]").popover({ html: true });
25
25
 
26
26
  <% end %>
27
27
 
28
- <%= render :partial => 'breadcrumbs' %>
29
-
30
- <h1 class="lower">Edit <%= @generic_file %></h1>
28
+ <%= render :partial => 'breadcrumbs' %>
29
+ <h1 class="lower">Edit <%= @generic_file %></h1>
31
30
 
32
31
  <div class="row">
33
- <div class="span40">
32
+ <div class="col-xs-12 col-sm-4">
34
33
  <%= render :partial => 'media_display' %>
35
34
  </div>
36
- <div class="span2">&nbsp;</div>
37
- <div class="span68">
38
- <%= link_to "&lt;&lt;Browse view".html_safe, sufia.generic_file_path(@generic_file) %></li>
35
+ <div class="col-xs-12 col-sm-8">
36
+ <%= link_to "&lt;&lt;Browse view".html_safe, sufia.generic_file_path(@generic_file) %>
39
37
  <ul class="nav nav-tabs">
40
- <li id="edit_descriptions_link" class="active"><a href="#descriptions_display" data-toggle="tab"><i class="icon-tags"></i> Descriptions</a></li>
41
- <li id="edit_versioning_link"><a href="#versioning_display" data-toggle="tab"><i class="icon-sitemap"></i> Versions</a></li>
42
- <li id="edit_permissions_link"><a href="#permissions_display" data-toggle="tab"><i class="icon-key"></i> Permissions</a></li>
38
+ <li id="edit_descriptions_link" class="active"><a href="#descriptions_display" data-toggle="tab"><i class="glyphicon glyphicon-tags"></i> Descriptions</a></li>
39
+ <li id="edit_versioning_link"><a href="#versioning_display" data-toggle="tab"><i class="glyphicon glyphicon-sitemap"></i> Versions</a></li>
40
+ <li id="edit_permissions_link"><a href="#permissions_display" data-toggle="tab"><i class="glyphicon glyphicon-key"></i> Permissions</a></li>
43
41
  </ul>
44
42
  <div class="tab-content">
45
43
  <%= render :partial => "descriptions", :locals => { :generic_file => @generic_file } %>
46
- <%= render :partial => "permission", :locals => { :gf => @generic_file} %>
44
+ <%= render :partial => "permission", :locals => { :gf => @generic_file} %>
47
45
  <%= render :partial => "versioning", :locals => { :generic_file => @generic_file } %>
48
46
  </div>
49
- </div> <!-- /.span68-->
47
+ </div> <!-- /.col-sm-9 -->
50
48
  </div><!-- /.row -->
@@ -1,4 +1,4 @@
1
- <div class="controls" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
1
+ <div class="col-sm-9" <% if index == 0 %> id="additional_<%= key.to_s %>_clone" <% end %>>
2
2
  <% required = render_req && (index == 0) && required?(key) %>
3
3
  <%= f.text_field :title, :name=>"generic_file[#{key.to_s}][]", :id => "generic_file_"+key.to_s, :value=>v, :class => "input-large", :required => required %>
4
4
  <%= render :partial=>"generic_files/edit_fields/suffix", :locals=>{key: key, index: index} %>
@@ -1,4 +1,4 @@
1
- <div class="controls" <% if index == 0%> id="additional_<%= key.to_s %>_clone" <% end %>>
1
+ <div class="col-sm-9" <% if index == 0%> id="additional_<%= key.to_s %>_clone" <% end %>>
2
2
  <%= f.text_area :description, :name=>"generic_file[#{key.to_s}][]", :id => "generic_file_"+key.to_s, :value=>v, :class => "input-large" %>
3
3
  <%= render :partial=>"generic_files/edit_fields/suffix", :locals=>{key: key, index: index} %>
4
4
  </div><!-- /controls -->