enju_biblio 0.1.0.pre56 → 0.1.0.pre57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/agent_import_files_controller.rb +1 -1
- data/app/controllers/agent_import_results_controller.rb +30 -6
- data/app/controllers/agent_relationship_types_controller.rb +74 -4
- data/app/controllers/agent_relationships_controller.rb +92 -10
- data/app/controllers/agent_types_controller.rb +74 -3
- data/app/controllers/carrier_types_controller.rb +1 -1
- data/app/controllers/content_types_controller.rb +74 -4
- data/app/controllers/countries_controller.rb +66 -4
- data/app/controllers/create_types_controller.rb +74 -3
- data/app/controllers/extents_controller.rb +74 -4
- data/app/controllers/form_of_works_controller.rb +74 -4
- data/app/controllers/frequencies_controller.rb +74 -4
- data/app/controllers/identifier_types_controller.rb +4 -5
- data/app/controllers/import_requests_controller.rb +1 -1
- data/app/controllers/languages_controller.rb +66 -4
- data/app/controllers/licenses_controller.rb +74 -3
- data/app/controllers/manifestation_relationship_types_controller.rb +74 -3
- data/app/controllers/manifestation_relationships_controller.rb +92 -9
- data/app/controllers/medium_of_performances_controller.rb +74 -3
- data/app/controllers/picture_files_controller.rb +34 -10
- data/app/controllers/produce_types_controller.rb +74 -3
- data/app/controllers/realize_types_controller.rb +74 -3
- data/app/controllers/resource_import_files_controller.rb +2 -1
- data/app/controllers/resource_import_results_controller.rb +31 -11
- data/app/models/agent_import_file.rb +1 -1
- data/app/models/agent_import_result.rb +0 -2
- data/app/models/carrier_type.rb +1 -1
- data/app/models/identifier.rb +5 -0
- data/app/models/item.rb +1 -1
- data/app/models/manifestation.rb +13 -8
- data/app/models/resource_import_file.rb +73 -79
- data/app/views/agent_import_files/index.html.erb +1 -0
- data/app/views/agent_relationship_types/index.html.erb +5 -4
- data/app/views/agent_types/index.html.erb +5 -4
- data/app/views/carrier_types/index.html.erb +2 -1
- data/app/views/content_types/index.html.erb +1 -0
- data/app/views/countries/show.html.erb +5 -0
- data/app/views/create_types/index.html.erb +5 -4
- data/app/views/extents/index.html.erb +2 -1
- data/app/views/form_of_works/index.html.erb +2 -1
- data/app/views/frequencies/index.html.erb +2 -1
- data/app/views/identifier_types/index.html.erb +12 -5
- data/app/views/import_requests/index.html.erb +1 -0
- data/app/views/items/show.html.erb +3 -7
- data/app/views/languages/_form.html.erb +19 -4
- data/app/views/languages/index.html.erb +6 -5
- data/app/views/languages/show.html.erb +19 -4
- data/app/views/layouts/manifestations.html.erb +2 -1
- data/app/views/licenses/index.html.erb +2 -1
- data/app/views/manifestation_relationship_types/index.html.erb +5 -4
- data/app/views/manifestations/_call_number.html.erb +1 -1
- data/app/views/manifestations/_edit_detail.html.erb +4 -1
- data/app/views/manifestations/_form.html.erb +5 -5
- data/app/views/manifestations/_show_detail_librarian.html.erb +8 -3
- data/app/views/manifestations/_show_detail_user.html.erb +8 -3
- data/app/views/medium_of_performances/index.html.erb +2 -1
- data/app/views/notifier/manifestation_info.en.text.erb +1 -1
- data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
- data/app/views/picture_files/_index.html.erb +1 -0
- data/app/views/picture_files/_index_agent.html.erb +1 -0
- data/app/views/picture_files/_index_manifestation.html.erb +1 -0
- data/app/views/picture_files/show.html.erb +15 -7
- data/app/views/produce_types/index.html.erb +5 -4
- data/app/views/realize_types/index.html.erb +5 -4
- data/app/views/resource_import_files/index.html.erb +1 -0
- data/app/views/series_statements/_index.html.erb +1 -0
- data/app/views/series_statements/_index_series_statement_merge_list.html.erb +1 -0
- data/config/locales/translation_en.yml +70 -1
- data/config/locales/translation_ja.yml +77 -8
- data/db/migrate/20140817155043_add_extent_of_text_to_manifestation.rb +5 -0
- data/lib/enju_biblio/biblio_helper.rb +13 -0
- data/lib/enju_biblio/engine.rb +0 -2
- data/lib/enju_biblio/version.rb +1 -1
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/content_types.yml +1 -1
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/identifier_types.yml +24 -3
- data/lib/tasks/enju_biblio_tasks.rake +2 -0
- data/lib/tasks/identifier_type.rb +12 -0
- data/lib/tasks/item.rb +1 -1
- data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_send_message_when_import_is_completed.yml +433 -0
- data/spec/controllers/agent_import_files_controller_spec.rb +35 -35
- data/spec/controllers/agent_import_results_controller_spec.rb +11 -11
- data/spec/controllers/agent_relationship_types_controller_spec.rb +51 -51
- data/spec/controllers/agent_relationships_controller_spec.rb +53 -53
- data/spec/controllers/agent_types_controller_spec.rb +15 -15
- data/spec/controllers/agents_controller_spec.rb +96 -96
- data/spec/controllers/carrier_types_controller_spec.rb +15 -15
- data/spec/controllers/content_types_controller_spec.rb +15 -15
- data/spec/controllers/countries_controller_spec.rb +25 -25
- data/spec/controllers/create_types_controller_spec.rb +15 -15
- data/spec/controllers/creates_controller_spec.rb +50 -50
- data/spec/controllers/donates_controller_spec.rb +49 -49
- data/spec/controllers/extents_controller_spec.rb +15 -15
- data/spec/controllers/form_of_works_controller_spec.rb +15 -15
- data/spec/controllers/frequencies_controller_spec.rb +6 -6
- data/spec/controllers/identifier_types_controller_spec.rb +15 -15
- data/spec/controllers/import_requests_controller_spec.rb +50 -50
- data/spec/controllers/items_controller_spec.rb +72 -72
- data/spec/controllers/languages_controller_spec.rb +18 -18
- data/spec/controllers/licenses_controller_spec.rb +15 -15
- data/spec/controllers/manifestation_relationship_types_controller_spec.rb +51 -51
- data/spec/controllers/manifestation_relationships_controller_spec.rb +53 -53
- data/spec/controllers/manifestations_controller_spec.rb +108 -108
- data/spec/controllers/medium_of_performances_controller_spec.rb +15 -15
- data/spec/controllers/owns_controller_spec.rb +52 -52
- data/spec/controllers/picture_files_controller_spec.rb +52 -52
- data/spec/controllers/produce_types_controller_spec.rb +15 -15
- data/spec/controllers/produces_controller_spec.rb +50 -50
- data/spec/controllers/realize_types_controller_spec.rb +15 -15
- data/spec/controllers/realizes_controller_spec.rb +51 -51
- data/spec/controllers/resource_export_files_controller_spec.rb +38 -38
- data/spec/controllers/resource_import_files_controller_spec.rb +38 -38
- data/spec/controllers/resource_import_results_controller_spec.rb +15 -15
- data/spec/controllers/series_statements_controller_spec.rb +54 -54
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +2 -3
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv +19 -19
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv +19 -19
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-53863-1jz1wlr.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-55246-1rvhs1s.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60268-1psjqua.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60996-1cy28m2.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-67507-19qjhj3.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-69234-1cllrec.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-76875-1os6joy.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-1148-136brhb.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-473-1c326dm.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-93795-1x882ik.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94274-1xr9d9e.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94643-1fjcept.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-97947-mfqh5b.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98488-126cvb4.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98849-1lg47mm.txt +147 -0
- data/spec/dummy/solr/test/data/index/segments.gen +0 -0
- data/spec/dummy/solr/test/data/index/segments_5ur +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007580 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007581 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007582 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007583 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007584 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007585 +0 -0
- data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
- data/spec/dummy/tmp/cache/stdout +2554 -0
- data/spec/dummy/tmp/pids/redis-test.pid +1 -1
- data/spec/fixtures/agent_import_results.yml +0 -3
- data/spec/fixtures/carrier_types.yml +16 -16
- data/spec/fixtures/content_types.yml +78 -29
- data/spec/fixtures/frequencies.yml +32 -62
- data/spec/fixtures/manifestations.yml +1 -1
- data/spec/models/agent_import_result_spec.rb +0 -2
- data/spec/models/manifestation_spec.rb +1 -1
- data/spec/models/resource_import_file_spec.rb +30 -3
- data/spec/views/manifestations/show.html.erb_spec.rb +1 -1
- metadata +68 -103
- data/app/views/picture_files/_index_event.html.erb +0 -53
- data/app/views/picture_files/_index_shelf.html.erb +0 -53
- data/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
- data/spec/dummy/solr/test/data/index/_20i.fdt +0 -0
- data/spec/dummy/solr/test/data/index/_20i.fdx +0 -0
- data/spec/dummy/solr/test/data/index/_20i.fnm +0 -0
- data/spec/dummy/solr/test/data/index/_20i.nvd +0 -0
- data/spec/dummy/solr/test/data/index/_20i.nvm +0 -0
- data/spec/dummy/solr/test/data/index/_20i.si +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/test/data/index/_20j.fdt +0 -0
- data/spec/dummy/solr/test/data/index/_20j.fdx +0 -0
- data/spec/dummy/solr/test/data/index/_20j.fnm +0 -0
- data/spec/dummy/solr/test/data/index/_20j.nvd +0 -0
- data/spec/dummy/solr/test/data/index/_20j.nvm +0 -0
- data/spec/dummy/solr/test/data/index/_20j.si +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/test/data/index/_20k.fdt +0 -0
- data/spec/dummy/solr/test/data/index/_20k.fdx +0 -0
- data/spec/dummy/solr/test/data/index/_20k.fnm +0 -0
- data/spec/dummy/solr/test/data/index/_20k.nvd +0 -0
- data/spec/dummy/solr/test/data/index/_20k.nvm +0 -0
- data/spec/dummy/solr/test/data/index/_20k.si +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/test/data/index/segments_2uc +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003680 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003681 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003682 +0 -0
@@ -1,13 +1,83 @@
|
|
1
|
-
class ExtentsController <
|
2
|
-
respond_to :html, :json
|
3
|
-
has_scope :page, default: 1
|
1
|
+
class ExtentsController < ApplicationController
|
4
2
|
load_and_authorize_resource
|
3
|
+
# GET /extents
|
4
|
+
# GET /extents.json
|
5
|
+
def index
|
6
|
+
@extents = Extent.all
|
5
7
|
|
8
|
+
respond_to do |format|
|
9
|
+
format.html # index.html.erb
|
10
|
+
format.json { render json: @extents }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /extents/1
|
15
|
+
# GET /extents/1.json
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # show.html.erb
|
19
|
+
format.json { render json: @extent }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /extents/new
|
24
|
+
# GET /extents/new.json
|
25
|
+
def new
|
26
|
+
@extent = Extent.new
|
27
|
+
|
28
|
+
respond_to do |format|
|
29
|
+
format.html # new.html.erb
|
30
|
+
format.json { render json: @extent }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# GET /extents/1/edit
|
35
|
+
def edit
|
36
|
+
end
|
37
|
+
|
38
|
+
# POST /extents
|
39
|
+
# POST /extents.json
|
40
|
+
def create
|
41
|
+
@extent = Extent.new(params[:extent])
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
if @extent.save
|
45
|
+
format.html { redirect_to @extent, notice: t('controller.successfully_created', model: t('activerecord.models.extent')) }
|
46
|
+
format.json { render json: @extent, status: :created, location: @extent }
|
47
|
+
else
|
48
|
+
format.html { render action: "new" }
|
49
|
+
format.json { render json: @extent.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# PUT /extents/1
|
55
|
+
# PUT /extents/1.json
|
6
56
|
def update
|
7
57
|
if params[:move]
|
8
58
|
move_position(@extent, params[:move])
|
9
59
|
return
|
10
60
|
end
|
11
|
-
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
if @extent.update_attributes(params[:extent])
|
64
|
+
format.html { redirect_to @extent, notice: t('controller.successfully_updated', model: t('activerecord.models.extent')) }
|
65
|
+
format.json { head :no_content }
|
66
|
+
else
|
67
|
+
format.html { render action: "edit" }
|
68
|
+
format.json { render json: @extent.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# DELETE /extents/1
|
74
|
+
# DELETE /extents/1.json
|
75
|
+
def destroy
|
76
|
+
@extent.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to extents_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.extent')) }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
12
82
|
end
|
13
83
|
end
|
@@ -1,13 +1,83 @@
|
|
1
|
-
class FormOfWorksController <
|
2
|
-
respond_to :html, :json
|
3
|
-
has_scope :page, default: 1
|
1
|
+
class FormOfWorksController < ApplicationController
|
4
2
|
load_and_authorize_resource
|
3
|
+
# GET /form_of_works
|
4
|
+
# GET /form_of_works.json
|
5
|
+
def index
|
6
|
+
@form_of_works = FormOfWork.all
|
5
7
|
|
8
|
+
respond_to do |format|
|
9
|
+
format.html # index.html.erb
|
10
|
+
format.json { render json: @form_of_works }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /form_of_works/1
|
15
|
+
# GET /form_of_works/1.json
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # show.html.erb
|
19
|
+
format.json { render json: @form_of_work }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /form_of_works/new
|
24
|
+
# GET /form_of_works/new.json
|
25
|
+
def new
|
26
|
+
@form_of_work = FormOfWork.new
|
27
|
+
|
28
|
+
respond_to do |format|
|
29
|
+
format.html # new.html.erb
|
30
|
+
format.json { render json: @form_of_work }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# GET /form_of_works/1/edit
|
35
|
+
def edit
|
36
|
+
end
|
37
|
+
|
38
|
+
# POST /form_of_works
|
39
|
+
# POST /form_of_works.json
|
40
|
+
def create
|
41
|
+
@form_of_work = FormOfWork.new(params[:form_of_work])
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
if @form_of_work.save
|
45
|
+
format.html { redirect_to @form_of_work, notice: t('controller.successfully_created', model: t('activerecord.models.form_of_work')) }
|
46
|
+
format.json { render json: @form_of_work, status: :created, location: @form_of_work }
|
47
|
+
else
|
48
|
+
format.html { render action: "new" }
|
49
|
+
format.json { render json: @form_of_work.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# PUT /form_of_works/1
|
55
|
+
# PUT /form_of_works/1.json
|
6
56
|
def update
|
7
57
|
if params[:move]
|
8
58
|
move_position(@form_of_work, params[:move])
|
9
59
|
return
|
10
60
|
end
|
11
|
-
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
if @form_of_work.update_attributes(params[:form_of_work])
|
64
|
+
format.html { redirect_to @form_of_work, notice: t('controller.successfully_updated', model: t('activerecord.models.form_of_work')) }
|
65
|
+
format.json { head :no_content }
|
66
|
+
else
|
67
|
+
format.html { render action: "edit" }
|
68
|
+
format.json { render json: @form_of_work.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# DELETE /form_of_works/1
|
74
|
+
# DELETE /form_of_works/1.json
|
75
|
+
def destroy
|
76
|
+
@form_of_work.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to form_of_works_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.form_of_work')) }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
12
82
|
end
|
13
83
|
end
|
@@ -1,13 +1,83 @@
|
|
1
|
-
class FrequenciesController <
|
2
|
-
respond_to :html, :json
|
3
|
-
has_scope :page, default: 1
|
1
|
+
class FrequenciesController < ApplicationController
|
4
2
|
load_and_authorize_resource
|
3
|
+
# GET /frequencies
|
4
|
+
# GET /frequencies.json
|
5
|
+
def index
|
6
|
+
@frequencies = Frequency.all
|
5
7
|
|
8
|
+
respond_to do |format|
|
9
|
+
format.html # index.html.erb
|
10
|
+
format.json { render json: @frequencies }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /frequencies/1
|
15
|
+
# GET /frequencies/1.json
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # show.html.erb
|
19
|
+
format.json { render json: @frequency }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /frequencies/new
|
24
|
+
# GET /frequencies/new.json
|
25
|
+
def new
|
26
|
+
@frequency = Frequency.new
|
27
|
+
|
28
|
+
respond_to do |format|
|
29
|
+
format.html # new.html.erb
|
30
|
+
format.json { render json: @frequency }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# GET /frequencies/1/edit
|
35
|
+
def edit
|
36
|
+
end
|
37
|
+
|
38
|
+
# POST /frequencies
|
39
|
+
# POST /frequencies.json
|
40
|
+
def create
|
41
|
+
@frequency = Frequency.new(params[:frequency])
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
if @frequency.save
|
45
|
+
format.html { redirect_to @frequency, notice: t('controller.successfully_created', model: t('activerecord.models.frequency')) }
|
46
|
+
format.json { render json: @frequency, status: :created, location: @frequency }
|
47
|
+
else
|
48
|
+
format.html { render action: "new" }
|
49
|
+
format.json { render json: @frequency.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# PUT /frequencies/1
|
55
|
+
# PUT /frequencies/1.json
|
6
56
|
def update
|
7
57
|
if params[:move]
|
8
58
|
move_position(@frequency, params[:move])
|
9
59
|
return
|
10
60
|
end
|
11
|
-
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
if @frequency.update_attributes(params[:frequency])
|
64
|
+
format.html { redirect_to @frequency, notice: t('controller.successfully_updated', model: t('activerecord.models.frequency')) }
|
65
|
+
format.json { head :no_content }
|
66
|
+
else
|
67
|
+
format.html { render action: "edit" }
|
68
|
+
format.json { render json: @frequency.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# DELETE /frequencies/1
|
74
|
+
# DELETE /frequencies/1.json
|
75
|
+
def destroy
|
76
|
+
@frequency.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to frequencies_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.frequency')) }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
12
82
|
end
|
13
83
|
end
|
@@ -1,10 +1,9 @@
|
|
1
1
|
class IdentifierTypesController < ApplicationController
|
2
2
|
load_and_authorize_resource
|
3
|
-
|
4
3
|
# GET /identifier_types
|
5
4
|
# GET /identifier_types.json
|
6
5
|
def index
|
7
|
-
@identifier_types = IdentifierType.
|
6
|
+
@identifier_types = IdentifierType.all
|
8
7
|
|
9
8
|
respond_to do |format|
|
10
9
|
format.html # index.html.erb
|
@@ -43,7 +42,7 @@ class IdentifierTypesController < ApplicationController
|
|
43
42
|
|
44
43
|
respond_to do |format|
|
45
44
|
if @identifier_type.save
|
46
|
-
format.html { redirect_to @identifier_type, notice:
|
45
|
+
format.html { redirect_to @identifier_type, notice: t('controller.successfully_created', model: t('activerecord.models.identifier_type')) }
|
47
46
|
format.json { render json: @identifier_type, status: :created, location: @identifier_type }
|
48
47
|
else
|
49
48
|
format.html { render action: "new" }
|
@@ -62,7 +61,7 @@ class IdentifierTypesController < ApplicationController
|
|
62
61
|
|
63
62
|
respond_to do |format|
|
64
63
|
if @identifier_type.update_attributes(params[:identifier_type])
|
65
|
-
format.html { redirect_to @identifier_type, notice:
|
64
|
+
format.html { redirect_to @identifier_type, notice: t('controller.successfully_updated', model: t('activerecord.models.identifier_type')) }
|
66
65
|
format.json { head :no_content }
|
67
66
|
else
|
68
67
|
format.html { render action: "edit" }
|
@@ -77,7 +76,7 @@ class IdentifierTypesController < ApplicationController
|
|
77
76
|
@identifier_type.destroy
|
78
77
|
|
79
78
|
respond_to do |format|
|
80
|
-
format.html { redirect_to identifier_types_url }
|
79
|
+
format.html { redirect_to identifier_types_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.identifier_type')) }
|
81
80
|
format.json { head :no_content }
|
82
81
|
end
|
83
82
|
end
|
@@ -85,7 +85,7 @@ class ImportRequestsController < ApplicationController
|
|
85
85
|
@import_request.destroy
|
86
86
|
|
87
87
|
respond_to do |format|
|
88
|
-
format.html { redirect_to import_requests_url }
|
88
|
+
format.html { redirect_to import_requests_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.import_request')) }
|
89
89
|
format.json { head :no_content }
|
90
90
|
end
|
91
91
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
class LanguagesController <
|
2
|
-
respond_to :html, :json
|
1
|
+
class LanguagesController < ApplicationController
|
3
2
|
load_and_authorize_resource
|
4
|
-
|
3
|
+
# GET /languages
|
4
|
+
# GET /languages.json
|
5
5
|
def index
|
6
6
|
@languages = Language.page(params[:page])
|
7
7
|
|
@@ -11,11 +11,73 @@ class LanguagesController < InheritedResources::Base
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
+
# GET /languages/1
|
15
|
+
# GET /languages/1.json
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # show.html.erb
|
19
|
+
format.json { render json: @language }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /languages/new
|
24
|
+
# GET /languages/new.json
|
25
|
+
def new
|
26
|
+
@language = Language.new
|
27
|
+
|
28
|
+
respond_to do |format|
|
29
|
+
format.html # new.html.erb
|
30
|
+
format.json { render json: @language }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# GET /languages/1/edit
|
35
|
+
def edit
|
36
|
+
end
|
37
|
+
|
38
|
+
# POST /languages
|
39
|
+
# POST /languages.json
|
40
|
+
def create
|
41
|
+
@language = Language.new(params[:language])
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
if @language.save
|
45
|
+
format.html { redirect_to @language, notice: t('controller.successfully_created', model: t('activerecord.models.language')) }
|
46
|
+
format.json { render json: @language, status: :created, location: @language }
|
47
|
+
else
|
48
|
+
format.html { render action: "new" }
|
49
|
+
format.json { render json: @language.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# PUT /languages/1
|
55
|
+
# PUT /languages/1.json
|
14
56
|
def update
|
15
57
|
if params[:move]
|
16
58
|
move_position(@language, params[:move])
|
17
59
|
return
|
18
60
|
end
|
19
|
-
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
if @language.update_attributes(params[:language])
|
64
|
+
format.html { redirect_to @language, notice: t('controller.successfully_updated', model: t('activerecord.models.language')) }
|
65
|
+
format.json { head :no_content }
|
66
|
+
else
|
67
|
+
format.html { render action: "edit" }
|
68
|
+
format.json { render json: @language.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# DELETE /languages/1
|
74
|
+
# DELETE /languages/1.json
|
75
|
+
def destroy
|
76
|
+
@language.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to languages_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.language')) }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
20
82
|
end
|
21
83
|
end
|
@@ -1,12 +1,83 @@
|
|
1
|
-
class LicensesController <
|
2
|
-
respond_to :html, :json
|
1
|
+
class LicensesController < ApplicationController
|
3
2
|
load_and_authorize_resource
|
3
|
+
# GET /licenses
|
4
|
+
# GET /licenses.json
|
5
|
+
def index
|
6
|
+
@licenses = License.all
|
4
7
|
|
8
|
+
respond_to do |format|
|
9
|
+
format.html # index.html.erb
|
10
|
+
format.json { render json: @licenses }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /licenses/1
|
15
|
+
# GET /licenses/1.json
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # show.html.erb
|
19
|
+
format.json { render json: @license }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /licenses/new
|
24
|
+
# GET /licenses/new.json
|
25
|
+
def new
|
26
|
+
@license = License.new
|
27
|
+
|
28
|
+
respond_to do |format|
|
29
|
+
format.html # new.html.erb
|
30
|
+
format.json { render json: @license }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# GET /licenses/1/edit
|
35
|
+
def edit
|
36
|
+
end
|
37
|
+
|
38
|
+
# POST /licenses
|
39
|
+
# POST /licenses.json
|
40
|
+
def create
|
41
|
+
@license = License.new(params[:license])
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
if @license.save
|
45
|
+
format.html { redirect_to @license, notice: t('controller.successfully_created', model: t('activerecord.models.license')) }
|
46
|
+
format.json { render json: @license, status: :created, location: @license }
|
47
|
+
else
|
48
|
+
format.html { render action: "new" }
|
49
|
+
format.json { render json: @license.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# PUT /licenses/1
|
55
|
+
# PUT /licenses/1.json
|
5
56
|
def update
|
6
57
|
if params[:move]
|
7
58
|
move_position(@license, params[:move])
|
8
59
|
return
|
9
60
|
end
|
10
|
-
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
if @license.update_attributes(params[:license])
|
64
|
+
format.html { redirect_to @license, notice: t('controller.successfully_updated', model: t('activerecord.models.license')) }
|
65
|
+
format.json { head :no_content }
|
66
|
+
else
|
67
|
+
format.html { render action: "edit" }
|
68
|
+
format.json { render json: @license.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# DELETE /licenses/1
|
74
|
+
# DELETE /licenses/1.json
|
75
|
+
def destroy
|
76
|
+
@license.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to licenses_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.license')) }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
11
82
|
end
|
12
83
|
end
|
@@ -1,12 +1,83 @@
|
|
1
|
-
class ManifestationRelationshipTypesController <
|
2
|
-
respond_to :html, :json
|
1
|
+
class ManifestationRelationshipTypesController < ApplicationController
|
3
2
|
load_and_authorize_resource
|
3
|
+
# GET /manifestation_relationship_types
|
4
|
+
# GET /manifestation_relationship_types.json
|
5
|
+
def index
|
6
|
+
@manifestation_relationship_types = ManifestationRelationshipType.all
|
4
7
|
|
8
|
+
respond_to do |format|
|
9
|
+
format.html # index.html.erb
|
10
|
+
format.json { render json: @manifestation_relationship_types }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /manifestation_relationship_types/1
|
15
|
+
# GET /manifestation_relationship_types/1.json
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # show.html.erb
|
19
|
+
format.json { render json: @manifestation_relationship_type }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /manifestation_relationship_types/new
|
24
|
+
# GET /manifestation_relationship_types/new.json
|
25
|
+
def new
|
26
|
+
@manifestation_relationship_type = ManifestationRelationshipType.new
|
27
|
+
|
28
|
+
respond_to do |format|
|
29
|
+
format.html # new.html.erb
|
30
|
+
format.json { render json: @manifestation_relationship_type }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# GET /manifestation_relationship_types/1/edit
|
35
|
+
def edit
|
36
|
+
end
|
37
|
+
|
38
|
+
# POST /manifestation_relationship_types
|
39
|
+
# POST /manifestation_relationship_types.json
|
40
|
+
def create
|
41
|
+
@manifestation_relationship_type = ManifestationRelationshipType.new(params[:manifestation_relationship_type])
|
42
|
+
|
43
|
+
respond_to do |format|
|
44
|
+
if @manifestation_relationship_type.save
|
45
|
+
format.html { redirect_to @manifestation_relationship_type, notice: t('controller.successfully_created', model: t('activerecord.models.manifestation_relationship_type')) }
|
46
|
+
format.json { render json: @manifestation_relationship_type, status: :created, location: @manifestation_relationship_type }
|
47
|
+
else
|
48
|
+
format.html { render action: "new" }
|
49
|
+
format.json { render json: @manifestation_relationship_type.errors, status: :unprocessable_entity }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# PUT /manifestation_relationship_types/1
|
55
|
+
# PUT /manifestation_relationship_types/1.json
|
5
56
|
def update
|
6
57
|
if params[:move]
|
7
58
|
move_position(@manifestation_relationship_type, params[:move])
|
8
59
|
return
|
9
60
|
end
|
10
|
-
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
if @manifestation_relationship_type.update_attributes(params[:manifestation_relationship_type])
|
64
|
+
format.html { redirect_to @manifestation_relationship_type, notice: t('controller.successfully_updated', model: t('activerecord.models.manifestation_relationship_type')) }
|
65
|
+
format.json { head :no_content }
|
66
|
+
else
|
67
|
+
format.html { render action: "edit" }
|
68
|
+
format.json { render json: @manifestation_relationship_type.errors, status: :unprocessable_entity }
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# DELETE /manifestation_relationship_types/1
|
74
|
+
# DELETE /manifestation_relationship_types/1.json
|
75
|
+
def destroy
|
76
|
+
@manifestation_relationship_type.destroy
|
77
|
+
|
78
|
+
respond_to do |format|
|
79
|
+
format.html { redirect_to manifestation_relationship_types_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.manifestation_relationship_type')) }
|
80
|
+
format.json { head :no_content }
|
81
|
+
end
|
11
82
|
end
|
12
83
|
end
|
@@ -1,21 +1,104 @@
|
|
1
|
-
class ManifestationRelationshipsController <
|
2
|
-
respond_to :html, :json
|
3
|
-
has_scope :page, default: 1
|
1
|
+
class ManifestationRelationshipsController < ApplicationController
|
4
2
|
load_and_authorize_resource
|
5
|
-
before_filter :
|
3
|
+
before_filter :get_manifestation
|
4
|
+
before_filter :prepare_options, only: [:new, :edit]
|
5
|
+
after_filter :solr_commit, only: [:create, :update, :destroy]
|
6
6
|
|
7
|
+
# GET /manifestation_relationships
|
8
|
+
# GET /manifestation_relationships.json
|
9
|
+
def index
|
10
|
+
case
|
11
|
+
when @manifestation
|
12
|
+
@manifestation_relationships = @manifestation.manifestation_relationships.order('manifestation_relationships.position').page(params[:page])
|
13
|
+
else
|
14
|
+
@manifestation_relationships = ManifestationRelationship.page(params[:page])
|
15
|
+
end
|
16
|
+
|
17
|
+
respond_to do |format|
|
18
|
+
format.html # index.html.erb
|
19
|
+
format.json { render json: @manifestation_relationships }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# GET /manifestation_relationships/1
|
24
|
+
# GET /manifestation_relationships/1.json
|
25
|
+
def show
|
26
|
+
respond_to do |format|
|
27
|
+
format.html # show.html.erb
|
28
|
+
format.json { render json: @manifestation_relationship }
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# GET /manifestation_relationships/new
|
7
33
|
def new
|
34
|
+
if @manifestation.blank?
|
35
|
+
redirect_to manifestations_url
|
36
|
+
return
|
37
|
+
else
|
38
|
+
@manifestation_relationship = ManifestationRelationship.new
|
39
|
+
@manifestation_relationship.manifestation = @manifestation
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# GET /manifestation_relationships/1/edit
|
44
|
+
def edit
|
45
|
+
end
|
46
|
+
|
47
|
+
# POST /manifestation_relationships
|
48
|
+
# POST /manifestation_relationships.json
|
49
|
+
def create
|
8
50
|
@manifestation_relationship = ManifestationRelationship.new(params[:manifestation_relationship])
|
9
|
-
|
10
|
-
|
51
|
+
|
52
|
+
respond_to do |format|
|
53
|
+
if @manifestation_relationship.save
|
54
|
+
format.html { redirect_to @manifestation_relationship, notice: t('controller.successfully_created', model: t('activerecord.models.manifestation_relationship')) }
|
55
|
+
format.json { render json: @manifestation_relationship, status: :created, location: @manifestation_relationship }
|
56
|
+
else
|
57
|
+
prepare_options
|
58
|
+
format.html { render action: "new" }
|
59
|
+
format.json { render json: @manifestation_relationship.errors, status: :unprocessable_entity }
|
60
|
+
end
|
61
|
+
end
|
11
62
|
end
|
12
63
|
|
64
|
+
# PUT /manifestation_relationships/1
|
65
|
+
# PUT /manifestation_relationships/1.json
|
13
66
|
def update
|
14
|
-
|
15
|
-
|
67
|
+
# 並べ替え
|
68
|
+
if @manifestation and params[:move]
|
69
|
+
move_position(@manifestation_relationship, params[:move], false)
|
70
|
+
redirect_to manifestation_relationships_url(manifestation_id: @manifestation_relationship.parent_id)
|
16
71
|
return
|
17
72
|
end
|
18
|
-
|
73
|
+
|
74
|
+
respond_to do |format|
|
75
|
+
if @manifestation_relationship.update_attributes(params[:manifestation_relationship])
|
76
|
+
format.html { redirect_to @manifestation_relationship, notice: t('controller.successfully_updated', model: t('activerecord.models.manifestation_relationship')) }
|
77
|
+
format.json { head :no_content }
|
78
|
+
else
|
79
|
+
prepare_options
|
80
|
+
format.html { render action: "edit" }
|
81
|
+
format.json { render json: @manifestation_relationship.errors, status: :unprocessable_entity }
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# DELETE /manifestation_relationships/1
|
87
|
+
# DELETE /manifestation_relationships/1.json
|
88
|
+
def destroy
|
89
|
+
@manifestation_relationship.destroy
|
90
|
+
|
91
|
+
respond_to do |format|
|
92
|
+
format.html {
|
93
|
+
flash[:notice] = t('controller.successfully_deleted', model: t('activerecord.models.manifestation_relationship'))
|
94
|
+
if @manifestation
|
95
|
+
redirect_to manifestations_url(manifestation_id: @manifestation.id)
|
96
|
+
else
|
97
|
+
redirect_to manifestation_relationships_url
|
98
|
+
end
|
99
|
+
}
|
100
|
+
format.json { head :no_content }
|
101
|
+
end
|
19
102
|
end
|
20
103
|
|
21
104
|
private
|