worthwhile 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -3
  3. data/README.md +2 -0
  4. data/app/assets/stylesheets/worthwhile/_worthwhile.css.scss +2 -0
  5. data/app/helpers/curate/collections_helper.rb +17 -117
  6. data/app/helpers/worthwhile/collections_helper.rb +15 -4
  7. data/app/views/catalog/_action_menu_partials/_default.html.erb +1 -1
  8. data/app/views/catalog/index.html.erb +5 -6
  9. data/app/views/collections/_form.html.erb +1 -1
  10. data/app/views/collections/_form_representative_image.html.erb +13 -0
  11. data/app/views/collections/edit.html.erb +7 -12
  12. data/app/views/collections/new.html.erb +9 -11
  13. data/app/views/curate/collections/_add_to_collection_modal.html.erb +2 -2
  14. data/app/views/curation_concern/base/_form_descriptive_fields.erb +1 -13
  15. data/app/views/curation_concern/base/_form_editors.html.erb +15 -0
  16. data/app/views/curation_concern/base/edit.html.erb +10 -12
  17. data/app/views/curation_concern/base/new.html.erb +9 -11
  18. data/app/views/curation_concern/base/show.html.erb +15 -19
  19. data/app/views/curation_concern/generic_files/edit.html.erb +2 -2
  20. data/app/views/curation_concern/generic_files/show.html.erb +3 -3
  21. data/app/views/curation_concern/linked_resources/edit.html.erb +2 -2
  22. data/app/views/curation_concern/linked_resources/new.html.erb +2 -2
  23. data/app/views/embargoes/edit.html.erb +1 -1
  24. data/app/views/layouts/curate_nd/1_column.html.erb +1 -12
  25. data/app/views/layouts/curate_nd/catalog.html.erb +1 -2
  26. data/app/views/layouts/curate_nd.html.erb +2 -13
  27. data/app/views/leases/edit.html.erb +1 -1
  28. data/app/views/worthwhile/classify_concerns/new.html.erb +3 -5
  29. data/config/locales/sufia.en.yml +2 -2
  30. data/lib/generators/worthwhile/install_generator.rb +6 -1
  31. data/lib/generators/worthwhile/templates/worthwhile.css.scss +0 -2
  32. data/lib/worthwhile/rails/routes.rb +4 -5
  33. data/lib/worthwhile/version.rb +1 -1
  34. data/spec/controllers/collections_controller_spec.rb +1 -1
  35. data/spec/controllers/curation_concern/permissions_controller_spec.rb +3 -3
  36. data/spec/controllers/downloads_controller_spec.rb +2 -2
  37. data/spec/controllers/worthwhile/classify_concerns_controller_spec.rb +19 -11
  38. data/spec/features/collection_spec.rb +48 -48
  39. data/spec/helpers/worthwhile/collections_helper_spec.rb +19 -0
  40. data/spec/matchers/metadata_field_matchers.rb +3 -3
  41. data/spec/models/collection_spec.rb +23 -23
  42. data/spec/models/curation_concern/collection_model_spec.rb +2 -2
  43. data/spec/models/worthwhile/content_version_spec.rb +2 -2
  44. data/spec/models/worthwhile/linked_resource_spec.rb +8 -8
  45. data/spec/routing/worthwhile/routes_spec.rb +2 -3
  46. data/spec/spec_helper.rb +5 -11
  47. data/spec/views/collections/_form_representative_image.html.erb_spec.rb +20 -0
  48. data/spec/views/curation_concern/base/_attributes.html.erb_spec.rb +3 -3
  49. data/spec/views/curation_concern/base/show.html.erb_spec.rb +13 -9
  50. metadata +8 -7
  51. data/app/assets/stylesheets/worthwhile.css.scss +0 -23
  52. data/app/views/curate/collections/add_member_form.html.erb +0 -6
  53. data/app/views/layouts/common_objects.html.erb +0 -36
  54. data/app/views/layouts/curate_nd/2_column.html.erb +0 -26
  55. data/app/views/layouts/curate_nd/dashboard.html.erb +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99fe1f3999559e6ebe5f243a20805860f628bd43
4
- data.tar.gz: ead1fe02d3000867e4e0fb14d9dee96e6ec22b0f
3
+ metadata.gz: c4c58026a32aa117482c5e835c44345fe584aab5
4
+ data.tar.gz: 4f92bd0400af9f3ba865912f05cd449296879683
5
5
  SHA512:
6
- metadata.gz: 2a5985f9051d774cf571c3ea6b91528ac138cf0301ef15240f95114fff5f73c7de9b730474365c01d554bb7d2ffe111d141b865e77de59450b2418ea2f52f0c4
7
- data.tar.gz: 68ca47870dd430304eb046f9cd400f157b5d39a60ccf1954ac3d638004a0d8e82d17db2c6d1f397628c7b5cdb9719acc229aaeb25ad5b977e23cb49ac4b50b84
6
+ metadata.gz: 35ff3444a2217820c5c0e8809b47d6679d18ad985cf132a5ce1580ba15906aed9cec2fa5a49a9673c736e46fde8e1c2a6126ae6473a2f1c0506cfeb0d5c94b31
7
+ data.tar.gz: d14bf772ef5c92cf1c37b8434d17ca5d26fe9cddc3adf2fc5e33fe4906b1813ca7dbc124f8329b2d717c630c4816279d4651d09c4925e94fe55eb2125a22ad54
data/Gemfile CHANGED
@@ -7,9 +7,8 @@ gem 'byebug' unless ENV['TRAVIS']
7
7
  gem 'sass-rails', '~> 4.0.3'
8
8
 
9
9
  group :test do
10
- # Peg simplecov to < 0.8 until this is resolved:
11
- # https://github.com/colszowka/simplecov/issues/281
12
- gem 'simplecov', '~> 0.7.1', require: false
10
+ gem 'simplecov', '~> 0.9', require: false
11
+ gem 'coveralls', require: false
13
12
  gem 'poltergeist'
14
13
  end
15
14
 
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
1
  # Worthwhile
2
+ [![Build Status](https://travis-ci.org/curationexperts/worthwhile.svg?branch=master)](https://travis-ci.org/curationexperts/worthwhile)
3
+ [![Coverage Status](https://img.shields.io/coveralls/curationexperts/worthwhile.svg)](https://coveralls.io/r/curationexperts/worthwhile?branch=master)
2
4
 
3
5
  A very simple extensible IR platform for Hydra
4
6
 
@@ -1,3 +1,5 @@
1
+ @import 'bootstrap-sprockets';
2
+ @import 'bootstrap';
1
3
  @import "bootstrap/variables";
2
4
  @import 'worthwhile/variables_bootstrap';
3
5
  @import "worthwhile/global-variables";
@@ -1,133 +1,33 @@
1
- #require Hydra::Collections::Engine.root + '/app/helpers/collections_helper.rb'
2
1
  # View Helpers for Hydra Collections functionality
3
- module Curate::CollectionsHelper
4
-
5
- # Displays the Collections create collection button.
6
- def button_for_create_new_collection(label = 'Create Collection')
7
- render partial: 'button_create_collection', locals:{label:label}
8
- end
2
+ module Curate::CollectionsHelper
9
3
 
10
4
  def button_for_remove_item_from_collection(document, collection, label = 'Remove From Collection')
11
- render partial:'/curate/collections/button_remove_from_collection', locals:{collection:collection, label:label, document:document}
12
- end
13
-
14
- def hidden_collection_members
15
- _erbout = ''
16
- if params[:batch_document_ids].present?
17
- params[:batch_document_ids].each do |batch_item|
18
- _erbout.concat hidden_field_tag("batch_document_ids[]", batch_item)
19
- end
20
- end
21
- _erbout.html_safe
22
- end
23
-
24
- def has_any_collections?
25
- current_user.collections.count > 0 if current_user
26
- end
27
-
28
- # 'terminate' indicates whether to drill down and display the content of collections within the given collection
29
- # (i.e. recurse by calling list_items_in_collection on collections within the given collection).
30
- #
31
- # 'options' hash may include the following:
32
- # :display_contributors - boolean - Indicates whether to display a list of contributors next to the work/collection title.
33
- # Default is true. When omitted from options hash or present and set to true, the contributors will be listed.
34
- # When set to false, the contributors are not listed.
35
- def list_items_in_collection(collection, terminate=false, options={})
36
- content_tag :ul, class: 'collection-listing' do
37
- collection.members.inject('') do |output, member|
38
- output << member_line_item(collection, member, terminate, options)
39
- end.html_safe
40
- end
5
+ render partial: '/curate/collections/button_remove_from_collection', locals: {
6
+ collection: collection, label: label, document: document
7
+ }
41
8
  end
42
9
 
43
- def member_line_item(collection, member, terminate, options={})
44
- if can? :read, member
45
- content_tag :li, class: line_item_class(collection), data: { noid: member.noid }do
46
- markup = member.respond_to?(:members) ? collection_line_item(member, terminate, options) : work_line_item(member, options)
47
-
48
- if can? :edit, collection
49
- markup << collection_member_actions(collection, member)
50
- end
51
-
52
- markup
53
- end
10
+ def available_collections(item = nil)
11
+ if item.present?
12
+ collection_options.reject {|n| n == item}
54
13
  else
55
- ""
14
+ collection_options
56
15
  end
57
16
  end
58
17
 
59
- def line_item_class(collection)
60
- css_class = 'collection-member'
61
- css_class << ' with-controls' if can? :edit, collection
62
- css_class
63
- end
64
-
65
- def work_line_item(work, options={})
66
- link = link_to work.to_s, polymorphic_path_for_asset(work)
67
- link = link + ' ' + contributors(work) if options.fetch(:display_contributors, true)
68
- link
69
- end
18
+ private
70
19
 
71
- def collection_line_item(collection, terminate, options={})
72
- # A collection listed as a terminal (terminate is true) member of another collection gets a
73
- # normal-sized (<p>) font versus a collection heading-sized (<h3>) font.
74
- headertag = terminate ? :p : :h3
75
- list_item = content_tag headertag, class: 'collection-section-heading' do
76
- link_to collection.to_s, collection_path(collection)
77
- end
78
- if collection.description.present?
79
- list_item << content_tag( :div, collection.description, class: 'collection-section-description')
20
+ def collection_options
21
+ @collection_options ||= current_users_collections
80
22
  end
81
- list_item << list_items_in_collection(collection, true, options) unless terminate # limit nesting
82
- list_item
83
- end
84
23
 
85
- def contributors(work)
86
- if work.respond_to?(:contributor)
87
- "(#{work.contributor.to_a.join(', ')})"
88
- else
89
- ''
90
- end
91
- end
92
-
93
- def collection_member_actions(collection, member)
94
- content_tag :span, class: 'collection-member-actions' do
95
- if member.respond_to?(:members)
96
- markup = actions_for_member(collection, member)
24
+ # Defaults to returning a list of all collections.
25
+ # If you have implement User.collections, the results of that will be used.
26
+ def current_users_collections
27
+ if current_user.respond_to?(:collections)
28
+ current_user.collections.to_a
97
29
  else
98
- actions_for_member(collection, member)
30
+ Collection.all
99
31
  end
100
32
  end
101
- end
102
-
103
- def actions_for_member(collection, member)
104
- button_to remove_member_collections_path(id: collection.to_param, item_id: member.pid), data: { confirm: 'Are you sure you want to remove this item from the collection?' }, method: :put, id: "remove-#{member.noid}", class: 'btn', form_class: 'remove-member', remote: true do
105
- raw('<i class="icon-minus"></i> Remove')
106
- end
107
- end
108
-
109
- def collection_options
110
- @collection_options ||= current_users_collections
111
- end
112
-
113
- # Defaults to returning a list of all collections.
114
- # If you have implement User.collections, the results of that will be used.
115
- def current_users_collections
116
- if current_user.respond_to?(:collections)
117
- current_user.collections.to_a
118
- else
119
- Collection.all
120
- end
121
- end
122
-
123
- def available_collections(item = nil)
124
- if item.present?
125
- collection_options.reject {|n| n == item}
126
- else
127
- collection_options
128
- end
129
- end
130
-
131
-
132
33
  end
133
-
@@ -7,13 +7,24 @@ module Worthwhile::CollectionsHelper
7
7
  "#{collectible.to_param.gsub(/:/, '-')}-modal"
8
8
  end
9
9
 
10
- def link_to_select_collection(collectible, opts={})
10
+ def link_to_select_collection(collectible, opts={})
11
11
  html_class = opts[:class]
12
- link_to add_member_form_collections_path(collectible_id: collectible.id),
13
- data: { toggle: "modal", target: '#' + collection_modal_id(collectible) },
12
+ link_to '#', data: { toggle: "modal", target: '#' + collection_modal_id(collectible) },
14
13
  class: "add-to-collection #{html_class}", title: "Add #{collectible.human_readable_type} to Collection" do
15
- raw('<span class="glyphicon glyphicon-folder-open"></span> Add to a Collection')
14
+ icon('plus-sign') + ' Add to a Collection'
16
15
  end
17
16
  end
18
17
 
18
+ # override hydra-collections
19
+ def link_to_remove_from_collection(document, label = 'Remove From Collection')
20
+ link_to collections.collection_path(@collection.id, collection: { members: 'remove'},
21
+ batch_document_ids: [ document.id ]), method: :put do
22
+ icon('minus-sign') + ' ' + label
23
+ end
24
+ end
25
+
26
+ def icon(type)
27
+ content_tag :span, '', class: "glyphicon glyphicon-#{type}"
28
+ end
29
+
19
30
  end
@@ -8,7 +8,7 @@
8
8
  </li>
9
9
  <li>
10
10
  <% if @collection # We're on the view page for @collection. -%>
11
- <%= button_for_remove_from_collection(document) %>
11
+ <%= link_to_remove_from_collection(document) %>
12
12
  <% else %>
13
13
  <%= link_to [:curation_concern, document], class: 'itemicon itemtrash', title: 'Delete Collection', method: :delete, data: {
14
14
  confirm: "Deleting a collection from #{t('sufia.product_name')} is permanent. Click OK to delete this collection from #{t('sufia.product_name')}, or Cancel to cancel this operation" } do %>
@@ -1,12 +1,11 @@
1
- <% content_for :page_title, "#{application_name} Search Results" %>
2
- <% content_for :page_class, 'search' %>
3
- <% content_for :page_header do %>
1
+ <% provide :page_title, "#{application_name} Search Results" %>
2
+ <% provide :page_class, 'search' %>
3
+ <% provide :page_header do %>
4
4
  <%= render 'navbar' %>
5
5
  <% end %>
6
- <% content_for :sidebar do %>
7
6
 
7
+ <% provide :sidebar do %>
8
8
  <%= render 'search_sidebar' %>
9
-
10
9
  <% end %>
11
10
 
12
11
  <div id="content">
@@ -21,7 +20,7 @@
21
20
  <% @page_title = t('blacklight.search.title', :application_name => application_name) %>
22
21
 
23
22
 
24
- <% content_for(:head) do -%>
23
+ <% provide(:head) do -%>
25
24
  <%= render_opensearch_response_metadata %>
26
25
  <%= auto_discovery_link_tag(:rss, url_for(params.merge(:format => 'rss')), :title => t('blacklight.search.rss_feed') ) %>
27
26
  <%= auto_discovery_link_tag(:atom, url_for(params.merge(:format => 'atom')), :title => t('blacklight.search.atom_feed') ) %>
@@ -8,7 +8,7 @@
8
8
  <% end -%>
9
9
 
10
10
  <%= render 'form_descriptive_fields', curation_concern: @collection, f: f %>
11
- <%= render partial: 'form_permission', locals: {f: f} %>
11
+ <%= render 'form_permission', f: f %>
12
12
 
13
13
  <%= render "form_representative_image", curation_concern: @collection, f: f %>
14
14
 
@@ -0,0 +1,13 @@
1
+ <% if curation_concern.persisted? && curation_concern.members.present? %>
2
+ <div class="row">
3
+ <div class="col-md-12">
4
+ <fieldset id="representative-image">
5
+ <legend>
6
+ Assign a Thumbnail
7
+ </legend>
8
+ <p>Select the file whose thumbnail should represent this <%= curation_concern.human_readable_type %>.</p>
9
+ <%= f.select( :representative, Hash[ curation_concern.members.map { |m| m.generic_files}.flatten.map {|file| [file.title.first, file.pid] } ],{}, { class: 'form-control' } ) %>
10
+ </fieldset>
11
+ </div>
12
+ </div>
13
+ <% end %>
@@ -1,22 +1,17 @@
1
- <% content_for :page_title, curation_concern_page_title(@collection) %>
1
+ <% provide :page_title, curation_concern_page_title(@collection) %>
2
2
 
3
3
  <h1>Edit <%= @collection %> <span class="human_readable_type">(<%= @collection.human_readable_type %>)</span></h1>
4
4
 
5
5
 
6
6
  <% unless has_collection_search_parameters? %>
7
- <%= render partial: 'collections/edit_actions' %>
8
- <%= render partial: 'collections/form', locals: { record: @collection } %>
7
+ <%= render 'collections/edit_actions' %>
8
+ <%= render 'collections/form', record: @collection %>
9
9
  <% end %>
10
10
  <br />
11
11
 
12
12
  <h2>Manage Items in this Collection</h2>
13
- <%= render partial: 'search_collection_dashboard_form'%>
14
- <%= render partial: 'catalog/did_you_mean' %>
15
- <%#= render partial: 'catalog/facet_selected' %>
16
-
13
+ <%= render 'search_collection_dashboard_form'%>
14
+ <%= render 'catalog/did_you_mean' %>
17
15
  <%= render 'catalog/constraints', localized_params: params %>
18
-
19
- <%#= render 'catalog/sort_and_per_page' %>
20
- <%= render partial:'document_list', locals: { documents: @member_docs, document_list_format: "dashboard" } %>
21
-
22
- <%= render partial:'paginate' %>
16
+ <%= render 'document_list', documents: @member_docs, document_list_format: "dashboard" %>
17
+ <%= render 'paginate' %>
@@ -1,15 +1,13 @@
1
1
  <% curation_concern ||= @collection %>
2
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
3
- <% content_for :page_header do %>
4
-
5
- <h2>Describe Your <%= curation_concern.human_readable_type %></h2>
6
- <p>
7
- The more descriptive information you provide the better we can serve your needs.
8
- </p>
9
- <p>
10
- Please consider releasing your <%= curation_concern.human_readable_type.downcase %> as an <span class="label label-success">Open Access</span> work.
11
- </p>
12
-
2
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
3
+ <% provide :page_header do %>
4
+ <h2>Describe Your <%= curation_concern.human_readable_type %></h2>
5
+ <p>
6
+ The more descriptive information you provide the better we can serve your needs.
7
+ </p>
8
+ <p>
9
+ Please consider releasing your <%= curation_concern.human_readable_type.downcase %> as an <span class="label label-success">Open Access</span> work.
10
+ </p>
13
11
  <% end %>
14
12
 
15
13
  <%= render 'form' %>
@@ -5,10 +5,10 @@
5
5
  <div class="modal-dialog">
6
6
  <div class="modal-content">
7
7
  <div class="modal-header">
8
- <h4 id="<% modal_title_id %>" class="modal-title">Add <%= "#{collectible}" %> to one of your collections:</h4>
8
+ <h4 id="<% modal_title_id %>" class="modal-title">Add <%= collectible %> to one of your collections:</h4>
9
9
  </div>
10
10
  <div class="unpadded modal-body">
11
- <%= render partial: 'curate/collections/form_to_add_member', locals: { collectible: collectible, fieldset_class: 'with-side-padding with-top-padding', select_label_id: modal_title_id } %>
11
+ <%= render 'curate/collections/form_to_add_member', collectible: collectible, fieldset_class: 'with-side-padding with-top-padding', select_label_id: modal_title_id %>
12
12
  </div>
13
13
  </div>
14
14
  </div>
@@ -3,19 +3,7 @@
3
3
  <%= render "form_required_information", curation_concern: curation_concern, f: f %>
4
4
  </div>
5
5
 
6
- <fieldset id="content-editor">
7
- <legend>
8
- <%=t('sufia.work.editor.legend') %>
9
- <small><%=t('sufia.work.editor.caption') %></small>
10
- </legend>
11
- <div class="col-md-6" id="required-information">
12
- <%#= render "linked_editors", curation_concern: curation_concern, f: f %>
13
- </div>
14
-
15
- <div class="col-md-6" id="additional-information">
16
- <%#= render "linked_groups", curation_concern: curation_concern, f: f %>
17
- </div>
18
- </fieldset>
6
+ <%# render 'form_editors', f: f %>
19
7
 
20
8
  <div class="col-md-6" id="additional-information">
21
9
  <%= render "form_additional_information", curation_concern: curation_concern, f: f %>
@@ -0,0 +1,15 @@
1
+ <fieldset id="content-editor">
2
+ <legend>
3
+ <%=t('sufia.work.editor.legend') %>
4
+ <small><%=t('sufia.work.editor.caption') %></small>
5
+ </legend>
6
+ <div class="col-md-6" id="required-information">
7
+ <%#= render "linked_editors", curation_concern: curation_concern, f: f %>
8
+ </div>
9
+
10
+ <div class="col-md-6" id="additional-information">
11
+ <%#= render "linked_groups", curation_concern: curation_concern, f: f %>
12
+ </div>
13
+ </fieldset>
14
+
15
+
@@ -1,15 +1,13 @@
1
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
2
- <% content_for :page_header do %>
3
-
4
- <h2>Manage Your Work</h2>
5
- <p>
6
- You can enrich the metadata describing your work at any time.
7
- The more complete the description the easier it will be to find by yourself and others.
8
- </p>
9
- <p>
10
- Please consider releasing your <%=curation_concern.human_readable_type.downcase %> as an Open Access work.
11
- </p>
12
-
1
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
2
+ <% provide :page_header do %>
3
+ <h2>Manage Your Work</h2>
4
+ <p>
5
+ You can enrich the metadata describing your work at any time.
6
+ The more complete the description the easier it will be to find by yourself and others.
7
+ </p>
8
+ <p>
9
+ Please consider releasing your <%=curation_concern.human_readable_type.downcase %> as an Open Access work.
10
+ </p>
13
11
  <% end %>
14
12
 
15
13
  <%= render 'form' %>
@@ -1,14 +1,12 @@
1
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
2
- <% content_for :page_header do %>
3
-
4
- <h2>Describe Your <%= curation_concern.human_readable_type %></h2>
5
- <p>
6
- The more descriptive information you provide the better we can serve your needs.
7
- </p>
8
- <p>
9
- Please consider releasing your <%= curation_concern.human_readable_type.downcase %> as an <span class="label label-success">Open Access</span> work.
10
- </p>
11
-
1
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
2
+ <% provide :page_header do %>
3
+ <h2>Describe Your <%= curation_concern.human_readable_type %></h2>
4
+ <p>
5
+ The more descriptive information you provide the better we can serve your needs.
6
+ </p>
7
+ <p>
8
+ Please consider releasing your <%= curation_concern.human_readable_type.downcase %> as an <span class="label label-success">Open Access</span> work.
9
+ </p>
12
10
  <% end %>
13
11
 
14
12
  <%= render 'form' %>
@@ -1,11 +1,10 @@
1
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
2
- <% content_for :page_header do %>
1
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
2
+ <% provide :page_header do %>
3
3
  <h1><%= curation_concern %> <span class="human_readable_type">(<%= curation_concern.human_readable_type %>)</span></h1>
4
4
  <% end %>
5
- <%= render partial: 'representative_media', locals: {work: curation_concern} %>
6
5
 
6
+ <%= render 'representative_media', work: curation_concern %>
7
7
  <%= render 'attributes', curation_concern: curation_concern %>
8
-
9
8
  <%= render 'related_files', curation_concern: curation_concern %>
10
9
  <%= render 'related_resources', curation_concern: curation_concern %>
11
10
  <%= render 'collections', curation_concern: curation_concern %>
@@ -14,19 +13,16 @@
14
13
  <% editor = can?(:edit, curation_concern) %>
15
14
 
16
15
  <% if collector || editor %>
17
- <% content_for :second_row do %>
18
- <div class="form-actions">
19
- <% if editor %>
20
- <%= link_to "Edit This #{curation_concern.human_readable_type}", edit_polymorphic_path([:curation_concern, curation_concern]), class: 'btn btn-primary' %>
21
- <%= link_to "Delete This #{curation_concern.human_readable_type}", [:curation_concern, curation_concern], class: 'btn btn-primary', data: { confirm: "Delete this #{curation_concern.human_readable_type}?" }, method: :delete %>
22
- <%= link_to "Attach a File", new_curation_concern_generic_file_path(curation_concern), class: 'btn btn-primary' %>
23
- <%= link_to "Add an External Link", new_curation_concern_linked_resource_path(curation_concern), class: 'btn btn-primary' %>
24
- <% end %>
25
- <% if collector %>
26
- <%= render 'curate/collections/add_to_collection_modal', collectible: curation_concern %>
27
- <%= link_to_select_collection curation_concern, class: 'btn btn-primary' %>
28
- <% end %>
29
- </div>
30
- <% end %>
16
+ <div class="form-actions">
17
+ <% if editor %>
18
+ <%= link_to "Edit This #{curation_concern.human_readable_type}", edit_polymorphic_path([:curation_concern, curation_concern]), class: 'btn btn-primary' %>
19
+ <%= link_to "Delete This #{curation_concern.human_readable_type}", [:curation_concern, curation_concern], class: 'btn btn-primary', data: { confirm: "Delete this #{curation_concern.human_readable_type}?" }, method: :delete %>
20
+ <%= link_to "Attach a File", new_curation_concern_generic_file_path(curation_concern), class: 'btn btn-primary' %>
21
+ <%= link_to "Add an External Link", new_curation_concern_linked_resource_path(curation_concern), class: 'btn btn-primary' %>
22
+ <% end %>
23
+ <% if collector %>
24
+ <%= render 'curate/collections/add_to_collection_modal', collectible: curation_concern %>
25
+ <%= link_to_select_collection curation_concern, class: 'btn btn-primary' %>
26
+ <% end %>
27
+ </div>
31
28
  <% end %>
32
-
@@ -1,5 +1,5 @@
1
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
2
- <% content_for :page_header do %>
1
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
2
+ <% provide :page_header do %>
3
3
  <h1>Updating Attached File to <span class="parent_container">"<%= parent %>"<span></h1>
4
4
  <% end %>
5
5
  <%= render 'form' %>
@@ -1,8 +1,8 @@
1
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
2
- <% content_for :page_header do %>
1
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
2
+ <% provide :page_header do %>
3
3
  <h1>File Details</h1>
4
4
  <% end %>
5
- <%= render partial: 'media_display', locals: {generic_file: curation_concern, dom_class_name: 'representative_image'} %>
5
+ <%= render 'media_display', generic_file: curation_concern, dom_class_name: 'representative_image' %>
6
6
  <%= render "attributes", curation_concern: curation_concern %>
7
7
 
8
8
  <div class="form-actions">
@@ -1,5 +1,5 @@
1
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
2
- <% content_for :page_header do %>
1
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
2
+ <% provide :page_header do %>
3
3
  <h1>Editing an External Link to <span class="parent_container">"<%= parent %>"<span></h1>
4
4
  <% end %>
5
5
  <%= render 'form' %>
@@ -1,5 +1,5 @@
1
- <% content_for :page_title, curation_concern_page_title(curation_concern) %>
2
- <% content_for :page_header do %>
1
+ <% provide :page_title, curation_concern_page_title(curation_concern) %>
2
+ <% provide :page_header do %>
3
3
  <h1>Adding an External Link to <span class="parent_container">"<%= parent %>"<span></h1>
4
4
  <% end %>
5
5
  <%= render 'form' %>
@@ -1,4 +1,4 @@
1
- <% content_for :page_header do %>
1
+ <% provide :page_header do %>
2
2
  <h1>Manage Embargoes for <%= curation_concern %><span class="human_readable_type">(<%= curation_concern.human_readable_type %>)</span></h1>
3
3
  <% end %>
4
4
 
@@ -1,5 +1,4 @@
1
- <% content_for :layout_name, 'one_column, ' %>
2
- <% content_for :main do %>
1
+ <% provide :main do %>
3
2
 
4
3
  <div class="row">
5
4
  <div class="<%= content_for?(:main_column_class) ? yield(:main_column_class) : "col-md-12" %>">
@@ -7,16 +6,6 @@
7
6
  </div>
8
7
  </div>
9
8
 
10
- <% if content_for?(:second_row) %>
11
-
12
- <div class="row">
13
- <div class="col-md-12">
14
- <%= yield(:second_row) %>
15
- </div>
16
- </div>
17
-
18
- <% end %>
19
-
20
9
  <% end %>
21
10
 
22
11
  <%= render template: "layouts/#{theme}" %>
@@ -1,5 +1,4 @@
1
- <% content_for :layout_name, 'catalog, ' %>
2
- <% content_for :main do %>
1
+ <% provide :main do %>
3
2
 
4
3
  <div class="row">
5
4
  <% if content_for?(:sidebar) %>
@@ -1,25 +1,14 @@
1
- <% content_for :layout_name, 'curate_nd, ' %>
2
- <% content_for :body do %>
3
-
4
- <%= render 'shared/header' %>
1
+ <% provide :body do %>
5
2
 
3
+ <%= render 'shared/header' %>
6
4
  <%= render 'shared/flash_message' %>
7
5
 
8
6
  <div id="main" role="main" class="container <%= yield(:page_class) if content_for?(:page_class)%>">
9
7
  <% if content_for?(:page_header) %>
10
8
  <div class="row">
11
- <% if content_for?(:page_actions) %>
12
- <div class="col-md-10 main-header ">
13
- <%= yield(:page_header) %>
14
- </div>
15
- <div class="col-md-2 page-actions">
16
- <%= yield(:page_actions) %>
17
- </div>
18
- <% else %>
19
9
  <div class="col-md-12 main-header ">
20
10
  <%= yield(:page_header) %>
21
11
  </div>
22
- <% end %>
23
12
  </div>
24
13
  <% end %>
25
14
 
@@ -1,4 +1,4 @@
1
- <% content_for :page_header do %>
1
+ <% provide :page_header do %>
2
2
  <h1>Manage Leases for <%= curation_concern %><span class="human_readable_type">(<%= curation_concern.human_readable_type %>)</span></h1>
3
3
  <% end %>
4
4
 
@@ -1,8 +1,6 @@
1
- <% content_for :page_header do %>
2
-
3
- <h2>What are you uploading?</h2>
4
- <p>Before we can begin we need to know a little about what you're uploading.</p>
5
-
1
+ <% provide :page_header do %>
2
+ <h2>What are you uploading?</h2>
3
+ <p>Before we can begin we need to know a little about what you're uploading.</p>
6
4
  <% end %>
7
5
 
8
6