sufia 0.0.1.pre1 → 0.0.1.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/.gitignore +1 -2
  2. data/Gemfile +2 -1
  3. data/README.md +19 -15
  4. data/Rakefile +2 -0
  5. data/app/controllers/batch_controller.rb +2 -3
  6. data/app/controllers/contact_form_controller.rb +1 -0
  7. data/app/controllers/dashboard_controller.rb +2 -2
  8. data/app/controllers/generic_files_controller.rb +24 -12
  9. data/app/controllers/mailbox_controller.rb +2 -2
  10. data/app/controllers/single_use_link_controller.rb +5 -5
  11. data/app/controllers/users_controller.rb +10 -10
  12. data/app/helpers/{application_helper.rb → sufia_helper.rb} +5 -13
  13. data/app/models/audit_job.rb +3 -4
  14. data/app/models/batch.rb +2 -0
  15. data/app/models/batch_update_job.rb +4 -6
  16. data/app/models/checksum_audit_log.rb +2 -0
  17. data/app/models/contact_form.rb +2 -0
  18. data/app/models/content_delete_event_job.rb +1 -1
  19. data/app/models/content_deposit_event_job.rb +2 -2
  20. data/app/models/content_new_version_event_job.rb +2 -2
  21. data/app/models/content_restored_version_event_job.rb +2 -2
  22. data/app/models/content_update_event_job.rb +2 -2
  23. data/app/models/datastreams/properties_datastream.rb +1 -1
  24. data/app/models/domain_term.rb +1 -0
  25. data/app/models/event_job.rb +1 -1
  26. data/app/models/generic_file.rb +5 -4
  27. data/app/models/local_authority.rb +1 -0
  28. data/app/models/local_authority_entry.rb +1 -0
  29. data/app/models/single_use_link.rb +2 -2
  30. data/app/models/user_edit_profile_event_job.rb +1 -1
  31. data/app/models/user_follow_event_job.rb +2 -2
  32. data/app/models/user_unfollow_event_job.rb +2 -2
  33. data/app/models/version_committer.rb +1 -0
  34. data/app/views/_footer.html.erb +21 -0
  35. data/app/views/_logo.html.erb +3 -0
  36. data/app/views/_masthead.html.erb +38 -0
  37. data/app/views/_user_util_links.html.erb +14 -43
  38. data/app/views/catalog/_document_list.html.erb +0 -7
  39. data/app/views/catalog/_home_text.html.erb +4 -4
  40. data/app/views/catalog/_recent_document.html.erb +5 -5
  41. data/app/views/contact_form/_directions.html.erb +4 -0
  42. data/app/views/contact_form/new.html.erb +2 -4
  43. data/app/views/dashboard/_document_list.html.erb +1 -8
  44. data/app/views/dashboard/_facets.html.erb +1 -1
  45. data/app/views/dashboard/_index_partials/_list_files.html.erb +1 -1
  46. data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +6 -6
  47. data/app/views/dashboard/_search_form.html.erb +1 -1
  48. data/app/views/dashboard/index.html.erb +26 -25
  49. data/app/views/generic_files/_media_display.html.erb +5 -5
  50. data/app/views/generic_files/_permission.html.erb +11 -11
  51. data/app/views/generic_files/edit.html.erb +10 -8
  52. data/app/views/generic_files/show.html.erb +16 -12
  53. data/app/views/layouts/error.html.erb +2 -53
  54. data/app/views/layouts/hydra-head.html.erb +2 -21
  55. data/app/views/mailbox/index.html.erb +1 -1
  56. data/app/views/static/about.html.erb +2 -65
  57. data/app/views/static/help.html.erb +1 -721
  58. data/app/views/users/_search_form.html.erb +1 -1
  59. data/app/views/users/edit.html.erb +6 -3
  60. data/config/locales/sufia.en.yml +6 -0
  61. data/config/routes.rb +1 -3
  62. data/features/browse_dashboard_files.feature +1 -1
  63. data/features/display_dashboard.feature +1 -1
  64. data/features/step_definitions/fixture_steps.rb +2 -2
  65. data/features/step_definitions/user_steps.rb +12 -8
  66. data/features/support/env.rb +9 -0
  67. data/features/support/paths.rb +21 -21
  68. data/lib/generators/sufia/sufia_generator.rb +46 -4
  69. data/lib/generators/sufia/templates/catalog_controller.rb +2 -2
  70. data/lib/generators/sufia/templates/config/redis_config.rb +20 -0
  71. data/lib/generators/sufia/templates/config/sufia.rb +29 -0
  72. data/lib/generators/sufia/templates/migrations/add_groups_to_users.rb +0 -4
  73. data/lib/sufia.rb +22 -15
  74. data/lib/sufia/active_fedora/redis.rb +49 -0
  75. data/lib/{generators/sufia/templates/config/active_record_base_redis.rb → sufia/active_record/redis.rb} +1 -16
  76. data/lib/sufia/controller.rb +1 -2
  77. data/lib/sufia/http_header_auth.rb +9 -0
  78. data/lib/sufia/role_mapper.rb +1 -0
  79. data/lib/sufia/user.rb +24 -6
  80. data/lib/sufia/version.rb +1 -1
  81. data/lib/tasks/fixtures.rake +245 -0
  82. data/spec/.gitignore +1 -0
  83. data/spec/active_fedora/unsaved_digital_object_spec.rb +2 -2
  84. data/spec/config/host_to_vhost_spec.rb +8 -8
  85. data/spec/controllers/batch_controller_spec.rb +6 -6
  86. data/spec/controllers/catalog_controller_spec.rb +2 -0
  87. data/spec/controllers/dashboard_controller_spec.rb +13 -10
  88. data/spec/controllers/downloads_controller_spec.rb +8 -8
  89. data/spec/controllers/generic_files_controller_spec.rb +46 -44
  90. data/spec/controllers/mailbox_controller_spec.rb +6 -12
  91. data/spec/controllers/sessions_controller_spec.rb +8 -6
  92. data/spec/controllers/single_use_link_controller_spec.rb +9 -14
  93. data/spec/controllers/users_controller_spec.rb +49 -49
  94. data/spec/{factories.rb → factories/users.rb} +6 -3
  95. data/spec/fixtures/scholarsphere/scholarsphere_test2.foxml.erb +2 -2
  96. data/spec/fixtures/scholarsphere/scholarsphere_test3.foxml.erb +2 -2
  97. data/spec/fixtures/scholarsphere/scholarsphere_test4.foxml.erb +2 -2
  98. data/spec/fixtures/scholarsphere/scholarsphere_test6.foxml.erb +2 -2
  99. data/spec/fixtures/scholarsphere/sufia_scholarsphere1.descMeta.txt +12 -0
  100. data/spec/fixtures/scholarsphere/sufia_scholarsphere1.foxml.erb +79 -0
  101. data/spec/fixtures/scholarsphere/sufia_scholarsphere1.txt +1 -0
  102. data/spec/fixtures/scholarsphere/{scholarsphere_test1.foxml.erb → sufia_test1.foxml.erb} +6 -6
  103. data/spec/fixtures/scholarsphere/{scholarsphere_test5.foxml.erb → sufia_test5.foxml.erb} +5 -5
  104. data/spec/fixtures/scholarsphere_generic_stub.foxml.erb +5 -5
  105. data/spec/lib/{scholarsphere → sufia}/id_service_spec.rb +5 -5
  106. data/spec/lib/{scholarsphere → sufia}/role_mapper_spec.rb +5 -2
  107. data/spec/models/audit_job_spec.rb +1 -1
  108. data/spec/models/batch_spec.rb +2 -2
  109. data/spec/models/batch_update_job_spec.rb +5 -5
  110. data/spec/models/checksum_audit_log_spec.rb +1 -1
  111. data/spec/models/event_jobs_spec.rb +19 -19
  112. data/spec/models/file_content_datastream_spec.rb +6 -6
  113. data/spec/models/fits_datastream_spec.rb +1 -1
  114. data/spec/models/generic_file_spec.rb +8 -9
  115. data/spec/models/local_authority_spec.rb +3 -3
  116. data/spec/models/single_use_link_spec.rb +5 -5
  117. data/spec/models/unzip_job_spec.rb +1 -1
  118. data/spec/models/user_spec.rb +5 -26
  119. data/spec/rake/scholarsphere_fixtures_spec.rb +13 -12
  120. data/spec/routing/route_spec.rb +4 -41
  121. data/spec/spec_helper.rb +14 -4
  122. data/spec/support/Gemfile +21 -0
  123. data/spec/support/config/redis.yml +6 -0
  124. data/spec/support/lib/generators/test_app_generator.rb +40 -0
  125. data/sufia.gemspec +4 -2
  126. data/tasks/cucumber.rake +0 -6
  127. data/tasks/jetty.rake +40 -0
  128. data/tasks/scholarsphere-dev.rake +57 -17
  129. data/tasks/scholarsphere-fixtures.rake +16 -63
  130. metadata +74 -55
  131. data/.rvmrc +0 -59
  132. data/LICENSE +0 -22
  133. data/app/assets/images/site_images/logo_psuss_logotype.png +0 -0
  134. data/app/assets/images/site_images/logo_psuss_shield.png +0 -0
  135. data/lib/generators/sufia/templates/config/active_fedora_base_redis.rb +0 -54
  136. data/lib/sufia/ldap.rb +0 -123
  137. data/spec/fixtures/hydra_test_default_partials.foxml.xml +0 -80
  138. data/spec/fixtures/hydra_test_generic_content.foxml.xml +0 -138
  139. data/spec/fixtures/hydra_test_generic_image.foxml.xml +0 -395
  140. data/spec/fixtures/hydra_test_no_model.foxml.xml +0 -79
  141. data/spec/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +0 -1212
  142. data/spec/fixtures/hydrangea_fixture_file_asset1.foxml.xml +0 -4946
  143. data/spec/fixtures/hydrangea_fixture_mods_article1.foxml.xml +0 -234
  144. data/spec/fixtures/hydrangea_fixture_mods_article2.foxml.xml +0 -177
  145. data/spec/fixtures/hydrangea_fixture_mods_article3.foxml.xml +0 -170
  146. data/spec/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +0 -187
  147. data/spec/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +0 -676
  148. data/spec/fixtures/hydrus_admin_class1.foxml.xml +0 -176
  149. data/spec/fixtures/libra-oa_1.foxml.xml +0 -2324
  150. data/spec/fixtures/libra-oa_2.foxml.xml +0 -2422
  151. data/spec/fixtures/libra-oa_7.foxml.xml +0 -1735
@@ -16,7 +16,7 @@ limitations under the License.
16
16
 
17
17
  <% # main container for facets/limits menu -%>
18
18
  <div>
19
- <%= link_to '<i class="icon-upload-alt"></i> Upload File(s)'.html_safe, new_generic_file_path, {:class => "btn btn-primary"} %><br />
19
+ <%= link_to '<i class="icon-upload-alt"></i> Upload File(s)'.html_safe, sufia.new_generic_file_path, {:class => "btn btn-primary"} %><br />
20
20
  <div class="row">&nbsp;</div>
21
21
  <h2>Browse By</h2>
22
22
  <ul class="nav nav-list" id="facets">
@@ -35,7 +35,7 @@ on element ids -->
35
35
  <td width="17%"><%= document.fetch(:generic_file__date_uploaded_dt,'').to_time.strftime("%m/%d/%Y") unless document.fetch(:generic_file__date_uploaded_dt,'').blank? %> </td>
36
36
  <td width="5%" align="center">
37
37
  <% if !document[:read_access_group_t].blank? and document[:read_access_group_t].include?('registered') %>
38
- <a href="<%= generic_file_path(noid) %>/edit/?tab=permissions" id="permission_<%= noid %>"><span class="label label-info" title="Penn State">Penn State</span></a>
38
+ <a href="<%= generic_file_path(noid) %>/edit/?tab=permissions" id="permission_<%= noid %>"><span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span></a>
39
39
  <% elsif !document[:read_access_group_t].blank? and document[:read_access_group_t].include?('public') %>
40
40
  <a href="<%= generic_file_path(noid) %>/edit/?tab=permissions" id="permission_<%= noid %>"><span class="label label-success" title="Open Access">Open Access</span></a>
41
41
  <% else %>
@@ -18,24 +18,24 @@ limitations under the License.
18
18
  <%- width = 36 if width.blank? -%>
19
19
  <% if (document['mime_type_t']) %>
20
20
  <% if !(document['mime_type_t'] & ['image/jpeg', 'image/png', 'image/bmp', 'image/gif', 'image/jpg']).empty? %>
21
- <%= link_to image_tag(download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width, :height=>height}), generic_file_path(document[:noid_s].first) %>
21
+ <%= link_to image_tag(download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width, :height=>height}), sufia.generic_file_path(document[:noid_s].first) %>
22
22
  <% elsif !(document['mime_type_t'] & ['application/pdf']).empty? %>
23
- <%= link_to image_tag(download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width,:height=>height}),generic_file_path(document[:noid_s].first) %>
23
+ <%= link_to image_tag(sufia.download_path(document["id"], {:datastream_id => 'thumbnail'}), {:width=>width,:height=>height}),sufia.generic_file_path(document[:noid_s].first) %>
24
24
  <% elsif !(document['mime_type_t'] & ['video/mp4']).empty? %>
25
25
  <video controls="controls" height="80" width="140"
26
26
  class="video-js vjs-default-skin" data-setup="{}"
27
27
  preload="auto">
28
- <source src="<%= download_path(document["id"]) %>"
28
+ <source src="<%= sufia.download_path(document["id"]) %>"
29
29
  type="<%= document['mime_type_t'].first %>" />
30
30
  Your browser does not support the video tag.
31
31
  </video>
32
32
  <% elsif !(document['mime_type_t'] & ['audio/mp3',
33
33
  'audio/mpeg']).empty? %>
34
- <audio src="<%= download_path(document["id"], format:'audio')
34
+ <audio src="<%= sufia.download_path(document["id"], format:'audio')
35
35
  %>" > </audio>
36
36
  <% else %>
37
- <%= link_to image_tag("/assets/default.png", {:width=>width,:height=>height}), generic_file_path(document[:noid_s].first) %>
37
+ <%= link_to image_tag("/assets/default.png", {:width=>width,:height=>height}), sufia.generic_file_path(document[:noid_s].first) %>
38
38
  <% end %>
39
39
  <% else %>
40
- <%= link_to image_tag("/assets/default.png", {:width=>width,:height=>height}), generic_file_path(document[:noid_s].first) %>
40
+ <%= link_to image_tag("/assets/default.png", {:width=>width,:height=>height}), sufia.generic_file_path(document[:noid_s].first) %>
41
41
  <% end %>
@@ -15,7 +15,7 @@ limitations under the License.
15
15
  %>
16
16
 
17
17
  <div style="float: right;" >
18
- <%= form_tag dashboard_path, :method => :get, :class => "well form-search" do %>
18
+ <%= form_tag sufia.dashboard_path, :method => :get, :class => "well form-search" do %>
19
19
  <label class="accessible-hidden">Search My Dashboard</label>
20
20
  <%= text_field_tag :q, params[:q], :class => "q", :placeholder => "Search My Dashboard", :size => '30', :type => "search", :id => "dashboard_search" %>
21
21
  <%= hidden_field_tag :search_field, 'all_fields' %>
@@ -14,31 +14,32 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  %>
16
16
 
17
- <% javascript 'video.js' %>
18
- <% javascript 'audio.min.js' %>
19
- <% stylesheet 'video-js.css' %>
20
- <% javascript 'dashboard.js' %>
21
- <% javascript 'swfobject.js' %>
22
- <% javascript 'jquery.clippy.js' %>
23
-
24
- <script type = "text/javascript">
25
-
26
- // function to hide or show the batch update buttons based on how may items are checked
27
- function toggleButtons(forceOn, otherPage ){
28
- forceOn = typeof forceOn !== 'undefined' ? forceOn : false
29
- otherPage = typeof otherPage !== 'undefined' ? otherPage : <%= !@batch_part_on_other_page %>
30
- var n = $(".batch_toggle:checked").length;
31
- if ((n>0) || (forceOn)) {
32
- $('.batch-select-all').show();
33
- $('.button_to').show();
34
- } else if ( otherPage){
35
- $('.batch-select-all').hide();
36
- $('.button_to').hide();
17
+ <% content_for :head do %>
18
+ <% javascript_include_tag 'video.js' %>
19
+ <% javascript_include_tag 'audio.min.js' %>
20
+ <% stylesheet_link_tag 'video-js.css' %>
21
+ <% javascript_include_tag 'dashboard.js' %>
22
+ <% javascript_include_tag 'swfobject.js' %>
23
+ <% javascript_include_tag 'jquery.clippy.js' %>
24
+
25
+ <script type = "text/javascript">
26
+
27
+ // function to hide or show the batch update buttons based on how may items are checked
28
+ function toggleButtons(forceOn, otherPage ){
29
+ forceOn = typeof forceOn !== 'undefined' ? forceOn : false
30
+ otherPage = typeof otherPage !== 'undefined' ? otherPage : <%= !@batch_part_on_other_page %>
31
+ var n = $(".batch_toggle:checked").length;
32
+ if ((n>0) || (forceOn)) {
33
+ $('.batch-select-all').show();
34
+ $('.button_to').show();
35
+ } else if ( otherPage){
36
+ $('.batch-select-all').hide();
37
+ $('.button_to').hide();
38
+ }
39
+ $("body").css("cursor", "auto");
37
40
  }
38
- $("body").css("cursor", "auto");
39
- }
40
- </script>
41
-
41
+ </script>
42
+ <% end %>
42
43
  <% content_for :local_js do %>
43
44
 
44
45
  initialize_audio();
@@ -203,4 +204,4 @@ z-index:1;
203
204
  <%= render 'results_pagination' %>
204
205
  <%= render :partial => 'users/activity_log', :locals => {:events => @events} %>
205
206
 
206
- <span id="single_clippy" class="clippy hidden" data-text="This is a test"></span> <i class="icon-link over" onlick="alert('abc');"></i>
207
+ <span id="single_clippy" class="clippy hidden" data-text="This is a test"></span> <i class="icon-link over" onlick="alert('abc');"></i>
@@ -15,18 +15,18 @@ limitations under the License.
15
15
  %>
16
16
 
17
17
  <% if ['image/jpeg', 'image/png', 'image/bmp', 'image/gif', 'image/jpg'].include?(@generic_file.mime_type) %>
18
- <a href="<%= download_path(@generic_file.noid) %>" target="_new"><img src="<%= download_path(@generic_file.noid) %>" width="338" /></a>
18
+ <a href="<%= sufia.download_path(@generic_file.noid) %>" target="_new"><img src="<%= sufia.download_path(@generic_file.noid) %>" width="338" /></a>
19
19
  <% elsif ['video/mp4'].include?(@generic_file.mime_type) %>
20
20
  <video controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
21
- <source src="<%= download_path(@generic_file.noid) %>" type="<%= @generic_file.mime_type %>" />
21
+ <source src="<%= sufia.download_path(@generic_file.noid) %>" type="<%= @generic_file.mime_type %>" />
22
22
  Your browser does not support the audio tag.
23
23
  </video>
24
24
  <% elsif ['audio/mp3', 'audio/mpeg'].include?(@generic_file.mime_type) %>
25
- <audio src="<%= download_path(@generic_file.noid, format:'audio') %>" type="<%= @generic_file.mime_type %>" />
25
+ <audio src="<%= sufia.download_path(@generic_file.noid, format:'audio') %>" type="<%= @generic_file.mime_type %>" />
26
26
  Your browser does not support the audio tag.
27
27
  </audio>
28
28
  <% elsif ['application/pdf'].include?(@generic_file.mime_type) %>
29
- <a href="<%= download_path(@generic_file.noid) %>" target="_new"><img src="<%= download_path(@generic_file.noid, {:datastream_id => 'thumbnail'}) %>" width="338" height="493" /></a>
29
+ <a href="<%= sufia.download_path(@generic_file.noid) %>" target="_new"><img src="<%= sufia.download_path(@generic_file.noid, {:datastream_id => 'thumbnail'}) %>" width="338" height="493" /></a>
30
30
  <% else %>
31
- <a href="<%= download_path(@generic_file.noid) %>" target="_new"><img src="/assets/default.png" alt="No preview available" width="338" height="493" /></a>
31
+ <a href="<%= sufia.download_path(@generic_file.noid) %>" target="_new"><img src="/assets/default.png" alt="No preview available" width="338" height="493" /></a>
32
32
  <% end %>
@@ -35,39 +35,39 @@ limitations under the License.
35
35
  <div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
36
36
  <div class="modal-header">
37
37
  <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
38
- <h2 id="myModalLabel">ScholarSphere Permissions</h2>
38
+ <h2 id="myModalLabel"><%=t('sufia.product_name') %> Permissions</h2>
39
39
  </div>
40
40
  <div class="modal-body">
41
41
  <h3>Visibility</h3>
42
42
  <p>This setting will determine who can view your file, and the associated metadata in ScholarSphere. Setting
43
43
  the visibility to <span class="label label-success">Open Access</span> will allow your content to be discovered in Google and viewed by anyone.
44
- The visibility setting <span class="label label-info">Penn State</span> will only allow users who are logged into ScholarSphere
44
+ The visibility setting <span class="label label-info"><%=t('sufia.institution_name') %></span> will only allow users who are logged into <%=t('sufia.product_name') %>
45
45
  (via WebAccess) to view the content. Files that are marked <span class="label label-important">Private</span> are only able to be viewed
46
46
  by users and/or groups that have been given specific access in the &quot;Share With&quot; section.
47
47
  </p>
48
48
 
49
49
  <p>
50
- Permissions in ScholarSphere are hierarchical. This means that you cannot set the visibility of a file to <span class="label label-success">Open Access</span> or
51
- <span class="label label-info">Penn State</span> and simultaneously try to restrict the access of a single user. However, you may mark the visibility of
50
+ 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
51
+ <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
52
52
  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;
53
53
  section.
54
54
  </p>
55
55
 
56
56
  <h3>Share With</h3>
57
57
  <p>You may grant &quot;View/Download&quot; or &quot;Edit&quot; access for specific users and/or groups to files. Enter
58
- a valid Penn State Access Account Id, one at a time, select the access level for that user and click
58
+ a valid <%=t('sufia.account_name') %>, one at a time, select the access level for that user and click
59
59
  <button class="btn btn-mini btn-inverse" onclick="return false;"><i class="icon-plus-sign" ></i>Add</button>.
60
60
  </p>
61
61
 
62
62
  <p>
63
- The list of groups in the drop-down marked &quot;Select a group&quot; is a list of User Managed Groups that you are a member of, and are managed by Penn State's ITS department. You may select a specific group and assign an access
64
- level for a file within ScholarSphere, similarly to adding user access levels. However, management of these groups and their membership is handled centrally at <a href="http://umg.its.psu.edu" target="_blank">umg.its.psu.edu</a>.
63
+ The list of groups in the drop-down marked &quot;Select a group&quot; is a list of User Managed Groups that you are a member of, and are managed by <%=t('sufia.institution_name') %>'s ITS department. You may select a specific group and assign an access
64
+ level for a file within <%=t('sufia.product_name') %>, similarly to adding user access levels. However, management of these groups and their membership is handled centrally at <a href="http://umg.its.psu.edu" target="_blank">umg.its.psu.edu</a>.
65
65
  </p>
66
66
 
67
67
  <h3>Permission Definitions</h3>
68
68
  <p>
69
- <strong>View/Download:</strong> this file (both contents and metadata) is accessible from within ScholarSphere.<br />
70
- <strong>Edit:</strong> this file (both contents and metadata) can be edited. You may only grant this permission to Penn State users and/or groups.
69
+ <strong>View/Download:</strong> this file (both contents and metadata) is accessible from within <%=t('sufia.product_name') %>.<br />
70
+ <strong>Edit:</strong> this file (both contents and metadata) can be edited. You may only grant this permission to <%=t('sufia.institution_name') %> users and/or groups.
71
71
  </p>
72
72
  </div>
73
73
  <div class="modal-footer">
@@ -83,7 +83,7 @@ limitations under the License.
83
83
  <input type="radio" id="visibility_open" name="visibility" value="open" <% if !public_perm.blank? %> checked="true"<% end %>/> <span class="label label-success">Open Access</span> Visible to the world.
84
84
  </label>
85
85
  <label class="radio">
86
- <input type="radio" id="visibility_psu" name="visibility" value="psu" <% if !psu_perm.blank? %> checked="true"<% end %> /><span class="label label-info">Penn State</span> Visible to all Penn State users.
86
+ <input type="radio" id="visibility_psu" name="visibility" value="psu" <% if !psu_perm.blank? %> checked="true"<% end %> /><span class="label label-info"><%=t('sufia.institution_name') %></span> Visible to all <%=t('sufia.institution_name') %> users.
87
87
  </label>
88
88
  <label class="radio">
89
89
  <input type="radio" id="visibility_restricted" name="visibility" value="restricted"<% if psu_perm.blank? and public_perm.blank?%> checked="true"<% end %> /> <span class="label label-important">Private</span> Visible to users/groups specified below, if any.
@@ -96,7 +96,7 @@ limitations under the License.
96
96
  <div class="row control-group">
97
97
  <div id="new-user">
98
98
  <div class="input-append">
99
- <p class="help-block">Enter Penn State Access Account Id (one at a time)</p>
99
+ <p class="help-block">Enter <%=t('sufia.account_label') %> (one at a time)</p>
100
100
  <%= text_field_tag 'new_user_name_skel', nil, :class => "span29" %><span class="add-on">@psu.edu</span>
101
101
  <%= select_tag 'new_user_permission_skel', options_for_select(ScholarSphere::Application::config.permission_levels), :class=> 'span17' %>
102
102
  <button class="btn btn-mini btn-inverse" id="add_new_user_skel"><i class="icon-plus-sign"></i> Add</button>
@@ -14,20 +14,22 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  %>
16
16
 
17
- <% javascript 'video.js' %>
18
- <% javascript 'audio.min.js' %>
19
- <% javascript 'bootstrap-tooltip.js'%>
20
- <% javascript 'bootstrap-popover.js'%>
21
- <% javascript 'bootstrap-modal.js'%>
17
+ <% content_for :head do %>
18
+ <% javascript_include_tag 'video.js' %>
19
+ <% javascript_include_tag 'audio.min.js' %>
20
+ <% stylesheet_link_tag 'video-js.css' %>
22
21
 
23
- <% stylesheet 'video-js.css' %>
24
- <% stylesheet 'jquery-ui-1.8.1.custom' %>
22
+ <% javascript_include_tag 'bootstrap-tooltip.js'%>
23
+ <% javascript_include_tag 'bootstrap-popover.js'%>
24
+ <% javascript_include_tag 'bootstrap-modal.js'%>
25
25
 
26
- <% javascript 'jquery.validate.js' %>
26
+
27
+ <% javascript_include_tag 'jquery.validate.js' %>
27
28
 
28
29
  <style type="text/css">
29
30
  label.error { float: left; color: red; padding-left: .5em; vertical-align: top; }
30
31
  </style>
32
+ <% end %>
31
33
 
32
34
 
33
35
 
@@ -14,14 +14,18 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  %>
16
16
 
17
- <% javascript 'video.js' %>
18
- <% javascript 'audio.min.js' %>
19
- <% stylesheet 'video-js.css' %>
20
- <% javascript 'https://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4ff1d986721ebb24' %>
21
- <% javascript 'bootstrap-tooltip.js'%>
22
- <% javascript 'bootstrap-popover.js'%>
23
- <% javascript 'bootstrap-modal.js'%>
24
17
 
18
+ <% content_for :js_head do %>
19
+ <% javascript_include_tag 'video.js' %>
20
+ <% javascript_include_tag 'audio.min.js' %>
21
+ <% javascript_include_tag 'https://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4ff1d986721ebb24' %>
22
+ <% javascript_include_tag 'bootstrap-tooltip.js'%>
23
+ <% javascript_include_tag 'bootstrap-popover.js'%>
24
+ <% javascript_include_tag 'bootstrap-modal.js'%>
25
+ <% end %>
26
+ <% content_for :css_head do %>
27
+ <% stylesheet_link_tag 'video-js.css' %>
28
+ <% end %>
25
29
 
26
30
  <% content_for :local_js do %>
27
31
  initialize_audio();
@@ -45,21 +49,21 @@ var addthis_config = {"data_track_addressbar":true};
45
49
  <div class="span68"><!-- class="column second"> -->
46
50
  <h2 class="non lower">Actions</h2>
47
51
  <p>
48
- <%= link_to "Download", download_path(@generic_file.noid) %>
52
+ <%= link_to "Download", sufia.download_path(@generic_file.noid) %>
49
53
  <!-- &nbsp;|&nbsp; -->
50
54
  <%# link_to "Cite", citation_generic_file_path, {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink'}, :action => 'citation' %>
51
55
  <% if @can_edit %>
52
56
  &nbsp;|&nbsp;
53
- <%= link_to "Edit", edit_generic_file_path unless @generic_file.processing? %>
57
+ <%= link_to "Edit", sufia.edit_generic_file_path unless @generic_file.processing? %>
54
58
  <%= "File is being processed you may edit once it is complete" if @generic_file.processing? %>
55
59
  <%end %>
56
60
  </p>
57
61
  <p>Export to:
58
- <%= link_to 'EndNote', generic_file_path(@generic_file.noid, :format => 'endnote') %>
62
+ <%= link_to 'EndNote', sufia.generic_file_path(@generic_file.noid, :format => 'endnote') %>
59
63
  &nbsp;|&nbsp;
60
- <%= link_to 'Zotero', static_path('zotero'), {:id => 'zoteroLink', :name => 'zotero', :class => 'lightboxLink'} %>
64
+ <%= link_to 'Zotero', sufia.static_path('zotero'), {:id => 'zoteroLink', :name => 'zotero', :class => 'lightboxLink'} %>
61
65
  &nbsp;|&nbsp;
62
- <%= link_to 'Mendeley', static_path('mendeley'), {:id => 'mendeleyLink', :name => 'mendeley', :class => 'lightboxLink'} %>
66
+ <%= link_to 'Mendeley', sufia.static_path('mendeley'), {:id => 'mendeleyLink', :name => 'mendeley', :class => 'lightboxLink'} %>
63
67
  <!-- Disabling RefWorks export due to stakeholder deprioritization -->
64
68
  <%# link_to 'RefWorks', refworks_export_url(:id => @generic_file.noid) %>
65
69
  <!-- &nbsp;|&nbsp; -->
@@ -47,40 +47,7 @@ limitations under the License.
47
47
  <div id="wrapper">
48
48
  <div class="container">
49
49
  <div id="page-positioner">
50
- <div id="masthead">
51
- <a id="shield" href="http://psu.edu/"><img src="/assets/site_images/logo_psuss_shield.png" width="219" height="60" alt="Penn State University" /></a>
52
- <a id="logo" href="/"><img src="/assets/site_images/logo_psuss_logotype.png" width="132" height="37" alt="Penn State ScholarSphere" /></a>
53
- <div class="navbar">
54
- <div class="nav-inner">
55
- <div class="container">
56
- <ul class="nav pull-right">
57
- <li <%= 'class=active' if params[:controller] == "catalog" and action_name == "index" %>><a href="/" class="top_nav">Home</a></li>
58
- <li <%= 'class=active' if action_name == "about" %>><a href="/about/" class="top_nav">About</a></li>
59
- <li <%= 'class=active' if action_name == "help" %>><a href="/help/" class="top_nav">Help</a></li>
60
- <li <%= 'class=active' if params[:controller] == "contact_form" %>><a href="<%= contact_form_index_path %>" class="top_nav">Contact</a></li>
61
- <li>
62
- <div class="btn-group">
63
- <% if current_user %>
64
- <a href="<%= profile_path(current_user.to_s) %>" class="btn btn-small"><i class="icon-user">&nbsp;</i><%= current_user.name %></a>
65
- <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-caret-down"></span></a>
66
- <ul class="dropdown-menu">
67
- <li><%= link_to raw('<i class="icon-dashboard"></i> my dashboard'), dashboard_path, :id => 'dashboard_nav_link' %></li>
68
- <li><%= link_to raw('<i class="icon-upload-alt"></i> upload'), new_generic_file_path, :id => 'upload_nav_link' %></li>
69
- <li><%= link_to raw('<i class="icon-cog"></i> edit profile'), edit_profile_path(current_user.login), :id => 'upload_nav_link' %></li>
70
- <li class="divider"></li>
71
- <li><%= link_to raw('<i class="icon-signout"></i> log out'), destroy_user_session_path, :id => 'logout_nav_link' %></li>
72
- </ul>
73
- <% else %>
74
- <%= link_to raw('<i class="icon-signin"></i> Login'), new_user_session_path, :class => "btn btn-small" %>
75
- <% end %>
76
- </div><!-- /.btn-group -->
77
- </li>
78
- </ul><!-- /.nav /.pull-right -->
79
- </div><!-- /.container -->
80
- </div><!-- /.nav-inner -->
81
- </div><!-- /.navbar -->
82
- </div> <!-- /masthead -->
83
-
50
+ <%= render :partial => '/masthead', :formats => [:html] %>
84
51
  <div id="content-wrapper">
85
52
  <div id="content" class="row">
86
53
  <!-- 110 rows -->
@@ -92,25 +59,7 @@ limitations under the License.
92
59
  </div><!-- /#page-positioner -->
93
60
  </div><!-- /.container -->
94
61
  </div><!-- /#wrapper -->
95
- <div id="footer-wrapper" class="row-fluid">
96
- <div id="footer">
97
- <div class="footer-logo">
98
- <a href="/"><img src="/assets/site_images/logo_psuss_footer.png" alt="Penn State ScholarSphere" /></a>
99
- <p>A service of the University Libraries and Information Technology Services.</p>
100
- </div>
101
- <div class="footer-text">
102
- <p><strong>Copyright &copy; 2012 The Pennsylvania State University</strong></p>
103
- <ul>
104
- <li><a href="http://psu.edu">Penn State</a></li>
105
- <li><a href="http://libraries.psu.edu">University Libraries</a></li>
106
- <li><a href="http://its.psu.edu">Information Technology Services</a></li>
107
- <li><a href="http://accessibility.psu.edu/">Accessibility</a></li>
108
- </ul>
109
- </div>
110
- <div class="clearfix"></div>
111
- </div><!-- /footer -->
112
- </div><!-- /footer-wrapper -->
113
-
62
+ <%= render partial: '/footer' %>
114
63
 
115
64
  </body>
116
65
 
@@ -57,7 +57,7 @@ limitations under the License.
57
57
  <div id="wrapper">
58
58
  <div class="container">
59
59
  <div id="page-positioner">
60
- <%= render :partial => '/user_util_links', :formats => [:html] %>
60
+ <%= render :partial => '/masthead', :formats => [:html] %>
61
61
  <%= render :partial => '/flash_msg' %>
62
62
  <div id="content-wrapper">
63
63
  <div id="content" class="row">
@@ -95,25 +95,6 @@ limitations under the License.
95
95
  </div><!-- /#page-positioner -->
96
96
  </div><!-- /.container -->
97
97
  </div><!-- /#wrapper -->
98
- <div id="footer-wrapper" class="row-fluid">
99
- <div id="footer">
100
- <div class="footer-logo">
101
- <p class="fright">
102
- <a href="/versions/"><%= Sufia::VERSION %></a></p>
103
- <a href="/"><img src="/assets/site_images/logo_psuss_footer.png" alt="Penn State ScholarSphere" /></a>
104
- <p>A service of the University Libraries and Information Technology Services.</p>
105
- </div>
106
- <div class="footer-text">
107
- <p><strong>Copyright &copy; 2012 The Pennsylvania State University</strong></p>
108
- <ul>
109
- <li><a href="http://psu.edu">Penn State</a></li>
110
- <li><a href="http://libraries.psu.edu">University Libraries</a></li>
111
- <li><a href="http://its.psu.edu">Information Technology Services</a></li>
112
- <li><a href="http://accessibility.psu.edu/">Accessibility</a></li>
113
- </ul>
114
- </div>
115
- <div class="clearfix"></div>
116
- </div><!-- /footer -->
117
- </div><!-- /footer-wrapper -->
98
+ <%= render partial: '/footer' %>
118
99
  </body>
119
100
  </html>
@@ -29,7 +29,7 @@ limitations under the License.
29
29
  <tr class="<%= cycle("","zebra") %>">
30
30
  <td ><%= msg.last_message.subject.html_safe %></td>
31
31
  <td ><%= msg.last_message.body.html_safe %></td>
32
- <td> <%= link_to raw('<i class="icon-trash icon-large"></i>'), mailbox_delete_path(msg.id), :class=> 'itemicon itemtrash', :title => 'Delete File', :method => :delete %>&nbsp;&nbsp;&nbsp;</td>
32
+ <td> <%= link_to raw('<i class="icon-trash icon-large"></i>'), sufia.mailbox_delete_path(msg.id), :class=> 'itemicon itemtrash', :title => 'Delete File', :method => :delete %>&nbsp;&nbsp;&nbsp;</td>
33
33
 
34
34
  </tr>
35
35
  <% end %>
@@ -15,70 +15,7 @@ limitations under the License.
15
15
  %>
16
16
 
17
17
  <h1>About</h1>
18
- <h2>What is ScholarSphere?</h2>
18
+ <h2>What is <%=t('sufia.product_name') %>?</h2>
19
19
  <p>
20
- ScholarSphere is a secure repository service enabling the Penn State community to share its research and scholarly work with a worldwide audience. Faculty, staff, and students can use ScholarSphere to collect their work in one location and create a durable and citeable record of their papers, presentations, publications, data sets, or other scholarly creations. Through this service, Penn State researchers can also comply with grant-funding-agency requirements for sharing and managing research data. <%= link_to 'Contact us', contact_form_index_path %> to find out more!
20
+ Use app/views/static/about.html.erb to override this file. <%= link_to 'Sample Contact Link', sufia.contact_form_index_path %>
21
21
  </p>
22
-
23
-
24
- <h1>Guidelines and Policies</h1>
25
- <h2>Content Policy</h2>
26
-
27
- <p>
28
- The content in ScholarSphere represents the research, scholarship, or intellectual output of the Penn State community. Through ScholarSphere, the work of Penn State researchers attains broad visibility and distribution. ScholarSphere captures content primarily of scholarly import, including curricular materials and creative works produced in support of Penn State's teaching, learning, and research mission. Such content may include but is not limited to journal pre-prints and post-prints, data sets, working papers, technical reports, conference papers, student work (e.g., master's theses, capstone projects), audio and visual materials, annual reports, and newsletters. ScholarSphere makes no restrictions on the state of the research submitted, as long the depositing author deems the item in a complete enough state to share and distribute.
29
- </p><p>
30
- Sensitive data may not be included in ScholarSphere. Examples of sensitive data include: personally identifiable information (PII), as covered by the Family Educational Rights and Privacy Act (FERPA) and the Health Insurance Portability and Accountability Act (HIPAA), and specific locations of endangered plants and animals. In addition, ScholarSphere will not accept content if it is in violation of copyright agreements. In the event that such violations are found, ScholarSphere reserves the right to withdraw the submitted content. See our <a href="/agreement/">Deposit Agreement</a> for clarification.
31
- </p><p>
32
- ScholarSphere welcomes deposits from the Penn State community - faculty, students (undergraduates and graduates), postdoctoral researchers, administrators, and staff. Deposit of Penn State co-authored materials is also encouraged, provided the co-author has secured any requisite copyright permissions for deposit in ScholarSphere.
33
- </p>
34
-
35
-
36
- <h2>Deposit Policy</h2>
37
-
38
- <p>
39
- Depositing your work in ScholarSphere means the following:
40
-
41
- <ul>
42
- <li>The deposit represents your own work (and that of your co-authors, if this is a jointly created work.) </li>
43
- <li>Your work does not contain any confidential or proprietary information, or personally identifiable information that would compromise someone's privacy.</li>
44
- <li>You (and any co-authors) retain copyright to the work and the right to use all or part in future works.</li>
45
- </ul>
46
- Deposit of content to ScholarSphere grants Penn State University non-exclusive rights for preserving that content and, if you choose, disseminating that content. (See our "Preservation Policy" below.) To increase the reach, impact, sharing, and preservation of the research, Penn State and ScholarSphere allow content that has been deposited in other repository services to be deposited as well in ScholarSphere, assuming the depositor has not signed an exclusive licensing agreement with another entity. The deposited materials may be freely deposited and distributed elsewhere, in venues such as disciplinary data repositories, electronic journals, pre-print archives, conference proceedings, or course/learning management systems. Please consult our <a href="/agreement/">Deposit Agreement</a> for clarification.
47
- </p><p>
48
- As part of the deposit process, the depositor will be prompted to describe the file (content) that has been uploaded. This process includes selecting a Creative Commons license that describes what the depositor permits others to do with the uploaded content. The default license level (i.e., the license level that automatically appears in the "Rights" field) is Attribution-Non-Commercial-No-Derivs 3.0, or CC-BY-NC-ND. 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. HOWEVER, you may select a different license in the drop-down menu. For further guidance, please consult the <a href="/help#collapseIP1">Help page</a> (scroll down to the section on "Creative Commons").
49
- </p>
50
-
51
- <h2>Guidelines for Visibility (Access Levels) and Sharing</h2>
52
- <p>
53
- The depositor sets permissions during the upload process. Access permissions give the depositor of content the ability to control who can find, see, edit and download their content. You have the option of setting both "Visibility" (who can see an item) and "Share With" (who can edit.)
54
- </p><p>
55
- <b>Visibility</b>
56
- This setting will determine who can view your file, and the associated metadata in ScholarSphere. The default setting for visibility of your content is Open Access. The Open Access setting will allow your content to be discovered in Google and accessed by anyone. The visibility setting, Penn State, will allow only users who are logged into ScholarSphere (via WebAccess) to view the content. The third visibility setting is Private. Files that are marked Private are able to be viewed only by users and/or groups that have been given specific access in the "Share With" section.
57
- <br>
58
- Permissions in ScholarSphere are hierarchical. This means that you cannot set the visibility of a file to Open Access or Penn State and simultaneously try to restrict access to a single user. However, you may mark the visibility of a file as Private and then grant access to particular users and/or groups for that file in the "Share With" section.
59
- </p><p>
60
-
61
- <b>Share With</b>
62
- You may grant "View/Download" or "Edit" access for specific users and/or groups to files. Enter a valid Penn State Access Account Id, one at a time, select the access level for that user and click Add.
63
-
64
- The list of groups in the drop-down marked "Select a group" is a list of User Managed Groups managed by Penn State's ITS department. You may select a specific group and assign an access level for a file within ScholarSphere - similar to adding user access levels. However, management of these groups and their membership is handled centrally at umg.its.psu.edu.
65
- </p><p>
66
-
67
- <b>Permission Definitions</b>
68
- <ul>
69
- <li><b>View/Download:</b> This file (both contents and metadata) is accessible from within ScholarSphere.</li>
70
- <li><b>Edit:</b> This file (both contents and metadata) can be edited. You may only grant this permission to Penn State users and/or groups.</li>
71
- </ul>
72
- </p>
73
-
74
- <h2>Preservation Support Policy</h2>
75
- <p>
76
- Penn State Libraries and Information Technology Services are committed to providing long-term access to all material submitted to ScholarSphere. Initial preservation services have been informed by international standards and best practices. In addition to providing basic services like secure storage and redundancy, ScholarSphere has been designed to preserve all content in the form it is deposited.
77
- </p><p>
78
- All work submitted to ScholarSphere will be preserved at a basic bit-level. File characteristics (such as format, mime type, date created) will be captured and stored as metadata during the deposit process to mitigate potential format obsolescence. All files deposited will receive a SHA-1 (Secure Hash Algorithm) checksum, which is used to document file integrity over time. Regular file integrity checks will be run to check for changes (such as file corruption), and can even be scheduled on-demand.
79
- </p><p>
80
- Beyond this initial level of preservation, the ScholarSphere team is planning for additional preservation services, including file migration and normalization. Details of new services will be announced as they are released.
81
- </p><p>
82
- Certain file formats (such as openly-documented, non-proprietary, lossless) are more easily preserved than others. To better assist contributors, ScholarSphere will in the future provide guidance related to file formats and documentary types.
83
- </p>
84
-