sufia 4.0.0.beta4 → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Gemfile +1 -1
- data/History.md +325 -0
- data/RELEASING.md +1 -0
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia.js +2 -2
- data/app/assets/javascripts/sufia/batch_edit.js +2 -2
- data/app/assets/javascripts/sufia/batch_select_all.js +7 -7
- data/app/assets/stylesheets/{dashboard.css.scss → file-listing.css.scss} +7 -1
- data/app/assets/stylesheets/styles.css.scss +23 -0
- data/app/assets/stylesheets/sufia.css.scss +5 -1
- data/app/controllers/concerns/sufia/catalog.rb +4 -4
- data/app/controllers/concerns/sufia/controller.rb +0 -4
- data/app/controllers/concerns/sufia/my_controller_behavior.rb +1 -5
- data/app/controllers/my/collections_controller.rb +7 -0
- data/app/controllers/my/files_controller.rb +7 -0
- data/app/controllers/my/highlights_controller.rb +7 -0
- data/app/controllers/my/shares_controller.rb +7 -0
- data/app/helpers/sufia/records_helper_behavior.rb +1 -1
- data/app/helpers/sufia/sufia_helper_behavior.rb +2 -2
- data/app/models/concerns/sufia/solr_document_behavior.rb +10 -0
- data/app/views/_user_util_links.html.erb +1 -1
- data/app/views/advanced/index.html.erb +10 -13
- data/app/views/batch/_edit.js.erb +15 -0
- data/app/views/batch/_metadata.html.erb +1 -1
- data/app/views/batch/edit.html.erb +10 -25
- data/app/views/batch_edits/_batch_edits_actions.html.erb +1 -1
- data/app/views/batch_edits/_check_all.html.erb +1 -1
- data/app/views/batch_edits/edit.html.erb +3 -3
- data/app/views/catalog/_document_list.html.erb +6 -1
- data/app/views/catalog/index.html.erb +34 -21
- data/app/views/collections/_action_menu.html.erb +5 -5
- data/app/views/collections/_batch_edits_actions.html.erb +1 -1
- data/app/views/collections/_collection.html.erb +36 -0
- data/app/views/collections/_document_list.html.erb +2 -2
- data/app/views/collections/_edit_descriptions.html.erb +1 -1
- data/app/views/collections/_form.html.erb +11 -8
- data/app/views/collections/_search_collection_dashboard_form.html.erb +1 -1
- data/app/views/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/dashboard/index.html.erb +1 -1
- data/app/views/generic_files/_descriptions.html.erb +1 -1
- data/app/views/generic_files/_edit.js.erb +22 -0
- data/app/views/generic_files/_extra_fields_modal.html.erb +18 -14
- data/app/views/generic_files/_generic_file.html.erb +36 -0
- data/app/views/generic_files/_media_display.html.erb +4 -0
- data/app/views/generic_files/_permission.html.erb +1 -1
- data/app/views/generic_files/_permission_form.html.erb +40 -36
- data/app/views/generic_files/_rights_modal.html.erb +37 -33
- data/app/views/generic_files/edit.html.erb +13 -30
- data/app/views/generic_files/new.html.erb +3 -3
- data/app/views/generic_files/show.html.erb +3 -7
- data/app/views/generic_files/stats.html.erb +1 -1
- data/app/views/generic_files/upload/_form_fields.html.erb +4 -4
- data/app/views/generic_files/upload/_local_file_import_chooser.html.erb +2 -2
- data/app/views/generic_files/upload/_script_templates.html.erb +2 -2
- data/app/views/homepage/_home_content.html.erb +2 -2
- data/app/views/homepage/_home_header.html.erb +1 -1
- data/app/views/homepage/_sortable_featured.html.erb +1 -1
- data/app/views/layouts/_head_tag_content.html.erb +1 -10
- data/app/views/layouts/error.html.erb +0 -9
- data/app/views/layouts/homepage.html.erb +1 -1
- data/app/views/layouts/sufia-dashboard.html.erb +6 -6
- data/app/views/layouts/sufia-one-column.html.erb +2 -2
- data/app/views/layouts/sufia-two-column.html.erb +2 -2
- data/app/views/mailbox/_notifications.html.erb +1 -1
- data/app/views/mailbox/index.html.erb +1 -1
- data/app/views/my/_batch_edits_actions.html.erb +1 -1
- data/app/views/my/_collection_action_menu.html.erb +4 -4
- data/app/views/my/_did_you_mean.html.erb +2 -7
- data/app/views/my/_document_list.html.erb +1 -1
- data/app/views/my/_facet_layout.html.erb +10 -9
- data/app/views/my/_facet_limit.html.erb +9 -9
- data/app/views/my/_facet_pagination.html.erb +14 -17
- data/app/views/my/_facet_selected.html.erb +1 -1
- data/app/views/my/_facets.html.erb +20 -7
- data/app/views/my/_index_partials/_default_group.html.erb +4 -4
- data/app/views/my/_index_partials/_list_collections.html.erb +1 -1
- data/app/views/my/_index_partials/_list_files.html.erb +2 -2
- data/app/views/my/_results_pagination.html.erb +7 -4
- data/app/views/my/_sort_and_per_page.html.erb +5 -8
- data/app/views/my/facet.html.erb +2 -5
- data/app/views/my/index.html.erb +1 -1
- data/app/views/single_use_links/new_download.html.erb +1 -1
- data/app/views/users/_contributions.html.erb +3 -3
- data/app/views/users/_profile_tabs.html.erb +3 -3
- data/app/views/users/_social_media_info.html.erb +3 -3
- data/app/views/users/_trophy_edit.html.erb +2 -2
- data/app/views/users/_user_info.html.erb +4 -4
- data/app/views/users/edit.html.erb +5 -10
- data/app/views/users/show.html.erb +16 -21
- data/config/locales/sufia.en.yml +7 -6
- data/config/routes.rb +25 -32
- data/lib/generators/sufia/sufia_generator.rb +1 -1
- data/lib/generators/sufia/upgrade400_generator.rb +87 -0
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +22 -0
- data/spec/features/browse_dashboard_files_spec.rb +22 -11
- data/spec/features/catalog_search_spec.rb +99 -0
- data/spec/features/collection_spec.rb +1 -1
- data/spec/helpers/records_helper_spec.rb +1 -1
- data/spec/helpers/sufia_helper_spec.rb +4 -3
- data/spec/models/generic_file_spec.rb +7 -3
- data/spec/models/solr_document_spec.rb +27 -9
- data/spec/services/noid_spec.rb +16 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/views/batch/edit.html.erb_spec.rb +34 -0
- data/spec/views/my/facet.html.erb_spec.rb +34 -0
- data/sufia-models/app/models/concerns/sufia/generic_file/mime_types.rb +1 -1
- data/sufia-models/app/services/sufia/noid.rb +2 -5
- data/sufia-models/lib/generators/sufia/models/upgrade400_generator.rb +78 -0
- data/sufia-models/lib/sufia/models/engine.rb +1 -1
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +3 -3
- data/sufia.gemspec +1 -1
- data/tasks/sufia-dev.rake +1 -1
- metadata +24 -54
- data/.gitmodules +0 -4
- data/Releasing_sufia.md +0 -6
- data/UpgradeGuide.md +0 -3
- data/app/views/catalog/_bookmark_control.html.erb +0 -24
- data/app/views/catalog/_citation.html.erb +0 -11
- data/app/views/catalog/_constraints.html.erb +0 -6
- data/app/views/catalog/_constraints_element.html.erb +0 -20
- data/app/views/catalog/_did_you_mean.html.erb +0 -10
- data/app/views/catalog/_document.html.erb +0 -19
- data/app/views/catalog/_email_form.html.erb +0 -11
- data/app/views/catalog/_facet_layout.html.erb +0 -12
- data/app/views/catalog/_facet_selected.html.erb +0 -12
- data/app/views/catalog/_facets.html.erb +0 -7
- data/app/views/catalog/_folder_control.html.erb +0 -11
- data/app/views/catalog/_index_default.html.erb +0 -11
- data/app/views/catalog/_index_header_default.html.erb +0 -20
- data/app/views/catalog/_index_partials/_default_group.html.erb +0 -7
- data/app/views/catalog/_index_partials/_list_files.html.erb +0 -37
- data/app/views/catalog/_marc_view.html.erb +0 -33
- data/app/views/catalog/_opensearch_response_metadata.html.erb +0 -2
- data/app/views/catalog/_previous_next_doc.html.erb +0 -6
- data/app/views/catalog/_refworks_form.html.erb +0 -7
- data/app/views/catalog/_results_pagination.html.erb +0 -6
- data/app/views/catalog/_show_default.html.erb +0 -9
- data/app/views/catalog/_show_sidebar.html.erb +0 -1
- data/app/views/catalog/_show_tools.html.erb +0 -46
- data/app/views/catalog/_sms_form.html.erb +0 -21
- data/app/views/catalog/_sort_and_per_page.html.erb +0 -9
- data/app/views/catalog/about.html.erb +0 -0
- data/app/views/catalog/citation.html.erb +0 -1
- data/app/views/catalog/email.erb +0 -1
- data/app/views/catalog/endnote.endnote.erb +0 -1
- data/app/views/catalog/index.atom.builder +0 -109
- data/app/views/catalog/index.rss.builder +0 -19
- data/app/views/catalog/librarian_view.html.erb +0 -3
- data/app/views/catalog/opensearch.json.erb +0 -0
- data/app/views/catalog/opensearch.xml.builder +0 -10
- data/app/views/catalog/send_email_record.erb +0 -0
- data/app/views/catalog/show.endnote.erb +0 -1
- data/app/views/catalog/show.html.erb +0 -40
- data/app/views/catalog/show.refworks.erb +0 -1
- data/app/views/catalog/sms.erb +0 -1
- data/app/views/collections/_button_for_creating_empty_collection.html.erb +0 -3
- data/spec/views/my/facet_limit.html.erb_spec.rb +0 -15
@@ -8,7 +8,7 @@ on element ids -->
|
|
8
8
|
<td width="1%">
|
9
9
|
</td>
|
10
10
|
<td width="37%">
|
11
|
-
<a href="" title="Click for more details"><i id="expand_<%= noid.gsub(":", "_") %>" class="glyphicon-plus icon
|
11
|
+
<a href="" title="Click for more details"><i id="expand_<%= noid.gsub(":", "_") %>" class="glyphicon-plus large-icon fleft"></i></a>
|
12
12
|
<%= link_to image_tag("/assets/folder.png", width: 36), collections.collection_path(noid) %>
|
13
13
|
<span class=center><%= link_to document.title_or_label, collections.collection_path(noid), id: "src_copy_link#{noid}" %> <br /></span>
|
14
14
|
</td>
|
@@ -13,9 +13,9 @@
|
|
13
13
|
<td width="41%">
|
14
14
|
<a href="#" title="Click for more details"><i id="expand_<%= noid %>" class="glyphicon glyphicon-plus"></i></a>
|
15
15
|
<%= link_to sufia.generic_file_path(document) do %>
|
16
|
-
<%= render_thumbnail_tag document %>
|
16
|
+
<%= render_thumbnail_tag document, class:"hidden-xs file_listing_thumbnail" %>
|
17
17
|
<% end %>
|
18
|
-
<span
|
18
|
+
<span>
|
19
19
|
<%= link_to document.title_or_label, sufia.generic_file_path(noid), id: "src_copy_link#{noid}", class: "#{'document-title' if document.title_or_label == document.label}" %><br/>
|
20
20
|
</span>
|
21
21
|
</td>
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<% if @response.total_pages > 1 %>
|
2
|
-
|
3
|
-
|
4
|
-
<div class="
|
5
|
-
|
2
|
+
<div class="row record-padding">
|
3
|
+
<div class="col-md-9">
|
4
|
+
<div class="pagination">
|
5
|
+
<%= paginate @response, outer_window: 2, theme: 'blacklight', route_set: sufia %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
</div>
|
6
9
|
<% end %>
|
@@ -7,17 +7,13 @@
|
|
7
7
|
<% session[:batch_edit_state] = "on" %>
|
8
8
|
<%= batch_edit_continue "Edit Selected" %>
|
9
9
|
<%= batch_delete %>
|
10
|
-
<%=
|
11
|
-
|
12
|
-
<div>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
15
|
-
<%= button_tag "Add to Collection", class: 'btn btn-primary submits-batches submits-batches-add',
|
16
|
-
data: { toggle: "modal", target: "#collection-list-container" } %>
|
10
|
+
<%= button_tag "Add to Collection", class: 'btn btn-primary submits-batches submits-batches-add',
|
11
|
+
data: { toggle: "modal", target: "#collection-list-container" } %>
|
17
12
|
</div>
|
13
|
+
|
18
14
|
<div class="sort-toggle">
|
19
15
|
<% unless @response.response['numFound'] < 2 %>
|
20
|
-
<%= form_tag sufia.
|
16
|
+
<%= form_tag sufia.dashboard_files_path, method: :get, class: 'per_page form-inline' do %>
|
21
17
|
<%= label_tag(:sort, "<span>Sort By:</span>".html_safe) %>
|
22
18
|
<%= select_tag(:sort, options_for_select(sort_fields, h(params[:sort]))) %>
|
23
19
|
|
@@ -31,4 +27,5 @@
|
|
31
27
|
<% end %>
|
32
28
|
<% end unless sort_fields.empty? %>
|
33
29
|
</div>
|
30
|
+
|
34
31
|
</div>
|
data/app/views/my/facet.html.erb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
<!-- This was copied from https://github.com/projectblacklight/blacklight/blob/master/app/views/catalog/facet.html.erb
|
2
|
-
It implements the facets in the same manner as blacklight does for the main catalog for the individual's dashbord
|
3
|
-
-->
|
4
1
|
<div class="facet_pagination top">
|
5
2
|
<%= render partial: 'facet_pagination' %>
|
6
3
|
</div>
|
@@ -11,10 +8,10 @@
|
|
11
8
|
</div>
|
12
9
|
<div class="modal-body">
|
13
10
|
<div class="facet_extended_list">
|
14
|
-
|
11
|
+
<%= render_facet_limit(@display_facet, layout: false) %>
|
15
12
|
</div>
|
16
13
|
</div>
|
17
|
-
|
14
|
+
|
18
15
|
<div class="modal-footer">
|
19
16
|
|
20
17
|
<div class="facet_pagination bottom">
|
data/app/views/my/index.html.erb
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<% @page_title = application_name + " Dashboard" %>
|
11
11
|
|
12
12
|
<% if params.has_key?("q") %>
|
13
|
-
<div class="alert alert-info"><i class="glyphicon glyphicon-search icon
|
13
|
+
<div class="alert alert-info"><i class="glyphicon glyphicon-search large-icon"></i> You searched for:
|
14
14
|
<strong><%= params[:q] %></strong></div>
|
15
15
|
<% end %>
|
16
16
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="single-use-link">
|
2
2
|
<h1>Single Use Link</h1>
|
3
3
|
<p>Anyone can use the following link once to download the file</p>
|
4
|
-
<%= link_to @asset, @link, class: 'download-link' %> <%= link_to raw('<i class="
|
4
|
+
<%= link_to @asset, @link, class: 'download-link' %> <%= link_to raw('<i class="glyphicon glyphicon-link large-icon"></i>'), '#', class: 'copypaste itemicon itemcode', title: 'Copy File URL', id: "copy_link_#{@asset.pid}" %>
|
5
5
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="tab-pane active" id="contributions">
|
2
|
-
<i class="
|
2
|
+
<i class="glyphicon glyphicon-star trophy-on"></i> <strong>Highlighted Files</strong>
|
3
3
|
<% if @trophies.count > 0 %>
|
4
4
|
<table>
|
5
5
|
<% @trophies.each do |t| %>
|
@@ -12,8 +12,8 @@
|
|
12
12
|
<td>
|
13
13
|
<%= link_to display_title(t), sufia.generic_file_path(t) %>
|
14
14
|
<% if current_user == @user %>
|
15
|
-
<%= display_trophy_link current_user, t.noid, class: 'glyphicon glyphicon-
|
16
|
-
<i class='trophy-on
|
15
|
+
<%= display_trophy_link current_user, t.noid, class: 'glyphicon glyphicon-star', data: {removerow: true} do %>
|
16
|
+
<i class='trophy-on glyphicon glyphicon-remove'></i>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
19
19
|
</td>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<ul class="nav nav-tabs" id="myTab">
|
2
|
-
<li class="active"><a href="#contributions"><i class="glyphicon glyphicon-
|
3
|
-
<li><a href="#profile"><i class="
|
4
|
-
<li><a href="#activity_log" ><i class="
|
2
|
+
<li class="active"><a href="#contributions"><i class="glyphicon glyphicon-star"></i> Contributions</a></li>
|
3
|
+
<li><a href="#profile"><i class="glyphicon glyphicon-info-sign"></i> Profile</a></li>
|
4
|
+
<li><a href="#activity_log" ><i class="glyphicon glyphicon-calendar"></i> Activity</a></li>
|
5
5
|
</ul>
|
6
6
|
|
7
7
|
<div class="tab-content">
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<% if !user.facebook_handle.blank?() %>
|
2
|
-
<dt><i class="
|
2
|
+
<dt><i class="icon-facebook"></i> Facebook Handle</dt>
|
3
3
|
<dd><%= link_to "http://facebook.com/#{user.facebook_handle}", "http://facebook.com/#{user.facebook_handle}", {target:'_blank'} %></dd>
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% if !user.twitter_handle.blank?() %>
|
7
|
-
<dt><i class="
|
7
|
+
<dt><i class="icon-twitter"></i> Twitter Handle</dt>
|
8
8
|
<dd><%= link_to "http://twitter.com/#{user.twitter_handle}", "http://twitter.com/#{user.twitter_handle}", {target:'_blank'} %></dd>
|
9
9
|
<% end %>
|
10
10
|
|
@@ -15,6 +15,6 @@
|
|
15
15
|
-->
|
16
16
|
|
17
17
|
<% if !user.linkedin_handle.blank?() %>
|
18
|
-
<dt><i class="
|
18
|
+
<dt><i class="icon-linkedin"></i> Linked In</dt>
|
19
19
|
<dd><%= link_to "#{@linkedInUrl}", "#{@linkedInUrl}", {target:'_blank'} %></dd>
|
20
20
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="control-label">
|
2
|
-
<i class="
|
3
|
-
<a href="#" id="remove_trophy_help" rel="popover" data-content="If you would like to remove a highlight designation, check the box and save your profile." data-original-title="Remove Highlight Designation"><i class="glyphicon glyphicon-question-sign
|
2
|
+
<i class="glyphicon glyphicon-star trophy-on" ></i> Remove Highlight Designation
|
3
|
+
<a href="#" id="remove_trophy_help" rel="popover" data-content="If you would like to remove a highlight designation, check the box and save your profile." data-original-title="Remove Highlight Designation"><i class="glyphicon glyphicon-question-sign"></i></a>
|
4
4
|
</div>
|
5
5
|
<div class="control-group">
|
6
6
|
<dl>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<dl id="user_info" class="row">
|
2
|
-
<dt class="col-xs-5"><i class="
|
2
|
+
<dt class="col-xs-5"><i class="icon-facebook"></i> Facebook Handle</dt>
|
3
3
|
<dd class="col-xs-7"><%= link_to user.facebook_handle, "http://facebook.com/#{user.facebook_handle}", {target:'_blank'} %></dd>
|
4
4
|
|
5
|
-
<dt class="col-xs-5"><i class="
|
5
|
+
<dt class="col-xs-5"><i class="icon-twitter"></i> Twitter Handle</dt>
|
6
6
|
<dd class="col-xs-7"><%= link_to user.twitter_handle, "http://twitter.com/#{user.twitter_handle}", {target:'_blank'} %></dd>
|
7
7
|
|
8
|
-
<dt class="col-xs-5"><i class="
|
8
|
+
<dt class="col-xs-5"><i class="icon-google-plus"></i> Google+ Handle</dt>
|
9
9
|
<dd class="col-xs-7"><%= link_to user.googleplus_handle, "http://google.com/+#{user.googleplus_handle}", {target:'_blank'} %></dd>
|
10
10
|
|
11
11
|
<dt class="col-xs-5"><i class="glyphicon glyphicon-envelope-alt"></i> Email</dt>
|
@@ -52,7 +52,7 @@
|
|
52
52
|
<% end %>
|
53
53
|
|
54
54
|
<% if user.telephone %>
|
55
|
-
<dt class="col-xs-5"><i class="glyphicon glyphicon-
|
55
|
+
<dt class="col-xs-5"><i class="glyphicon glyphicon-earphone"></i> Telephone</dt>
|
56
56
|
<dd class="col-xs-7"><%= link_to_telephone(user) %></dd>
|
57
57
|
<% end %>
|
58
58
|
|
@@ -1,8 +1,3 @@
|
|
1
|
-
<% content_for :local_js do %>
|
2
|
-
// initialize popover helpers
|
3
|
-
$("a[rel=popover]").popover({ html: true });
|
4
|
-
<% end %>
|
5
|
-
|
6
1
|
<h1>Edit Profile</h1>
|
7
2
|
<div class="col-xs-12 col-sm-5 well">
|
8
3
|
<%= form_for @user, url: sufia.profile_path(@user.to_param), html: {multipart: true, class: 'form-horizontal' } do |f| %>
|
@@ -21,7 +16,7 @@ $("a[rel=popover]").popover({ html: true });
|
|
21
16
|
<div class="col-xs-8">
|
22
17
|
<label class="checkbox">
|
23
18
|
<%= f.check_box :remove_avatar %> Yes
|
24
|
-
<a href="#" id="delete_picture_help" rel="popover" data-content="If you would like to remove your picture entirely, check the box and save your profile." data-original-title="Delete Picture"><i class="glyphicon glyphicon-question-sign
|
19
|
+
<a href="#" id="delete_picture_help" rel="popover" data-content="If you would like to remove your picture entirely, check the box and save your profile." data-original-title="Delete Picture"><i class="glyphicon glyphicon-question-sign"></i></a>
|
25
20
|
</label>
|
26
21
|
</div><!-- .controls -->
|
27
22
|
</div><!-- .form-group -->
|
@@ -31,27 +26,27 @@ $("a[rel=popover]").popover({ html: true });
|
|
31
26
|
<div class="col-xs-8">
|
32
27
|
<label class="checkbox">
|
33
28
|
<%= check_box_tag 'update_directory' %> Yes
|
34
|
-
<a href="#" id="refresh_directory_help" rel="popover" data-content="The information displayed in your profile comes from <%=t('sufia.institution_name') %>'s central directory (LDAP) and is cached by <%=t('sufia.product_name') %>. If you have updated that information and don't see those changes in your <%=t('sufia.product_name') %> profile, check the box and save your profile." data-original-title="Refresh Directory Info"><i class="glyphicon glyphicon-question-sign
|
29
|
+
<a href="#" id="refresh_directory_help" rel="popover" data-content="The information displayed in your profile comes from <%=t('sufia.institution_name') %>'s central directory (LDAP) and is cached by <%=t('sufia.product_name') %>. If you have updated that information and don't see those changes in your <%=t('sufia.product_name') %> profile, check the box and save your profile." data-original-title="Refresh Directory Info"><i class="glyphicon glyphicon-question-sign"></i></a>
|
35
30
|
</label>
|
36
31
|
</div><!-- .controls -->
|
37
32
|
</div><!-- .form-group -->
|
38
33
|
|
39
34
|
<div class="form-group">
|
40
|
-
<%= f.label :twitter_handle, '<i class="
|
35
|
+
<%= f.label :twitter_handle, '<i class="icon-twitter"></i> Twitter Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
41
36
|
<div class="col-xs-8">
|
42
37
|
<%= f.text_field :twitter_handle, class: "input-medium" %>
|
43
38
|
</div><!-- .controls -->
|
44
39
|
</div><!-- .form-group -->
|
45
40
|
|
46
41
|
<div class="form-group">
|
47
|
-
<%= f.label :facebook_handle, '<i class="
|
42
|
+
<%= f.label :facebook_handle, '<i class="icon-facebook"></i> Facebook Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
48
43
|
<div class="col-xs-8">
|
49
44
|
<%= f.text_field :facebook_handle, class: "input-medium" %>
|
50
45
|
</div><!-- .controls -->
|
51
46
|
</div><!-- .form-group -->
|
52
47
|
|
53
48
|
<div class="form-group">
|
54
|
-
<%= f.label :googleplus_handle, '<i class="
|
49
|
+
<%= f.label :googleplus_handle, '<i class="icon-google-plus"></i> Google+ Handle'.html_safe, class: 'col-xs-4 control-label' %>
|
55
50
|
<div class="col-xs-8">
|
56
51
|
<%= f.text_field :googleplus_handle, class: "input-medium" %>
|
57
52
|
</div><!-- .controls -->
|
@@ -1,24 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
})
|
7
|
-
|
1
|
+
<%= javascript_tag do %>
|
2
|
+
$('#myTab a').click(function (e) {
|
3
|
+
e.preventDefault();
|
4
|
+
$(this).tab('show');
|
5
|
+
})
|
8
6
|
<% end %>
|
9
|
-
<div class="col-xs-12">
|
10
|
-
<div class="pull-right">
|
11
|
-
<%= render 'profile_actions' %>
|
12
|
-
</div>
|
13
|
-
<span class="col-xs-3">
|
14
|
-
<%= render 'left_sidebar' %>
|
15
|
-
</span>
|
16
7
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
</span>
|
8
|
+
<div class="col-xs-12">
|
9
|
+
<div class="pull-right">
|
10
|
+
<%= render 'profile_actions' %>
|
21
11
|
</div>
|
22
|
-
|
23
|
-
|
24
|
-
|
12
|
+
<span class="col-xs-3">
|
13
|
+
<%= render 'left_sidebar' %>
|
14
|
+
</span>
|
15
|
+
<!-- right col -->
|
16
|
+
<span class="col-xs-9">
|
17
|
+
<%= render 'profile_tabs' %>
|
18
|
+
</span>
|
19
|
+
</div>
|
data/config/locales/sufia.en.yml
CHANGED
@@ -18,17 +18,17 @@ en:
|
|
18
18
|
label_short: "All"
|
19
19
|
label_long: "All of Sufia"
|
20
20
|
my_files:
|
21
|
-
label_short: "My Files"
|
21
|
+
label_short: "My Files"
|
22
22
|
label_long: "My Files"
|
23
23
|
my_collections:
|
24
|
-
label_short: "My Collections"
|
24
|
+
label_short: "My Collections"
|
25
25
|
label_long: "My Collections"
|
26
26
|
my_highlights:
|
27
|
-
label_short: "My Highlights"
|
27
|
+
label_short: "My Highlights"
|
28
28
|
label_long: "My Highlights"
|
29
29
|
my_shares:
|
30
|
-
label_short: "My Shares"
|
31
|
-
label_long: "My Shares"
|
30
|
+
label_short: "My Shares"
|
31
|
+
label_long: "My Shares"
|
32
32
|
upload:
|
33
33
|
my_computer:
|
34
34
|
tab_label: "My Computer"
|
@@ -44,7 +44,8 @@ en:
|
|
44
44
|
tag: "Keyword"
|
45
45
|
date_created: "Date Created"
|
46
46
|
related_url: "Related URL"
|
47
|
-
|
47
|
+
homepage:
|
48
|
+
featured_works: 'Featured Works'
|
48
49
|
dashboard:
|
49
50
|
title: "My Dashboard"
|
50
51
|
greeting: "Hello, "
|
data/config/routes.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Sufia::Engine.routes.draw do
|
2
2
|
|
3
3
|
# Downloads controller route
|
4
|
-
resources :homepage, only:
|
4
|
+
resources :homepage, only: 'index'
|
5
5
|
|
6
6
|
# Route the home page as the root
|
7
|
-
root to:
|
7
|
+
root to: 'homepage#index'
|
8
8
|
|
9
9
|
get 'single_use_link/generate_download/:id' => 'single_use_links#new_download', as: :generate_download_single_use_link
|
10
10
|
get 'single_use_link/generate_show/:id' => 'single_use_links#new_show', as: :generate_show_single_use_link
|
@@ -13,8 +13,8 @@ Sufia::Engine.routes.draw do
|
|
13
13
|
|
14
14
|
match 'batch_edits/clear' => 'batch_edits#clear', as: :batch_edits_clear, via: [:get, :post]
|
15
15
|
|
16
|
-
#
|
17
|
-
get
|
16
|
+
# Notifications route for catalog index view
|
17
|
+
get 'users/notifications_number' => 'users#notifications_number', as: :user_notify
|
18
18
|
|
19
19
|
# Generic file routes
|
20
20
|
resources :generic_files, path: :files, except: :index do
|
@@ -29,7 +29,7 @@ Sufia::Engine.routes.draw do
|
|
29
29
|
resources :featured_work_lists, path: 'featured_works', only: :create
|
30
30
|
|
31
31
|
# Downloads controller route
|
32
|
-
resources :downloads, only:
|
32
|
+
resources :downloads, only: 'show'
|
33
33
|
|
34
34
|
# Messages
|
35
35
|
resources :notifications, only: [:destroy, :index], controller: :mailbox do
|
@@ -48,38 +48,31 @@ Sufia::Engine.routes.draw do
|
|
48
48
|
end
|
49
49
|
|
50
50
|
# Dashboard page
|
51
|
-
resources
|
51
|
+
resources :dashboard, only: :index do
|
52
52
|
collection do
|
53
53
|
get 'activity', action: :activity, as: :dashboard_activity
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
57
|
# Routes for user's files, collections, highlights and shares
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
resources :shares, only: :index, controller: "/my/shares" do
|
78
|
-
collection do
|
79
|
-
get 'page/:page', action: :index
|
80
|
-
get 'facet/:id', action: :facet, as: :dashboard_facet
|
81
|
-
end
|
82
|
-
end
|
58
|
+
# Preserves existing behavior by maintaining paths to /dashboard
|
59
|
+
# Routes actions to the various My controllers
|
60
|
+
scope :dashboard do
|
61
|
+
get '/files', controller: 'my/files', action: :index, as: 'dashboard_files'
|
62
|
+
get '/files/page/:page', controller: 'my/files', action: :index
|
63
|
+
get '/files/facet/:id', controller: 'my/files', action: :facet, as: 'dashboard_files_facet'
|
64
|
+
|
65
|
+
get '/collections', controller: 'my/collections', action: :index, as: 'dashboard_collections'
|
66
|
+
get '/collections/page/:page', controller: 'my/collections', action: :index
|
67
|
+
get '/collections/facet/:id', controller: 'my/collections', action: :facet, as: 'dashboard_collections_facet'
|
68
|
+
|
69
|
+
get '/highlights', controller: 'my/highlights', action: :index, as: 'dashboard_highlights'
|
70
|
+
get '/highlights/page/:page', controller: 'my/highlights', action: :index
|
71
|
+
get '/highlights/facet/:id', controller: 'my/highlights', action: :facet, as: 'dashboard_highlights_facet'
|
72
|
+
|
73
|
+
get '/shares', controller: 'my/shares', action: :index, as: 'dashboard_shares'
|
74
|
+
get '/shares/page/:page', controller: 'my/shares', action: :index
|
75
|
+
get '/shares/facet/:id', controller: 'my/shares', action: :facet, as: 'dashboard_shares_facet'
|
83
76
|
end
|
84
77
|
|
85
78
|
# advanced routes for advanced search
|
@@ -108,7 +101,7 @@ Sufia::Engine.routes.draw do
|
|
108
101
|
if defined?(Sufia::ResqueAdmin)
|
109
102
|
namespace :admin do
|
110
103
|
constraints Sufia::ResqueAdmin do
|
111
|
-
mount Resque::Server, at:
|
104
|
+
mount Resque::Server, at: 'queues'
|
112
105
|
end
|
113
106
|
end
|
114
107
|
end
|
@@ -38,7 +38,7 @@ This generator makes the following changes to your application:
|
|
38
38
|
" \n# Adds Sufia behaviors into the application controller \n" +
|
39
39
|
" include Sufia::Controller\n"
|
40
40
|
end
|
41
|
-
gsub_file file_path, "layout 'blacklight'", "layout
|
41
|
+
gsub_file file_path, "layout 'blacklight'", "layout 'sufia-one-column'"
|
42
42
|
else
|
43
43
|
puts " \e[31mFailure\e[0m Could not find #{file_path}. To add Sufia behaviors to your Controllers, you must include the Sufia::Controller module in the Controller class definition."
|
44
44
|
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'rails/generators'
|
3
|
+
require 'rails/generators/migration'
|
4
|
+
|
5
|
+
class Sufia::Upgrade400Generator < Rails::Generators::Base
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
8
|
+
source_root File.expand_path('../templates', __FILE__)
|
9
|
+
|
10
|
+
argument :model_name, type: :string , default: "user"
|
11
|
+
desc """
|
12
|
+
This generator for upgrading sufia from 3.7.2 to 4.0 makes the following changes to your application:
|
13
|
+
1. Updates the root route
|
14
|
+
2. Adds Sufia's abilities into the Ability class
|
15
|
+
3. Adds Sufia behavior to the catalog controller
|
16
|
+
4. Creates a Sufia helper
|
17
|
+
5. Removes Blacklight stylesheet
|
18
|
+
6. Creates TinyMCE config for editable content feature
|
19
|
+
7. Adds blacklight-marc dependency if SolrDocument depends on it
|
20
|
+
8. Runs sufia-models upgrade generator
|
21
|
+
"""
|
22
|
+
|
23
|
+
def banner
|
24
|
+
say_status("warning", "UPGRADING SUFIA", :yellow)
|
25
|
+
end
|
26
|
+
|
27
|
+
# The engine routes have to come after the devise routes so that /users/sign_in will work
|
28
|
+
def update_root_route
|
29
|
+
# Nuke old Sufia-related routes
|
30
|
+
gsub_file 'config/routes.rb', 'root :to => "catalog#index"', "root to: 'homepage#index'"
|
31
|
+
end
|
32
|
+
|
33
|
+
def insert_abilities
|
34
|
+
insert_into_file 'app/models/ability.rb', after: /Hydra::Ability/ do
|
35
|
+
"\n include Sufia::Ability\n"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Add Sufia behaviors to the catalog controller
|
40
|
+
def inject_sufia_controller_behavior
|
41
|
+
controller_name = "CatalogController"
|
42
|
+
file_path = "app/controllers/catalog_controller.rb"
|
43
|
+
if File.exists?(file_path)
|
44
|
+
insert_into_file file_path, after: 'include Hydra::Controller::ControllerBehavior' do
|
45
|
+
"\n # Adds Sufia behaviors to the catalog controller\n" +
|
46
|
+
" include Sufia::Catalog\n"
|
47
|
+
end
|
48
|
+
else
|
49
|
+
puts " \e[31mFailure\e[0m Could not find #{file_path}. To add Sufia behaviors to your Controllers, you must include the Sufia::Catalog module in the CatalogController class definition."
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def copy_helper
|
54
|
+
copy_file 'sufia_helper.rb', 'app/helpers/sufia_helper.rb'
|
55
|
+
end
|
56
|
+
|
57
|
+
def remove_blacklight_scss
|
58
|
+
remove_file 'app/assets/stylesheets/blacklight.css.scss'
|
59
|
+
end
|
60
|
+
|
61
|
+
def tinymce_config
|
62
|
+
copy_file "config/tinymce.yml", "config/tinymce.yml"
|
63
|
+
end
|
64
|
+
|
65
|
+
def blacklight_marc
|
66
|
+
file_path = 'app/models/solr_document.rb'
|
67
|
+
return unless File.exists?(file_path) &&
|
68
|
+
file_contains?('app/models/solr_document.rb', 'Blacklight::Solr::Document::Marc') &&
|
69
|
+
!file_contains?('Gemfile', 'blacklight-marc')
|
70
|
+
insert_into_file 'Gemfile', after: /gem 'sufia'.*$/ do
|
71
|
+
"\ngem 'blacklight-marc'"
|
72
|
+
end
|
73
|
+
Bundler.with_clean_env do
|
74
|
+
run 'bundle install'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def upgrade_sufia_models
|
79
|
+
generate "sufia:models:upgrade400"
|
80
|
+
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def file_contains?(path, string)
|
85
|
+
File.readlines(path).grep(/#{string}/).any?
|
86
|
+
end
|
87
|
+
end
|