sufia 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +44 -0
  3. data/SUFIA_VERSION +1 -1
  4. data/app/controllers/authorities_controller.rb +0 -14
  5. data/app/controllers/batch_controller.rb +0 -14
  6. data/app/controllers/contact_form_controller.rb +0 -14
  7. data/app/controllers/dashboard_controller.rb +0 -14
  8. data/app/controllers/directory_controller.rb +0 -14
  9. data/app/controllers/downloads_controller.rb +0 -14
  10. data/app/controllers/errors_controller.rb +0 -14
  11. data/app/controllers/generic_files_controller.rb +0 -14
  12. data/app/controllers/mailbox_controller.rb +0 -14
  13. data/app/controllers/static_controller.rb +0 -14
  14. data/app/controllers/users_controller.rb +0 -14
  15. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +0 -14
  16. data/app/helpers/contact_form_helper.rb +0 -14
  17. data/app/helpers/generic_file_helper.rb +0 -14
  18. data/app/helpers/sufia_helper.rb +0 -14
  19. data/app/helpers/trophy_helper.rb +0 -14
  20. data/app/jobs/content_delete_event_job.rb +0 -14
  21. data/app/jobs/content_deposit_event_job.rb +0 -14
  22. data/app/jobs/content_new_version_event_job.rb +0 -14
  23. data/app/jobs/content_restored_version_event_job.rb +0 -14
  24. data/app/jobs/content_update_event_job.rb +0 -14
  25. data/app/jobs/event_job.rb +0 -14
  26. data/app/jobs/user_edit_profile_event_job.rb +0 -14
  27. data/app/jobs/user_follow_event_job.rb +0 -14
  28. data/app/jobs/user_unfollow_event_job.rb +0 -14
  29. data/app/views/dashboard/_heading.html.erb +1 -0
  30. data/app/views/dashboard/index.html.erb +1 -1
  31. data/app/views/generic_files/_permission_form.html.erb +3 -3
  32. data/db/seeds.rb +0 -14
  33. data/lib/generators/sufia/sufia_generator.rb +18 -85
  34. data/lib/generators/sufia/templates/catalog_controller.rb +0 -14
  35. data/lib/generators/sufia/templates/config/action_dispatch_http_upload_monkey_patch.rb +0 -14
  36. data/lib/generators/sufia/templates/migrations/acts_as_follower_migration.rb +0 -14
  37. data/lib/generators/sufia/templates/migrations/add_avatars_to_users.rb +0 -14
  38. data/lib/generators/sufia/templates/migrations/add_groups_to_users.rb +0 -14
  39. data/lib/generators/sufia/templates/migrations/add_ldap_attrs_to_user.rb +0 -14
  40. data/lib/generators/sufia/templates/migrations/add_social_to_users.rb +0 -14
  41. data/lib/generators/sufia/templates/migrations/create_checksum_audit_logs.rb +0 -14
  42. data/lib/generators/sufia/templates/migrations/create_local_authorities.rb +0 -14
  43. data/lib/generators/sufia/templates/migrations/create_version_committers.rb +0 -14
  44. data/lib/sufia/batch_edits_controller_behavior.rb +1 -1
  45. data/lib/sufia/contact_form_controller_behavior.rb +0 -14
  46. data/lib/sufia/controller.rb +1 -15
  47. data/lib/sufia/downloads_controller_behavior.rb +0 -14
  48. data/lib/sufia/files_controller/upload_complete_behavior.rb +5 -0
  49. data/lib/sufia/files_controller_behavior.rb +3 -17
  50. data/lib/sufia/role_mapper.rb +0 -14
  51. data/lib/sufia/version.rb +1 -1
  52. data/lib/tasks/fixtures.rake +0 -14
  53. data/spec/factories/checksum_audit_logs.rb +0 -14
  54. data/spec/lib/sufia/upload_complete_behavior_spec.rb +10 -0
  55. data/spec/models/access_right_spec.rb +57 -0
  56. data/spec/models/generic_file/visibility_spec.rb +19 -0
  57. data/spec/models/generic_file_spec.rb +44 -28
  58. data/spec/support/uploaded_file_monkeypatch.rb +0 -14
  59. data/sufia-models/app/models/batch.rb +0 -14
  60. data/sufia-models/app/models/checksum_audit_log.rb +1 -1
  61. data/sufia-models/app/models/concerns/sufia/models/access_right.rb +79 -0
  62. data/sufia-models/app/models/concerns/sufia/models/with_access_right.rb +33 -0
  63. data/sufia-models/app/models/datastreams/batch_rdf_datastream.rb +0 -14
  64. data/sufia-models/app/models/datastreams/fits_datastream.rb +0 -14
  65. data/sufia-models/app/models/datastreams/generic_file_rdf_datastream.rb +0 -14
  66. data/sufia-models/app/models/datastreams/properties_datastream.rb +0 -14
  67. data/sufia-models/app/models/domain_term.rb +1 -1
  68. data/sufia-models/app/models/follow.rb +0 -14
  69. data/sufia-models/app/models/generic_file.rb +0 -13
  70. data/sufia-models/app/models/local_authority.rb +1 -1
  71. data/sufia-models/app/models/local_authority_entry.rb +1 -1
  72. data/sufia-models/app/models/single_use_link.rb +1 -1
  73. data/sufia-models/app/models/subject_local_authority_entry.rb +0 -14
  74. data/sufia-models/app/models/trophy.rb +1 -1
  75. data/sufia-models/app/models/version_committer.rb +1 -1
  76. data/sufia-models/lib/generators/sufia/models/install_generator.rb +102 -0
  77. data/sufia-models/lib/generators/sufia/models/templates/config/clamav.rb +1 -0
  78. data/sufia-models/lib/generators/sufia/models/templates/config/mailboxer.rb +17 -0
  79. data/{lib/generators/sufia → sufia-models/lib/generators/sufia/models}/templates/config/redis_config.rb +1 -1
  80. data/{lib/generators/sufia → sufia-models/lib/generators/sufia/models}/templates/config/resque_config.rb +1 -1
  81. data/sufia-models/lib/generators/sufia/models/templates/config/setup_mail.rb +3 -0
  82. data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +81 -0
  83. data/sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb +17 -0
  84. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_avatars_to_users.rb +9 -0
  85. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_groups_to_users.rb +11 -0
  86. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_ldap_attrs_to_user.rb +27 -0
  87. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_social_to_users.rb +13 -0
  88. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb +20 -0
  89. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_local_authorities.rb +50 -0
  90. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_single_use_links.rb +12 -0
  91. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_trophies.rb +10 -0
  92. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_version_committers.rb +15 -0
  93. data/sufia-models/lib/sufia/models/active_record/deprecated_attr_accessible.rb +16 -0
  94. data/sufia-models/lib/sufia/models/engine.rb +1 -2
  95. data/sufia-models/lib/sufia/models/generic_file/permissions.rb +2 -17
  96. data/sufia-models/lib/sufia/models/generic_file/visibility.rb +65 -0
  97. data/sufia-models/lib/sufia/models/generic_file.rb +3 -2
  98. data/sufia-models/lib/sufia/models/id_service.rb +0 -14
  99. data/sufia-models/lib/sufia/models/jobs/audit_job.rb +0 -14
  100. data/sufia-models/lib/sufia/models/jobs/batch_update_job.rb +3 -17
  101. data/sufia-models/lib/sufia/models/jobs/characterize_job.rb +0 -14
  102. data/sufia-models/lib/sufia/models/jobs/resolrize_job.rb +0 -14
  103. data/sufia-models/lib/sufia/models/jobs/unzip_job.rb +0 -14
  104. data/sufia-models/lib/sufia/models/noid.rb +0 -14
  105. data/sufia-models/lib/sufia/models/solr_document_behavior.rb +0 -14
  106. data/sufia-models/lib/sufia/models/user.rb +1 -15
  107. data/sufia-models/lib/sufia/models/utils.rb +0 -14
  108. data/sufia-models/lib/sufia/models/version.rb +1 -1
  109. data/sufia-models/lib/tasks/resque.rake +0 -14
  110. data/sufia-models/sufia-models.gemspec +3 -3
  111. data/tasks/release.rake +2 -1
  112. data/tasks/sufia-db.rake +0 -14
  113. data/tasks/sufia-dev.rake +0 -1
  114. data/tasks/sufia-fixtures.rake +0 -14
  115. data/tasks/sufia.rake +0 -14
  116. metadata +33 -14
  117. data/lib/generators/sufia/templates/config/clamav.rb +0 -14
  118. data/lib/generators/sufia/templates/config/mailboxer.rb +0 -31
  119. data/lib/generators/sufia/templates/config/setup_mail.rb +0 -17
  120. data/lib/generators/sufia/templates/config/sufia.rb +0 -82
  121. /data/{lib/generators/sufia → sufia-models/lib/generators/sufia/models}/templates/config/redis.yml +0 -0
  122. /data/{lib/generators/sufia → sufia-models/lib/generators/sufia/models}/templates/config/resque_admin.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94bdabbd0da949b6909f8a09f6c6db08910fa0d8
4
- data.tar.gz: 363c5ec11e4dc93850a79dbf7cdd8a9a9a231870
3
+ metadata.gz: ffa4a49e5c8afcbf9f0ef5a16f0ed722505de7c0
4
+ data.tar.gz: 255f5e0b340379b077a64e2cee5b1db7d9dfa362
5
5
  SHA512:
6
- metadata.gz: 38714b26c3d16dfcb2ff8da8e03515ecff0bbd9171fb75c568f828aa327e64bbb7b2d0ffea855fbf9286ed64a77098f5e4c114682a6c2b470353ca4b35893006
7
- data.tar.gz: 2c48c93673ec0fc8d540f801a945cf0ac10f0cbc487406ad3ddb91afad2e2a8e2d4e9567627135060cc32fadcb1618d3e06c0f583a15f61c1616322d5f2f9631
6
+ metadata.gz: 46d39fa82b03a024b14b1481c02cd631eb5948e476ea533bc43fcc8b8a52d97f83f6cf1cd1833f8f16960ac7993785653294c08c8e8cd037dd19dcc83de5bf27
7
+ data.tar.gz: 5e2acc470ce6e34839fa45707a2c9174fd34eaa42d64c025c5a8d19dc395023b7f6e925e26b75efae2cc96f1321ab637fd87ac9cb9d97c7e5fc84f326ccaa69c
data/History.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # History of Sufia releases
2
2
 
3
+ ## 3.2.1
4
+ * Updating gemspec to not limit on sufia-models [Jeremy Friesen]
5
+
6
+ ## 3.2.0 - YANKED
7
+ * Including on sufia-models subdir in gemspec [Jeremy Friesen]
8
+ * Restoring the exception catching for migrations [Jeremy Friesen]
9
+ * Publicizing #visibility_changed? [Jeremy Friesen]
10
+ * Indicating attr_accessible is deprecated [Jeremy Friesen]
11
+ * Removing ActiveModel::Dirty [Jeremy Friesen]
12
+ * Upgrading ActiveFedora to latest 6.5 version [Adam Wead]
13
+
14
+ ## 3.1.3
15
+ * Removed old PSU licence [Justin Coyne]
16
+
17
+ * Moved access rights from curate [Justin Coyne]
18
+
19
+ * Adding an operride path where to redirect for when a file gets destroyed.
20
+ [Carolyn Cole]
21
+
22
+ * Use the deprecation settings on the correct module [Justin Coyne]
23
+
24
+
25
+ ## 3.1.2
26
+ * Track changes on visibility [Justin Coyne]
27
+
28
+ * Use an ideomatic setter for visibility [Justin Coyne]
29
+
30
+ * Upgrade mailboxer [Justin Coyne]
31
+
32
+ * Adding a partial for the header of the dashboard to make the wording easier to
33
+ override. [Carolyn Cole]
34
+
35
+ * Improving the better migration template [Jeremy Friesen]
36
+
37
+ ## 3.1.1
38
+ * Extracting sufia generator behavior [Jeremy Friesen]
39
+
40
+ * Don't use Sufia::Engine in the generated initializer [Justin Coyne]
41
+
42
+ * Removed unused code [Justin Coyne]
43
+
44
+ * Changed from a tag to span. fixes #32 [Carolyn Cole]
45
+
46
+
3
47
  ## 3.1.0
4
48
  * Make fits instructions more verbose [Carolyn Cole]
5
49
 
data/SUFIA_VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ 3.2.1
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  require 'rdf'
16
2
  require 'cgi'
17
3
 
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class BatchController < ApplicationController
16
2
  include Hydra::Controller::ControllerBehavior
17
3
  include Hydra::Controller::UploadBehavior
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class ContactFormController < ApplicationController
16
2
  include Sufia::ContactFormControllerBehavior
17
3
  end
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  require 'blacklight/catalog'
16
2
  class DashboardController < ApplicationController
17
3
  include Sufia::DashboardControllerBehavior
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class DirectoryController < ApplicationController
16
2
 
17
3
  # Stub method. Override this in your application if you want directory lookups
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class DownloadsController < ApplicationController
16
2
  # module mixes in normalize_identifier method
17
3
  include Sufia::DownloadsControllerBehavior
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class ErrorsController < ApplicationController
16
2
  def routing
17
3
  render_404("Route not found: /#{params[:error]}")
@@ -1,18 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
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
2
  class GenericFilesController < ApplicationController
17
3
  include Sufia::Controller
18
4
  include Sufia::FilesControllerBehavior
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class MailboxController < ApplicationController
16
2
  before_filter :authenticate_user!
17
3
 
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class StaticController < ApplicationController
16
2
  rescue_from AbstractController::ActionNotFound, :with => :render_404
17
3
  end
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class UsersController < ApplicationController
16
2
  include Sufia::UsersControllerBehavior
17
3
  end
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  module Blacklight::RenderConstraintsHelperBehavior
16
2
 
17
3
  # Render actual constraints, not including header or footer
@@ -1,16 +1,2 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  module ContactFormHelper
16
2
  end
@@ -1,18 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
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
2
  module GenericFileHelper
17
3
  def display_title(gf)
18
4
  gf.to_s
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
 
16
2
  module SufiaHelper
17
3
 
@@ -1,18 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
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
2
  module TrophyHelper
17
3
  def display_trophy_link(user, noid)
18
4
  trophyclass = "trophy-off"
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class ContentDeleteEventJob < EventJob
16
2
 
17
3
 
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class ContentDepositEventJob < EventJob
16
2
  def run
17
3
  gf = GenericFile.find(generic_file_id)
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class ContentNewVersionEventJob < EventJob
16
2
  def run
17
3
  gf = GenericFile.find(generic_file_id)
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class ContentRestoredVersionEventJob < EventJob
16
2
  attr_accessor :revision_id
17
3
 
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class ContentUpdateEventJob < EventJob
16
2
  def run
17
3
  gf = GenericFile.find(generic_file_id)
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class EventJob
16
2
  include Rails.application.routes.url_helpers
17
3
  include ActionView::Helpers
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class UserEditProfileEventJob < EventJob
16
2
  attr_accessor :editor_id
17
3
 
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class UserFollowEventJob < EventJob
16
2
  attr_accessor :follower_id, :followee_id
17
3
 
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  class UserUnfollowEventJob < EventJob
16
2
  attr_accessor :unfollower_id, :unfollowee_id
17
3
 
@@ -0,0 +1 @@
1
+ <h2 class="heading1">My Dashboard</h2>
@@ -70,7 +70,7 @@ limitations under the License.
70
70
  <div class="accessible-hidden" id="current_user"><%=@user.user_key%></div>
71
71
  <div class="row">
72
72
  <%= render :partial => 'search_form' %>
73
- <h2 class="heading1">My Dashboard</h2>
73
+ <%= render :partial => 'heading' %>
74
74
  </div>
75
75
 
76
76
  <% extra_head_content << render_opensearch_response_metadata.html_safe %>
@@ -60,13 +60,13 @@
60
60
  <h3>Visibility - <small>who should have the ability to read and download</small></h3>
61
61
  <div class="controls">
62
62
  <label class="radio">
63
- <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.
63
+ <input type="radio" id="visibility_open" name="visibility" value="<%=Sufia::Models::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>
65
65
  <label class="radio">
66
- <input type="radio" id="visibility_psu" name="visibility" value="psu" <% if !registered_perm.blank? %> checked="true"<% end %> /><span class="label label-info"><%=t('sufia.institution_name') %></span> Visible to all <%=t('sufia.institution_name') %> users.
66
+ <input type="radio" id="visibility_psu" name="visibility" value="<%=Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED %>" <% if !registered_perm.blank? %> checked="true"<% end %> /><span class="label label-info"><%=t('sufia.institution_name') %></span> Visible to all <%=t('sufia.institution_name') %> users.
67
67
  </label>
68
68
  <label class="radio">
69
- <input type="radio" id="visibility_restricted" name="visibility" value="restricted"<% if registered_perm.blank? and public_perm.blank?%> checked="true"<% end %> /> <span class="label label-important">Private</span> Visible to users/groups specified below, if any.
69
+ <input type="radio" id="visibility_restricted" name="visibility" value="<%=Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE %>"<% if registered_perm.blank? and public_perm.blank?%> checked="true"<% end %> /> <span class="label label-important">Private</span> Visible to users/groups specified below, if any.
70
70
  </label>
71
71
  </div><!-- /.controls -->
72
72
  </div><!-- /.control-group -->
data/db/seeds.rb CHANGED
@@ -1,17 +1,3 @@
1
- # Copyright © 2012 The Pennsylvania State University
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
1
  # This file should contain all the record creation needed to seed the database with its default values.
16
2
  # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
17
3
  #