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
@@ -13,6 +13,8 @@
13
13
  # limitations under the License.
14
14
 
15
15
  class ChecksumAuditLog < ActiveRecord::Base
16
+ attr_accessible :pass, :pid, :dsid, :version, :created_at
17
+
16
18
  def ChecksumAuditLog.get_audit_log(version)
17
19
  log = ChecksumAuditLog.find_or_create_by_pid_and_dsid_and_version(:pid => version.pid,
18
20
  :dsid => version.dsid,
@@ -12,6 +12,8 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ require 'mail_form'
16
+
15
17
  class ContactForm < MailForm::Base
16
18
  ISSUE_TYPES = [
17
19
  ["Depositing content", "Depositing content"],
@@ -16,7 +16,7 @@ class ContentDeleteEventJob < EventJob
16
16
  def initialize(generic_file_id, depositor_id)
17
17
  action = "User #{link_to_profile depositor_id} has deleted file '#{generic_file_id}'"
18
18
  timestamp = Time.now.to_i
19
- depositor = User.find_by_login(depositor_id)
19
+ depositor = User.find_by_user_key(depositor_id)
20
20
  # Create the event
21
21
  event = depositor.create_event(action, timestamp)
22
22
  # Log the event to the depositor's profile stream
@@ -15,9 +15,9 @@
15
15
  class ContentDepositEventJob < EventJob
16
16
  def initialize(generic_file_id, depositor_id)
17
17
  gf = GenericFile.find(generic_file_id)
18
- action = "User #{link_to_profile depositor_id} has deposited #{link_to gf.title.first, generic_file_path(gf.noid)}"
18
+ action = "User #{link_to_profile depositor_id} has deposited #{link_to gf.title.first, Sufia::Engine.routes.url_helpers.generic_file_path(gf.noid)}"
19
19
  timestamp = Time.now.to_i
20
- depositor = User.find_by_login(depositor_id)
20
+ depositor = User.find_by_user_key(depositor_id)
21
21
  # Create the event
22
22
  event = depositor.create_event(action, timestamp)
23
23
  # Log the event to the depositor's profile stream
@@ -15,9 +15,9 @@
15
15
  class ContentNewVersionEventJob < EventJob
16
16
  def initialize(generic_file_id, depositor_id)
17
17
  gf = GenericFile.find(generic_file_id)
18
- action = "User #{link_to_profile depositor_id} has added a new version of #{link_to gf.title.first, generic_file_path(gf.noid)}"
18
+ action = "User #{link_to_profile depositor_id} has added a new version of #{link_to gf.title.first, Sufia::Engine.routes.url_helpers.generic_file_path(gf.noid)}"
19
19
  timestamp = Time.now.to_i
20
- depositor = User.find_by_login(depositor_id)
20
+ depositor = User.find_by_user_key(depositor_id)
21
21
  # Create the event
22
22
  event = depositor.create_event(action, timestamp)
23
23
  # Log the event to the depositor's profile stream
@@ -15,9 +15,9 @@
15
15
  class ContentRestoredVersionEventJob < EventJob
16
16
  def initialize(generic_file_id, depositor_id, revision_id)
17
17
  gf = GenericFile.find(generic_file_id)
18
- action = "User #{link_to_profile depositor_id} has restored a version '#{revision_id}' of #{link_to gf.title.first, generic_file_path(gf.noid)}"
18
+ action = "User #{link_to_profile depositor_id} has restored a version '#{revision_id}' of #{link_to gf.title.first, Sufia::Engine.routes.url_helpers.generic_file_path(gf.noid)}"
19
19
  timestamp = Time.now.to_i
20
- depositor = User.find_by_login(depositor_id)
20
+ depositor = User.find_by_user_key(depositor_id)
21
21
  # Create the event
22
22
  event = depositor.create_event(action, timestamp)
23
23
  # Log the event to the depositor's profile stream
@@ -15,9 +15,9 @@
15
15
  class ContentUpdateEventJob < EventJob
16
16
  def initialize(generic_file_id, depositor_id)
17
17
  gf = GenericFile.find(generic_file_id)
18
- action = "User #{link_to_profile depositor_id} has updated #{link_to gf.title.first, generic_file_path(gf.noid)}"
18
+ action = "User #{link_to_profile depositor_id} has updated #{link_to gf.title.first, Sufia::Engine.routes.url_helpers.generic_file_path(gf.noid)}"
19
19
  timestamp = Time.now.to_i
20
- depositor = User.find_by_login(depositor_id)
20
+ depositor = User.find_by_user_key(depositor_id)
21
21
  # Create the event
22
22
  event = depositor.create_event(action, timestamp)
23
23
  # Log the event to the depositor's profile stream
@@ -17,7 +17,7 @@ class PropertiesDatastream < ActiveFedora::NokogiriDatastream
17
17
  set_terminology do |t|
18
18
  t.root(:path=>"fields", :xmlns => '', :namespace_prefix => nil)
19
19
  # This is where we put the user id of the object depositor -- impacts permissions/access controls
20
- t.depositor :xmlns => '', :namespace_prefix => nil
20
+ t.depositor :xmlns => '', :namespace_prefix => nil, :index_as=>[:searchable]
21
21
  # This is where we put the relative path of the file if submitted as a folder
22
22
  t.relative_path :xmlns => '', :namespace_prefix => nil
23
23
  end
@@ -13,5 +13,6 @@
13
13
  # limitations under the License.
14
14
 
15
15
  class DomainTerm < ActiveRecord::Base
16
+ attr_accessible :model, :term
16
17
  has_and_belongs_to_many :local_authorities, :uniq=> true
17
18
  end
@@ -17,7 +17,7 @@ class EventJob
17
17
  include ActionView::Helpers
18
18
  include ActionView::Helpers::DateHelper
19
19
  include Hydra::AccessControlsEnforcement
20
- include ApplicationHelper
20
+ include SufiaHelper
21
21
 
22
22
  def self.queue
23
23
  :event
@@ -161,7 +161,8 @@ class GenericFile < ActiveFedora::Base
161
161
  def related_files
162
162
  relateds = begin
163
163
  self.batch.generic_files
164
- rescue NoMethodError
164
+ rescue NoMethodError => e
165
+ #batch is nil
165
166
  batch_id = self.object_relations["isPartOf"].first || self.object_relations[:is_part_of].first
166
167
  return [] if batch_id.nil?
167
168
  self.class.find(:is_part_of_s => batch_id)
@@ -188,8 +189,8 @@ class GenericFile < ActiveFedora::Base
188
189
  # use the field type to see if the return will be one item or multiple
189
190
  if args.is_a? String
190
191
  gf.terms_of_service = '1'
191
- else
192
- gf.each {|f| f.terms_of_service = '1'}
192
+ elsif gf.respond_to? :each
193
+ gf.each {|f| f.terms_of_service = '1'}
193
194
  end
194
195
  return gf
195
196
  end
@@ -653,7 +654,7 @@ class GenericFile < ActiveFedora::Base
653
654
  #logger.debug "***AUDIT*** last audit = #{latest_audit.updated_at.to_date}"
654
655
  days_since_last_audit = (DateTime.now - latest_audit.updated_at.to_date).to_i
655
656
  #logger.debug "***AUDIT*** days since last audit: #{days_since_last_audit}"
656
- if days_since_last_audit < Rails.application.config.max_days_between_audits
657
+ if days_since_last_audit < Sufia::Engine.config.max_days_between_audits
657
658
  #logger.debug "***AUDIT*** No audit needed for #{version.pid} #{version.versionID} (#{latest_audit.updated_at})"
658
659
  return false
659
660
  end
@@ -16,6 +16,7 @@ require 'rdf'
16
16
  require 'rdf/rdfxml'
17
17
 
18
18
  class LocalAuthority < ActiveRecord::Base
19
+ attr_accessible :name
19
20
  has_and_belongs_to_many :domain_terms, :uniq=> true
20
21
  has_many :local_authority_entries
21
22
 
@@ -14,4 +14,5 @@
14
14
 
15
15
  class LocalAuthorityEntry < ActiveRecord::Base
16
16
  belongs_to :local_authority
17
+ attr_accessible :local_authority, :label, :uri
17
18
  end
@@ -5,11 +5,11 @@ class SingleUseLink < ActiveRecord::Base
5
5
 
6
6
 
7
7
  def self.create_show(item_id)
8
- create_path(item_id, Rails.application.routes.url_helpers.generic_file_path(item_id) )
8
+ create_path(item_id, Sufia::Engine.routes.url_helpers.generic_file_path(item_id) )
9
9
  end
10
10
 
11
11
  def self.create_download(item_id)
12
- create_path(item_id, Rails.application.routes.url_helpers.download_path(item_id) )
12
+ create_path(item_id, Sufia::Engine.routes.url_helpers.download_path(item_id) )
13
13
  end
14
14
 
15
15
  def expired?
@@ -16,7 +16,7 @@ class UserEditProfileEventJob < EventJob
16
16
  def initialize(editor_id)
17
17
  action = "User #{link_to_profile editor_id} has edited his or her profile"
18
18
  timestamp = Time.now.to_i
19
- editor = User.find_by_login(editor_id)
19
+ editor = User.find_by_user_key(editor_id)
20
20
  # Create the event
21
21
  event = editor.create_event(action, timestamp)
22
22
  # Log the event to the editor's stream
@@ -16,13 +16,13 @@ class UserFollowEventJob < EventJob
16
16
  def initialize(follower_id, followee_id)
17
17
  action = "User #{link_to_profile follower_id} is now following #{link_to_profile followee_id}"
18
18
  timestamp = Time.now.to_i
19
- follower = User.find_by_login(follower_id)
19
+ follower = User.find_by_user_key(follower_id)
20
20
  # Create the event
21
21
  event = follower.create_event(action, timestamp)
22
22
  # Log the event to the follower's stream
23
23
  follower.log_event(event)
24
24
  # Fan out the event to followee
25
- followee = User.find_by_login(followee_id)
25
+ followee = User.find_by_user_key(followee_id)
26
26
  followee.log_event(event)
27
27
  # Fan out the event to all followers
28
28
  follower.followers.each do |user|
@@ -16,13 +16,13 @@ class UserUnfollowEventJob < EventJob
16
16
  def initialize(unfollower_id, unfollowee_id)
17
17
  action = "User #{link_to_profile unfollower_id} has unfollowed #{link_to_profile unfollowee_id}"
18
18
  timestamp = Time.now.to_i
19
- unfollower = User.find_by_login(unfollower_id)
19
+ unfollower = User.find_by_user_key(unfollower_id)
20
20
  # Create the event
21
21
  event = unfollower.create_event(action, timestamp)
22
22
  # Log the event to the unfollower's stream
23
23
  unfollower.log_event(event)
24
24
  # Fan out the event to unfollowee
25
- unfollowee = User.find_by_login(unfollowee_id)
25
+ unfollowee = User.find_by_user_key(unfollowee_id)
26
26
  unfollowee.log_event(event)
27
27
  # Fan out the event to all followers
28
28
  unfollower.followers.each do |user|
@@ -13,4 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  class VersionCommitter < ActiveRecord::Base
16
+ attr_accessible :obj_id, :datastream_id, :version_id, :committer_login
16
17
  end
@@ -0,0 +1,21 @@
1
+ <div id="footer-wrapper" class="row-fluid">
2
+ <div id="footer">
3
+ <div class="footer-logo">
4
+ <p class="fright">
5
+ <a href="/versions/"><%= Sufia::VERSION %></a></p>
6
+ <a href="/"></a>
7
+ <p>A service of Project Hydra.</p>
8
+ </div>
9
+ <div class="footer-text">
10
+ <p><strong>Copyright &copy; 2012 Project Hydra</strong></p>
11
+ <ul>
12
+ <li><a href="">One</a></li>
13
+ <li><a href="">Two</a></li>
14
+ <li><a href="">Three</a></li>
15
+ <li><a href="">Four</a></li>
16
+ </ul>
17
+ </div>
18
+ <div class="clearfix"></div>
19
+ </div><!-- /footer -->
20
+ </div><!-- /footer-wrapper -->
21
+
@@ -0,0 +1,3 @@
1
+ <a class="brand shield" href="/"><%=t('sufia.product_name') %></a>
2
+ <a id="logo" href="/"></a>
3
+
@@ -0,0 +1,38 @@
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
+ <div id="masthead">
18
+ <%= render partial: '/logo' %>
19
+ <div class="navbar">
20
+ <div class="nav-inner">
21
+ <div class="container">
22
+ <ul class="nav pull-right">
23
+ <li <%= 'class=active' if params[:controller] == "catalog" and action_name == "index" %>><a href="/" class="top_nav">Home</a></li>
24
+ <li <%= 'class=active' if action_name == "about" %>><a href="/about/" class="top_nav">About</a></li>
25
+ <li <%= 'class=active' if action_name == "help" %>><a href="/help/" class="top_nav">Help</a></li>
26
+ <li <%= 'class=active' if params[:controller] == "contact_form" %>><a href="<%= sufia.contact_form_index_path %>" class="top_nav">Contact</a></li>
27
+ <li>
28
+ <div class="btn-group">
29
+ <%= render partial: '/user_util_links' %>
30
+ </div><!-- /.btn-group -->
31
+ </li>
32
+ </ul><!-- /.nav /.pull-right -->
33
+ </div><!-- /.container -->
34
+ </div><!-- /.nav-inner -->
35
+ </div><!-- /.navbar -->
36
+ <%= render :partial => 'catalog/search_form' %>
37
+ </div> <!-- /masthead -->
38
+
@@ -13,46 +13,17 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  %>
16
-
17
- <div id="masthead">
18
- <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>
19
- <a id="logo" href="/"><img src="/assets/site_images/logo_psuss_logotype.png" width="132" height="37" alt="Penn State ScholarSphere" /></a>
20
- <div class="navbar">
21
- <div class="nav-inner">
22
- <div class="container">
23
- <ul class="nav pull-right">
24
- <li <%= 'class=active' if params[:controller] == "catalog" and action_name == "index" %>><a href="/" class="top_nav">Home</a></li>
25
- <li <%= 'class=active' if action_name == "about" %>><a href="/about/" class="top_nav">About</a></li>
26
- <li <%= 'class=active' if action_name == "help" %>><a href="/help/" class="top_nav">Help</a></li>
27
- <li <%= 'class=active' if params[:controller] == "contact_form" %>><a href="<%= sufia.contact_form_index_path %>" class="top_nav">Contact</a></li>
28
- <li>
29
- <div class="btn-group">
30
- <% if current_user %>
31
- <%= render :partial => 'users/notify_link' %>
32
- <a href="<%= sufia.profile_path(current_user.to_s) %>" class="btn btn-small " title="click for User Profile"><i class="icon-user">&nbsp;</i><%= current_user.name %></a>
33
- <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-caret-down" title="click for additional menu options"></span></a>
34
- <ul class="dropdown-menu">
35
- <li><%= link_to raw('<i class="icon-dashboard"></i> my dashboard'), sufia.dashboard_path, :id => 'dashboard_nav_link' %></li>
36
- <li><%= link_to raw('<i class="icon-upload-alt"></i> upload'), sufia.new_generic_file_path, :id => 'upload_nav_link' %></li>
37
- <li><%= link_to raw('<i class="icon-cog"></i> edit profile'), sufia.edit_profile_path(current_user.login), :id => 'upload_nav_link' %></li>
38
- <li class="divider"></li>
39
- <li><%= link_to raw('<i class="icon-signout"></i> log out'), destroy_user_session_path, :id => 'logout_nav_link' %></li>
40
- </ul>
41
- <% else %>
42
- <%= link_to raw('<i class="icon-signin"></i> Login'), new_user_session_path, :class => "btn btn-small" %>
43
- <% end %>
44
- </div><!-- /.btn-group -->
45
- </li>
46
- </ul><!-- /.nav /.pull-right -->
47
- </div><!-- /.container -->
48
- </div><!-- /.nav-inner -->
49
- </div><!-- /.navbar -->
50
- <%# logger.info " controller = #{params[:controller]}" %>
51
- <%= render :partial => 'catalog/search_form' %>
52
- </div> <!-- /masthead -->
53
-
54
- <!-- <li><%# link_to 'your bookmarks', bookmarks_path %></li> -->
55
- <!-- <li><%# link_to "saved searches", saved_searches_path %></li> -->
56
- <!-- <li><%# link_to "Selected Items", folder_index_path %>(<span id="folder_number"><%= "#{session[:folder_document_ids] ? session[:folder_document_ids].length : 0}" %></span>)</li> -->
57
- <!-- <li><%# link_to "selected items", folder_index_path %></li> -->
58
- <!-- <li><%# link_to "search history", search_history_path %></li> -->
16
+ <% if current_user %>
17
+ <%= render :partial => 'users/notify_link' %>
18
+ <a href="<%= sufia.profile_path(current_user.to_s) %>" class="btn btn-small " title="click for User Profile"><i class="icon-user">&nbsp;</i><%= current_user.name %></a>
19
+ <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-caret-down" title="click for additional menu options"></span></a>
20
+ <ul class="dropdown-menu">
21
+ <li><%= link_to raw('<i class="icon-dashboard"></i> my dashboard'), sufia.dashboard_path, :id => 'dashboard_nav_link' %></li>
22
+ <li><%= link_to raw('<i class="icon-upload-alt"></i> upload'), sufia.new_generic_file_path, :id => 'upload_nav_link' %></li>
23
+ <li><%= link_to raw('<i class="icon-cog"></i> edit profile'), sufia.edit_profile_path(current_user.user_key), :id => 'upload_nav_link' %></li>
24
+ <li class="divider"></li>
25
+ <li><%= link_to raw('<i class="icon-signout"></i> log out'), destroy_user_session_path, :id => 'logout_nav_link' %></li>
26
+ </ul>
27
+ <% else %>
28
+ <%= link_to raw('<i class="icon-signin"></i> Login'), new_user_session_path, :class => "btn btn-small" %>
29
+ <% end %>
@@ -1,9 +1,2 @@
1
1
  <% # container for all documents in index view -%>
2
- <% facet_name = grouping_facet %>
3
- <%- if facet_name -%>
4
- <%- @response.docs.group_by {|d| d[facet_name]}.each do |grouping| -%>
5
- <%= render :partial => 'catalog/_index_partials/default_group', :locals => {:docs => grouping[1].map { |x| SolrDocument.new(x) }, :facet_name => facet_name, :facet_value => grouping[0].to_s} %>
6
- <%- end -%>
7
- <%- else -%>
8
2
  <%= render :partial => 'catalog/_index_partials/default_group', :locals => {:docs => @response.docs.map { |x| SolrDocument.new(x) }, :facet_name => nil, :facet_value => nil} %>
9
- <%- end -%>
@@ -1,11 +1,11 @@
1
1
  <!--<h1>Getting Started</h1>
2
2
  <img src="/assets/splashscreen.png" width="450" height="259" alt="just a place holder" />
3
3
  <br/><br/> -->
4
- <h2 class="heading1">What is ScholarSphere?</h2>
4
+ <h2 class="heading1">What is <%=t('sufia.product_name') %>?</h2>
5
5
  <p>
6
- ScholarSphere is a secure repository service enabling the Penn State community to share its research and scholarly work with a worldwide audience.
7
- Faculty, staff, and students can use ScholarSphere to collect their work in one location and create a durable and citeable record of their papers,
8
- presentations, publications, data sets, or other scholarly creations. Through this service, Penn State researchers can also comply with
6
+ <%=t('sufia.product_name') %> is a secure repository service enabling the <%=t('sufia.institution_name') %> community to share its research and scholarly work with a worldwide audience.
7
+ Faculty, staff, and students can use <%=t('sufia.product_name') %> to collect their work in one location and create a durable and citeable record of their papers,
8
+ presentations, publications, data sets, or other scholarly creations. Through this service, <%=t('sufia.institution_name') %> researchers can also comply with
9
9
  grant-funding-agency requirements for sharing and managing research data.
10
10
  <hr class="grey"/>
11
11
  <h2 class="heading1">Recently Uploaded <span class="heading1 label label-success">Open Access</span></h2>
@@ -10,14 +10,14 @@
10
10
  <td>
11
11
  <h3>
12
12
  <% if title.length > 25 %>
13
- <%= link_to "#{title[0..24]}...", generic_file_path(recent_document.fetch(:noid_s, :id)), :title => title %>
13
+ <%= link_to "#{title[0..24]}...", sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => title %>
14
14
  <% else %>
15
- <%= link_to title, generic_file_path(recent_document.fetch(:noid_s, :id)), :title => title %>
15
+ <%= link_to title, sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => title %>
16
16
  <% end %>
17
17
 
18
18
  <% if display_access %>
19
19
  <% if !recent_document[:read_access_group_t].blank? and recent_document[:read_access_group_t].include?('registered') %>
20
- <span class="label label-info" title="Penn State">Penn State</span>
20
+ <span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span>
21
21
  <% elsif recent_document[:read_access_group_t].nil? or (recent_document[:read_access_group_t] & ['public']).empty? %>
22
22
  <span class="label label-important">Private</span>
23
23
  <% else %>
@@ -27,9 +27,9 @@
27
27
  </h3>
28
28
  <p>
29
29
  <% if filename.length > 25 %>
30
- <%= link_to "#{filename[0..24]}...", generic_file_path(recent_document.fetch(:noid_s, :id)), :title => filename %><br />
30
+ <%= link_to "#{filename[0..24]}...", sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => filename %><br />
31
31
  <% else %>
32
- <%= link_to filename, generic_file_path(recent_document.fetch(:noid_s, :id)), :title => filename %><br />
32
+ <%= link_to filename, sufia.generic_file_path(recent_document.fetch(:noid_s, :id)), :title => filename %><br />
33
33
  <% end %>
34
34
  <%= keywords.html_safe %>
35
35
  </p>
@@ -0,0 +1,4 @@
1
+ Please use the contact form to submit inquiries about <%=t('sufia.product_name') %> in general, to report a problem you are experiencing with the system,
2
+ to request assistance using <%=t('sufia.product_name') %>; or to provide feedback. See the <%= link_to "Help page", "/help/" %> for
3
+ additional information on user support and the <%=t('sufia.product_name') %> <%= link_to "Frequently Asked Questions (FAQ)", "/help/" %>.
4
+
@@ -16,9 +16,7 @@ limitations under the License.
16
16
 
17
17
  <h1>Contact</h1>
18
18
  <div class="alert">
19
- Please use the contact form to submit inquiries about ScholarSphere in general, to report a problem you are experiencing with the system,
20
- to request assistance using ScholarSphere; or to provide feedback. See the <%= link_to "Help page", "/help/" %> for
21
- additional information on user support and the ScholarSphere <%= link_to "Frequently Asked Questions (FAQ)", "/help/" %>.
19
+ <%= render partial: 'directions' %>
22
20
  </div>
23
21
 
24
22
  <% if current_user %>
@@ -30,7 +28,7 @@ limitations under the License.
30
28
  <% end %>
31
29
 
32
30
  <h2>Contact Form</h2>
33
- <%= form_for(@contact_form, :url => contact_form_index_path, :html => {:class => 'form-horizontal well'}) do |f| %>
31
+ <%= form_for(@contact_form, :url => sufia.contact_form_index_path, :html => {:class => 'form-horizontal well'}) do |f| %>
34
32
  <%= f.text_field :contact_method, :class => 'hide' %>
35
33
  <div class="control-group">
36
34
  <%= f.label :category, 'Issue Type', :class => "control-label" %>
@@ -16,12 +16,5 @@ limitations under the License.
16
16
 
17
17
  <% # container for all documents in index view -%>
18
18
  <div id="documents" class="clear">
19
- <% facet_name = grouping_facet %>
20
- <%- if facet_name -%>
21
- <%- @response.docs.group_by {|d| d[facet_name]}.each do |grouping| -%>
22
- <%= render :partial => 'dashboard/_index_partials/default_group', :locals => {:docs => grouping[1].map { |x| SolrDocument.new(x) }, :facet_name => facet_name, :facet_value => grouping[0].to_s} %>
23
- <%- end -%>
24
- <%- else -%>
25
- <%= render :partial => 'dashboard/_index_partials/default_group', :locals => {:docs => @response.docs.map { |x| SolrDocument.new(x) }, :facet_name => nil, :facet_value => nil} %>
26
- <%- end -%>
19
+ <%= render :partial => 'dashboard/_index_partials/default_group', :locals => {:docs => @response.docs.map { |x| SolrDocument.new(x) }, :facet_value => nil} %>
27
20
  </div>