curate 0.6.4 → 0.6.5
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.
- checksums.yaml +4 -4
- data/app/controllers/curate/organizations_controller.rb +96 -0
- data/app/helpers/curate/organizations_helper.rb +13 -0
- data/app/helpers/curate_helper.rb +4 -0
- data/app/models/concerns/curate/ability.rb +8 -0
- data/app/models/curate/user_behavior/base.rb +13 -0
- data/app/repository_models/collection.rb +1 -0
- data/app/repository_models/curation_concern/model.rb +1 -0
- data/app/repository_models/organization.rb +17 -0
- data/app/repository_models/person.rb +1 -0
- data/app/repository_models/profile_section.rb +1 -0
- data/app/views/curate/organizations/_button_create_organization.html.erb +1 -0
- data/app/views/curate/organizations/_document_list.html.erb +11 -0
- data/app/views/curate/organizations/_form.html.erb +49 -0
- data/app/views/curate/organizations/_organization.html.erb +24 -0
- data/app/views/curate/organizations/edit.html.erb +4 -0
- data/app/views/curate/organizations/index.html.erb +11 -0
- data/app/views/curate/organizations/new.html.erb +4 -0
- data/app/views/curate/organizations/show.html.erb +27 -0
- data/app/views/organizations/_organization.html.erb +30 -0
- data/app/views/shared/_add_content.html.erb +1 -0
- data/lib/curate/rails/routes.rb +1 -0
- data/lib/curate/version.rb +1 -1
- data/lib/generators/curate/application_template.rb +1 -1
- data/lib/generators/curate/curate_generator.rb +3 -0
- data/spec/abilities/generic_file_abilities_spec.rb +12 -0
- data/spec/abilities/generic_work_abilities_spec.rb +12 -0
- data/spec/controllers/curate/organizations_controller_spec.rb +50 -0
- data/spec/factories/organizations_factory.rb +21 -0
- data/spec/internal/Gemfile +4 -22
- data/spec/internal/Gemfile.lock +1 -376
- data/spec/internal/app/assets/javascripts/application.js +0 -4
- data/spec/internal/app/assets/stylesheets/application.css +0 -1
- data/spec/internal/app/controllers/application_controller.rb +0 -9
- data/spec/internal/config/application.rb +0 -6
- data/spec/internal/config/environments/test.rb +1 -2
- data/spec/internal/config/initializers/mime_types.rb +1 -8
- data/spec/internal/config/initializers/secret_token.rb +1 -1
- data/spec/internal/config/locales/en.yml +20 -11
- data/spec/internal/config/routes.rb +0 -8
- data/spec/internal/db/development.sqlite3 +0 -0
- data/spec/internal/db/schema.rb +1 -216
- data/spec/internal/db/test.sqlite3 +0 -0
- data/spec/internal/lib/generators/test_app_generator.rb +2 -23
- data/spec/internal/log/development.log +4 -323
- data/spec/repository_models/organization_spec.rb +66 -0
- metadata +20 -160
- data/spec/internal/app/assets/images/blacklight/bg.png +0 -0
- data/spec/internal/app/assets/images/blacklight/border.png +0 -0
- data/spec/internal/app/assets/images/blacklight/bul_sq_gry.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/checkmark.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/logo.png +0 -0
- data/spec/internal/app/assets/images/blacklight/magnifying_glass.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/remove.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/separator.gif +0 -0
- data/spec/internal/app/assets/images/blacklight/start_over.gif +0 -0
- data/spec/internal/app/models/ability.rb +0 -20
- data/spec/internal/app/models/solr_document.rb +0 -38
- data/spec/internal/app/models/user.rb +0 -23
- data/spec/internal/config/SolrMarc/config-test.properties +0 -37
- data/spec/internal/config/SolrMarc/config.properties +0 -37
- data/spec/internal/config/SolrMarc/index.properties +0 -97
- data/spec/internal/config/SolrMarc/index_scripts/dewey.bsh +0 -47
- data/spec/internal/config/SolrMarc/index_scripts/format.bsh +0 -126
- data/spec/internal/config/SolrMarc/translation_maps/README_MAPS +0 -1
- data/spec/internal/config/SolrMarc/translation_maps/callnumber_map.properties +0 -407
- data/spec/internal/config/SolrMarc/translation_maps/composition_era_map.properties +0 -56
- data/spec/internal/config/SolrMarc/translation_maps/country_map.properties +0 -379
- data/spec/internal/config/SolrMarc/translation_maps/format_map.properties +0 -50
- data/spec/internal/config/SolrMarc/translation_maps/instrument_map.properties +0 -101
- data/spec/internal/config/SolrMarc/translation_maps/language_map.properties +0 -490
- data/spec/internal/config/doi.yml +0 -5
- data/spec/internal/config/fedora.yml +0 -14
- data/spec/internal/config/initializers/action_dispatch_http_upload_monkey_patch.rb +0 -12
- data/spec/internal/config/initializers/curate_config.rb +0 -24
- data/spec/internal/config/initializers/devise.rb +0 -254
- data/spec/internal/config/initializers/hydra-remote_identifier_config.rb +0 -29
- data/spec/internal/config/initializers/hydra_config.rb +0 -28
- data/spec/internal/config/initializers/mailboxer.rb +0 -17
- data/spec/internal/config/initializers/redis_config.rb +0 -32
- data/spec/internal/config/initializers/resque_admin.rb +0 -10
- data/spec/internal/config/initializers/resque_config.rb +0 -5
- data/spec/internal/config/initializers/sufia.rb +0 -81
- data/spec/internal/config/jetty.yml +0 -5
- data/spec/internal/config/locales/devise.en.yml +0 -59
- data/spec/internal/config/recipients_list.yml +0 -2
- data/spec/internal/config/redis.yml +0 -6
- data/spec/internal/config/role_map_cucumber.yml +0 -10
- data/spec/internal/config/role_map_development.yml +0 -12
- data/spec/internal/config/role_map_production.yml +0 -2
- data/spec/internal/config/role_map_test.yml +0 -15
- data/spec/internal/config/solr.yml +0 -10
- data/spec/internal/db/migrate/20140131175455_devise_create_users.rb +0 -42
- data/spec/internal/db/migrate/20140131175500_add_devise_guests_to_users.rb +0 -15
- data/spec/internal/db/migrate/20140131175501_create_searches.rb +0 -16
- data/spec/internal/db/migrate/20140131175502_create_bookmarks.rb +0 -18
- data/spec/internal/db/migrate/20140131175503_remove_editable_fields_from_bookmarks.rb +0 -12
- data/spec/internal/db/migrate/20140131175504_add_user_types_to_bookmarks_searches.rb +0 -16
- data/spec/internal/db/migrate/20140131175505_acts_as_follower_migration.rb +0 -17
- data/spec/internal/db/migrate/20140131175506_add_social_to_users.rb +0 -13
- data/spec/internal/db/migrate/20140131175507_create_single_use_links.rb +0 -12
- data/spec/internal/db/migrate/20140131175508_add_ldap_attrs_to_user.rb +0 -27
- data/spec/internal/db/migrate/20140131175509_add_avatars_to_users.rb +0 -9
- data/spec/internal/db/migrate/20140131175510_create_checksum_audit_logs.rb +0 -20
- data/spec/internal/db/migrate/20140131175511_create_version_committers.rb +0 -15
- data/spec/internal/db/migrate/20140131175512_add_groups_to_users.rb +0 -11
- data/spec/internal/db/migrate/20140131175513_create_local_authorities.rb +0 -50
- data/spec/internal/db/migrate/20140131175514_create_trophies.rb +0 -10
- data/spec/internal/db/migrate/20140131175536_create_mailboxer.mailboxer_engine.rb +0 -62
- data/spec/internal/db/migrate/20140131175537_add_notified_object.mailboxer_engine.rb +0 -18
- data/spec/internal/db/migrate/20140131175538_add_notification_code.mailboxer_engine.rb +0 -14
- data/spec/internal/db/migrate/20140131175539_add_attachments.mailboxer_engine.rb +0 -10
- data/spec/internal/db/migrate/20140131175540_rename_receipts_read.mailboxer_engine.rb +0 -10
- data/spec/internal/db/migrate/20140131175541_add_global_notification_support.mailboxer_engine.rb +0 -10
- data/spec/internal/db/migrate/20140131175545_add_terms_of_service_to_user.curate_engine.rb +0 -6
- data/spec/internal/db/migrate/20140131175546_add_user_force_update_profile.curate_engine.rb +0 -9
- data/spec/internal/db/migrate/20140131175547_create_help_requests.curate_engine.rb +0 -23
- data/spec/internal/db/migrate/20140131175548_add_repository_id_to_user.curate_engine.rb +0 -7
- data/spec/internal/db/migrate/20140131175549_create_curate_proxy_deposit_rights.curate_engine.rb +0 -12
- data/spec/internal/db/migrate/20140131175550_change_display_name_to_name.curate_engine.rb +0 -7
- data/spec/internal/fedora_conf/conf/development/fedora.fcfg +0 -953
- data/spec/internal/fedora_conf/conf/test/fedora.fcfg +0 -953
- data/spec/internal/solr_conf/conf/schema.xml +0 -273
- data/spec/internal/solr_conf/conf/solrconfig.xml +0 -167
- data/spec/internal/solr_conf/solr.xml +0 -35
- data/spec/internal/test/models/user_test.rb +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fa358950a239086a07e5b88759c3eaedda3e6c1
|
|
4
|
+
data.tar.gz: 5e456c912433755c7efd0eb7deba3143ecde8117
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb47c5e65196b02aa49c6cb0758f551b58b84b0cb26c09bc26570aaca675cdc518146f6e898c544ffa1f60f27a44f274f844f524b600597c2ee1cc9b9aa543ea
|
|
7
|
+
data.tar.gz: 021f90b2c9a230eb6b56322ee15ef5d9a0d85a38c6e8a787aceaad95d33c7c6d09294403e43413b1a11acd603246896e42e11057f132ec7e9516070787812385
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
class Curate::OrganizationsController < ApplicationController
|
|
2
|
+
include Blacklight::Catalog
|
|
3
|
+
include Hydra::CollectionsControllerBehavior
|
|
4
|
+
include Hydra::AccessControlsEnforcement
|
|
5
|
+
include Sufia::Noid
|
|
6
|
+
|
|
7
|
+
Curate::OrganizationsController.solr_search_params_logic += [:only_organizations]
|
|
8
|
+
|
|
9
|
+
prepend_before_filter :normalize_identifier, only: [:show]
|
|
10
|
+
respond_to(:html)
|
|
11
|
+
with_themed_layout '1_column'
|
|
12
|
+
|
|
13
|
+
add_breadcrumb 'Organizations', lambda {|controller| controller.request.path }
|
|
14
|
+
|
|
15
|
+
before_filter :load_and_authorize_organization, only: [:show, :edit, :delete, :update]
|
|
16
|
+
before_filter :authenticate_user!, except: :show
|
|
17
|
+
before_filter :agreed_to_terms_of_service!
|
|
18
|
+
before_filter :force_update_user_profile!
|
|
19
|
+
|
|
20
|
+
def index
|
|
21
|
+
super
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def new
|
|
25
|
+
@organization = Organization.new
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def create
|
|
29
|
+
@organization = Organization.new(params[:organization])
|
|
30
|
+
@organization.apply_depositor_metadata(current_user.user_key)
|
|
31
|
+
if @organization.save
|
|
32
|
+
flash[:notice] = "Organization created successfully."
|
|
33
|
+
redirect_to organizations_path
|
|
34
|
+
else
|
|
35
|
+
flash[:error] = "Organization was not created."
|
|
36
|
+
render action: :new
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def update
|
|
41
|
+
@orgnization = Organization.find(params[:id])
|
|
42
|
+
if @organization.update_attributes(params[:organization])
|
|
43
|
+
flash[:notice] = "Ogranization updated successfully."
|
|
44
|
+
redirect_to organization_path(@organization)
|
|
45
|
+
else
|
|
46
|
+
flash[:error] = "Organization was not updated."
|
|
47
|
+
render action: :edit
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def destroy
|
|
52
|
+
@organization = Organization.find(params[:id])
|
|
53
|
+
title = @organization.to_s
|
|
54
|
+
@organization.destroy
|
|
55
|
+
after_destroy_response(title)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def after_destroy_response(title)
|
|
59
|
+
flash[:notice] = "Deleted #{title}"
|
|
60
|
+
respond_with { |wants|
|
|
61
|
+
wants.html { redirect_to catalog_index_path }
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
protected :after_destroy_response
|
|
65
|
+
|
|
66
|
+
private
|
|
67
|
+
|
|
68
|
+
def load_and_authorize_organization
|
|
69
|
+
id = id_from_params(:id)
|
|
70
|
+
return nil unless id
|
|
71
|
+
@organization = ActiveFedora::Base.find(id, cast: true)
|
|
72
|
+
authorize! :update, @organization
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def id_from_params(key)
|
|
76
|
+
if params[key] && !params[key].empty?
|
|
77
|
+
params[key]
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def organizations
|
|
82
|
+
self
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
### Turn off this filter query if it's the index action
|
|
86
|
+
def include_collection_ids(solr_parameters, user_parameters)
|
|
87
|
+
return if params[:action] == 'index'
|
|
88
|
+
super
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def only_organizations(solr_parameters, user_parameters)
|
|
92
|
+
solr_parameters[:fq] ||= []
|
|
93
|
+
solr_parameters[:fq] << "has_model_ssim:\"info:fedora/afmodel:Organization\""
|
|
94
|
+
return solr_parameters
|
|
95
|
+
end
|
|
96
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module Curate::OrganizationsHelper
|
|
2
|
+
|
|
3
|
+
# Displays the Organizations create organization button.
|
|
4
|
+
def button_for_create_new_organization(label = 'Create Organization')
|
|
5
|
+
render partial: 'button_create_organization', locals:{label:label}
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def has_any_organizations?
|
|
9
|
+
#false
|
|
10
|
+
current_user.organizations.count > 0 if current_user
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
end
|
|
@@ -7,6 +7,14 @@ module Curate
|
|
|
7
7
|
|
|
8
8
|
def curate_permissions
|
|
9
9
|
alias_action :confirm, :copy, :to => :update
|
|
10
|
+
if current_user.manager?
|
|
11
|
+
can [:edit, :update, :destroy], :all
|
|
12
|
+
cannot [:edit, :update, :destroy], Person
|
|
13
|
+
cannot [:edit, :update, :destroy], Profile do |p|
|
|
14
|
+
p.pid != current_user.profile.pid
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
10
18
|
can :edit, Person do |p|
|
|
11
19
|
p.pid == current_user.repository_id
|
|
12
20
|
end
|
|
@@ -19,10 +19,23 @@ module Curate
|
|
|
19
19
|
Collection.where(Hydra.config[:permissions][:edit][:individual] => user_key)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def organizations
|
|
23
|
+
Organization.where(Hydra.config[:permissions][:edit][:individual] => user_key)
|
|
24
|
+
end
|
|
25
|
+
|
|
22
26
|
def get_value_from_ldap(attribute)
|
|
23
27
|
# override
|
|
24
28
|
end
|
|
25
29
|
|
|
30
|
+
def manager?
|
|
31
|
+
username = self.respond_to?(:username) ? self.username : self.to_s
|
|
32
|
+
!!manager_usernames.include?(username)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def manager_usernames
|
|
36
|
+
@manager_usernames ||= YAML.load(ERB.new(Rails.root.join('config/manager_usernames.yml').read).result)[Rails.env]['manager_usernames']
|
|
37
|
+
end
|
|
38
|
+
|
|
26
39
|
def name
|
|
27
40
|
read_attribute(:name) || user_key
|
|
28
41
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class Organization < ActiveFedora::Base
|
|
2
|
+
include Hydra::Collection
|
|
3
|
+
include CurationConcern::CollectionModel
|
|
4
|
+
include Hydra::AccessControls::Permissions
|
|
5
|
+
include Hydra::AccessControls::WithAccessRight
|
|
6
|
+
include Sufia::Noid
|
|
7
|
+
|
|
8
|
+
# An organization cannot be a member of any other type of collection.
|
|
9
|
+
def can_be_member_of_collection?(collection)
|
|
10
|
+
false
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def to_s
|
|
14
|
+
title
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= button_to label, new_organization_path, :method=>:get, :class=>"btn btn-primary collection-add submits-batches", 'data-behavior'=>'hydra-collections', :id=>'hydra-organization-add' %>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<div class="container">
|
|
2
|
+
<%-# This syntax [collections, @collection] tells form_for to use the routes from the engine named collections %>
|
|
3
|
+
<%= form_for @organization do |f| %>
|
|
4
|
+
<% if @organization.errors.any? %>
|
|
5
|
+
<div id="error_explanation">
|
|
6
|
+
<h2><%= pluralize(@organization.errors.count, "error") %> prohibited this topic from being saved:</h2>
|
|
7
|
+
|
|
8
|
+
<ul>
|
|
9
|
+
<% @organization.errors.full_messages.each do |msg| %>
|
|
10
|
+
<li><%= msg %></li>
|
|
11
|
+
<% end %>
|
|
12
|
+
</ul>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
|
15
|
+
|
|
16
|
+
<%#
|
|
17
|
+
NOTE: We're just making it _look_ like we're using simple_form here. Refactor at will.
|
|
18
|
+
ALSO: Title isn't _actually_ required. The form is lying (but it means well and is probably right).
|
|
19
|
+
%>
|
|
20
|
+
<div class="control-group string required organization_title">
|
|
21
|
+
<span class="control-label">
|
|
22
|
+
<label class="string required" for="organization_title">
|
|
23
|
+
<abbr title="" data-original-title="required">*</abbr> Title
|
|
24
|
+
</label>
|
|
25
|
+
</span>
|
|
26
|
+
<div class="controls">
|
|
27
|
+
<%= f.text_field :title, class: 'string required input-xlarge', required: 'required', :'aria-required' => 'true' %>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="control-group string required collection_description">
|
|
32
|
+
<span class="control-label">
|
|
33
|
+
<%= f.label :description %>
|
|
34
|
+
</span>
|
|
35
|
+
<div class="controls">
|
|
36
|
+
<%= f.text_area :description, class: 'text input-xxlarge' %>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="form-actions">
|
|
41
|
+
<%= f.submit class: 'btn btn-primary' %>
|
|
42
|
+
<%- if @organization.persisted? -%>
|
|
43
|
+
<%= link_to 'Cancel', organization_path(@organization), class: 'btn btn-link' %>
|
|
44
|
+
<% else %>
|
|
45
|
+
<%= link_to 'Cancel', root_path, class: 'btn btn-link' %>
|
|
46
|
+
<% end %>
|
|
47
|
+
</div>
|
|
48
|
+
<% end %>
|
|
49
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<tr>
|
|
2
|
+
<td>
|
|
3
|
+
<%= link_to organization.title, organization_path(organization) %>
|
|
4
|
+
</td>
|
|
5
|
+
<td>
|
|
6
|
+
<% if can? :edit, organization %>
|
|
7
|
+
|
|
8
|
+
<%= button_to(
|
|
9
|
+
"Delete",
|
|
10
|
+
{
|
|
11
|
+
action: :destroy,
|
|
12
|
+
controller: :organizations,
|
|
13
|
+
id: organization.id
|
|
14
|
+
},
|
|
15
|
+
data: {confirm: 'Are you sure you want to delete this organization?'},
|
|
16
|
+
class: 'btn',
|
|
17
|
+
form_class: 'button-to pull-right',
|
|
18
|
+
method: :delete
|
|
19
|
+
)%>
|
|
20
|
+
|
|
21
|
+
<%= link_to "Edit", edit_organization_path(organization), class: 'btn pull-right' %>
|
|
22
|
+
<% end %>
|
|
23
|
+
</td>
|
|
24
|
+
</tr>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%- if has_any_organizations? %>
|
|
2
|
+
<%= render_document_index %>
|
|
3
|
+
<%- else %>
|
|
4
|
+
<div class="span12 main-header">
|
|
5
|
+
<p>You have no organizations yet.</p>
|
|
6
|
+
</div>
|
|
7
|
+
<%- end %>
|
|
8
|
+
|
|
9
|
+
<% if can? :create, Organization %>
|
|
10
|
+
<%= button_for_create_new_organization %>
|
|
11
|
+
<% end %>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<% content_for :page_title, curation_concern_page_title(@organization) %>
|
|
2
|
+
<% content_for :page_header do %>
|
|
3
|
+
<h1> <%= @organization.title %> </h1>
|
|
4
|
+
<% end %>
|
|
5
|
+
<% if can? :edit, @organization %>
|
|
6
|
+
<% content_for :page_actions do %>
|
|
7
|
+
|
|
8
|
+
<%= button_to(
|
|
9
|
+
"Delete",
|
|
10
|
+
{
|
|
11
|
+
action: :destroy,
|
|
12
|
+
controller: :organizations,
|
|
13
|
+
id: @organization.id
|
|
14
|
+
},
|
|
15
|
+
data: {confirm: 'Are you sure you want to delete this organization?'},
|
|
16
|
+
class: 'btn',
|
|
17
|
+
form_class: 'button-to pull-right',
|
|
18
|
+
method: :delete
|
|
19
|
+
)%>
|
|
20
|
+
|
|
21
|
+
<%= link_to 'Edit', edit_organization_path(@organization), class: 'btn' %>
|
|
22
|
+
<% end %>
|
|
23
|
+
<% end %>
|
|
24
|
+
<div class="organization-description">
|
|
25
|
+
<%= @organization.description %>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<%# This is a search result view %>
|
|
2
|
+
<% noid = organization.noid %>
|
|
3
|
+
<% solr_doc = organization.inner_object.solr_doc %>
|
|
4
|
+
<li id="document_<%= noid %>" class="search-result">
|
|
5
|
+
|
|
6
|
+
<%= render :partial => 'catalog/_index_partials/identifier_and_action', locals: { document: organization, counter: organization_counter, title_link_target: organization, edit_path: edit_organization_path(organization), solr_doc: solr_doc } %>
|
|
7
|
+
|
|
8
|
+
<div class="row-fluid">
|
|
9
|
+
|
|
10
|
+
<div class="span2">
|
|
11
|
+
<%= render :partial => 'catalog/_index_partials/thumbnail_display', locals: {document: organization} %>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="span10">
|
|
15
|
+
<dl class="attribute-list">
|
|
16
|
+
<% if solr_doc.has?('desc_metadata__description_tesim') %>
|
|
17
|
+
<dt>Description:</dt>
|
|
18
|
+
<dd><%= truncate(render_index_field_value(document: solr_doc, field: 'desc_metadata__description_tesim'), length: 150) %></dd>
|
|
19
|
+
<% end %>
|
|
20
|
+
|
|
21
|
+
<% if solr_doc.has?('edit_access_person_ssim') %>
|
|
22
|
+
<dt>Owner:</dt>
|
|
23
|
+
<dd><%= render_index_field_value(document: solr_doc, field: 'edit_access_person_ssim') %></dd>
|
|
24
|
+
<% end %>
|
|
25
|
+
</dl>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
</li>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
</li>
|
|
21
21
|
<li class="divider"></li>
|
|
22
22
|
<li><%= link_to 'Add a Collection', new_collection_path, class: 'menu-heading new-collection', role: 'menuitem' %></li>
|
|
23
|
+
<li><%= link_to 'Add an Organization', new_organization_path, class: 'menu-heading new-collection', role: 'menuitem' %></li>
|
|
23
24
|
</ul>
|
|
24
25
|
</div>
|
|
25
26
|
|
data/lib/curate/rails/routes.rb
CHANGED
data/lib/curate/version.rb
CHANGED
|
@@ -95,6 +95,9 @@ This generator makes the following changes to your application:
|
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
+
def create_manager_usernames
|
|
99
|
+
create_file('config/manager_usernames.yml', "development:\n manager_usernames:\n - manager@example.com\ntest:\n manager_usernames:\n - manager@example.com\nproduction:\n manager_usernames:\n - manager@example.com\n")
|
|
100
|
+
end
|
|
98
101
|
|
|
99
102
|
def create_recipients_list
|
|
100
103
|
create_file('config/recipients_list.yml', "---\n- hello@world.com\n")
|