sufia 3.7.2 → 4.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +3 -0
- data/README.md +88 -11
- data/SUFIA_VERSION +1 -1
- data/app/assets/images/old_main_tulips.jpg +0 -0
- data/app/assets/javascripts/contact_form.js +0 -16
- data/app/assets/javascripts/jquery.blacklightTagCloud.js +44 -0
- data/app/assets/javascripts/jquery.tagcloud.js +116 -0
- data/app/assets/javascripts/jquery.tinysort.min.js +7 -0
- data/app/assets/javascripts/sufia.js +41 -44
- data/app/assets/javascripts/sufia/edit_metadata.js +1 -1
- data/app/assets/javascripts/sufia/editor.js +12 -0
- data/app/assets/javascripts/sufia/featured_works.js +64 -0
- data/app/assets/javascripts/sufia/fileupload.js +1 -1
- data/app/assets/javascripts/sufia/multiForm.js +1 -1
- data/app/assets/javascripts/sufia/permissions.js +4 -8
- data/app/assets/javascripts/sufia/single_use_link.js +1 -2
- data/app/assets/javascripts/sufia/trophy.js +42 -27
- data/app/assets/javascripts/terms_of_service.js +1 -1
- data/app/assets/stylesheets/dashboard.css.scss +81 -40
- data/app/assets/stylesheets/featured.css.scss +16 -0
- data/app/assets/stylesheets/fileupload/{jquery.fileupload-ui.css → jquery.fileupload-ui.css.erb} +2 -2
- data/app/assets/stylesheets/{generic_files.css → generic_files.css.erb} +6 -7
- data/app/assets/stylesheets/header.css.scss +93 -0
- data/app/assets/stylesheets/home-page.css.scss +50 -0
- data/app/assets/stylesheets/nestable.css.scss +111 -0
- data/app/assets/stylesheets/styles.css.scss +106 -0
- data/app/assets/stylesheets/sufia.css.scss +13 -8
- data/app/assets/stylesheets/tagcloud.css +83 -0
- data/app/assets/stylesheets/usage-stats.css +30 -0
- data/app/controllers/batch_controller.rb +0 -1
- data/app/controllers/concerns/sufia/catalog.rb +64 -0
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +16 -13
- data/app/controllers/content_blocks_controller.rb +8 -0
- data/app/controllers/featured_work_lists_controller.rb +16 -0
- data/app/controllers/featured_works_controller.rb +26 -0
- data/app/controllers/mailbox_controller.rb +1 -1
- data/app/controllers/pages_controller.rb +7 -0
- data/app/controllers/single_use_links_viewer_controller.rb +2 -5
- data/app/controllers/tinymce_assets_controller.rb +12 -0
- data/app/helpers/content_block_helper.rb +21 -0
- data/app/helpers/generic_file_helper.rb +2 -2
- data/app/helpers/sufia_helper.rb +8 -4
- data/app/helpers/trophy_helper.rb +15 -7
- data/app/models/content_block.rb +2 -0
- data/app/models/featured_work_list.rb +42 -0
- data/app/models/tinymce_asset.rb +3 -0
- data/app/uploaders/tinymce_asset_uploader.rb +51 -0
- data/app/views/_add_assets_links.html.erb +0 -16
- data/app/views/_controls.html.erb +17 -0
- data/app/views/_flash_msg.html.erb +2 -18
- data/app/views/_footer.html.erb +10 -15
- data/app/views/_ga.html.erb +0 -16
- data/app/views/_logo.html.erb +2 -2
- data/app/views/_masthead.html.erb +9 -36
- data/app/views/_user_util_links.html.erb +16 -11
- data/app/views/advanced/_advanced_search_facets.html.erb +0 -16
- data/app/views/advanced/_advanced_search_fields.html.erb +0 -16
- data/app/views/advanced/_advanced_search_help.html.erb +0 -16
- data/app/views/advanced/_facet_layout.html.erb +0 -16
- data/app/views/advanced/_facet_limit.html.erb +0 -16
- data/app/views/advanced/index.html.erb +2 -18
- data/app/views/batch/_metadata.html.erb +3 -3
- data/app/views/batch/edit.html.erb +4 -21
- data/app/views/catalog/_facet_limit.html.erb +11 -12
- data/app/views/catalog/_featured_researcher.html.erb +2 -0
- data/app/views/catalog/_home.html.erb +6 -2
- data/app/views/catalog/_home_content.html.erb +36 -0
- data/app/views/catalog/_home_header.html.erb +15 -0
- data/app/views/catalog/_recent_document.html.erb +1 -1
- data/app/views/catalog/_recents.html.erb +3 -4
- data/app/views/catalog/_search_form.html.erb +13 -9
- data/app/views/catalog/_tagcloud.html.erb +7 -0
- data/app/views/catalog/index.html.erb +4 -10
- data/app/views/contact_form/create.html.erb +0 -16
- data/app/views/contact_form/new.html.erb +0 -16
- data/app/views/dashboard/_constraints.html.erb +3 -19
- data/app/views/dashboard/_did_you_mean.html.erb +0 -16
- data/app/views/dashboard/_document_list.html.erb +0 -16
- data/app/views/dashboard/_facet_layout.html.erb +1 -17
- data/app/views/dashboard/_facet_limit.html.erb +5 -5
- data/app/views/dashboard/_facet_selected.html.erb +1 -17
- data/app/views/dashboard/_facets.html.erb +0 -18
- data/app/views/dashboard/_heading.html.erb +1 -1
- data/app/views/dashboard/_index_partials/_default_group.html.erb +7 -23
- data/app/views/dashboard/_index_partials/_list_files.html.erb +62 -57
- data/app/views/dashboard/_search_form.html.erb +10 -7
- data/app/views/dashboard/_show_partials/_default.html.erb +0 -18
- data/app/views/dashboard/_show_partials/_default_details.html.erb +0 -16
- data/app/views/dashboard/_show_partials/_facets.html.erb +0 -16
- data/app/views/dashboard/_sort_and_per_page.html.erb +10 -9
- data/app/views/dashboard/facet.html.erb +4 -19
- data/app/views/dashboard/index.html.erb +27 -49
- data/app/views/error/401.html.erb +1 -17
- data/app/views/error/404.html.erb +0 -16
- data/app/views/error/500.html.erb +0 -16
- data/app/views/error/single_use_error.html.erb +1 -17
- data/app/views/generic_files/_asset_deleted_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_permissions_denial_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_saved_flash.html.erb +0 -16
- data/app/views/generic_files/_asset_updated_flash.html.erb +0 -16
- data/app/views/generic_files/_breadcrumbs.html.erb +0 -16
- data/app/views/generic_files/_browse_everything.html.erb +24 -0
- data/app/views/generic_files/_descriptions.html.erb +1 -1
- data/app/views/generic_files/_field_form.html.erb +5 -5
- data/app/views/generic_files/_media_display.html.erb +3 -3
- data/app/views/generic_files/_permission_form.html.erb +5 -5
- data/app/views/generic_files/_rights_modal.html.erb +13 -29
- data/app/views/generic_files/_show_actions.html.erb +13 -1
- data/app/views/generic_files/_versioning.html.erb +14 -10
- data/app/views/generic_files/citation.html.erb +0 -16
- data/app/views/generic_files/edit.html.erb +10 -12
- data/app/views/generic_files/edit_fields/_default.html.erb +1 -1
- data/app/views/generic_files/edit_fields/_description.html.erb +1 -1
- data/app/views/generic_files/edit_fields/_resource_type.html.erb +2 -3
- data/app/views/generic_files/edit_fields/_rights.html.erb +1 -1
- data/app/views/generic_files/new.html.erb +11 -26
- data/app/views/generic_files/show.html.erb +7 -25
- data/app/views/generic_files/stats.html.erb +141 -0
- data/app/views/homepage/_featured.html.erb +11 -0
- data/app/views/homepage/_featured_fields.html.erb +18 -0
- data/app/views/homepage/_featured_works.html.erb +17 -0
- data/app/views/homepage/_sortable_featured.html.erb +26 -0
- data/app/views/layouts/_head_tag_content.html.erb +1 -1
- data/app/views/layouts/_homepage_sidebar2.html.erb +14 -0
- data/app/views/layouts/error.html.erb +3 -21
- data/app/views/layouts/homepage.html.erb +8 -37
- data/app/views/layouts/sufia-dashboard.html.erb +46 -0
- data/app/views/layouts/sufia-one-column.html.erb +8 -24
- data/app/views/layouts/sufia-two-column.html.erb +9 -8
- data/app/views/pages/show.html.erb +4 -0
- data/app/views/single_use_links_viewer/show.html.erb +2 -2
- data/app/views/static/agreement.html.erb +0 -17
- data/app/views/static/help.html.erb +0 -17
- data/app/views/static/mendeley.html.erb +0 -16
- data/app/views/static/subject_libraries.html.erb +0 -17
- data/app/views/static/terms.html.erb +0 -16
- data/app/views/static/zotero.html.erb +0 -16
- data/app/views/users/_activity_log.html.erb +2 -2
- data/app/views/users/_contributions.html.erb +6 -2
- data/app/views/users/_follower_modal.html.erb +2 -2
- data/app/views/users/_following_modal.html.erb +2 -2
- data/app/views/users/_left_sidebar.html.erb +1 -1
- data/app/views/users/_notify_link.html.erb +1 -1
- data/app/views/users/_notify_number.html.erb +1 -1
- data/app/views/users/_profile_actions.html.erb +3 -3
- data/app/views/users/_profile_tabs.html.erb +1 -1
- data/app/views/users/_search_form.html.erb +3 -2
- 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 +27 -27
- data/app/views/users/_vitals.html.erb +2 -2
- data/app/views/users/edit.html.erb +39 -39
- data/app/views/users/index.html.erb +3 -3
- data/app/views/users/show.html.erb +7 -9
- data/config/locales/sufia.en.yml +15 -7
- data/config/routes.rb +12 -9
- data/lib/generators/sufia/sufia_generator.rb +18 -15
- data/lib/generators/sufia/templates/catalog_controller.rb +11 -73
- data/lib/generators/sufia/templates/config/tinymce.yml +7 -0
- data/lib/sufia.rb +7 -0
- data/lib/sufia/downloads_controller_behavior.rb +3 -4
- data/lib/sufia/files_controller_behavior.rb +38 -27
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/batch_controller_spec.rb +1 -1
- data/spec/controllers/batch_edits_controller_spec.rb +5 -5
- data/spec/controllers/catalog_controller_spec.rb +37 -58
- data/spec/controllers/content_blocks_controller_spec.rb +37 -0
- data/spec/controllers/downloads_controller_spec.rb +3 -11
- data/spec/controllers/featured_work_lists_controller_spec.rb +20 -0
- data/spec/controllers/featured_works_controller_spec.rb +50 -0
- data/spec/controllers/generic_files_controller_spec.rb +74 -9
- data/spec/controllers/mailbox_controller_spec.rb +1 -1
- data/spec/controllers/pages_controller_spec.rb +25 -0
- data/spec/controllers/single_use_links_controller_spec.rb +1 -1
- data/spec/controllers/single_use_links_viewer_controller_spec.rb +1 -1
- data/spec/controllers/tinymce_assets_controller_spec.rb +39 -0
- data/spec/controllers/users_controller_spec.rb +3 -8
- data/spec/factories/content_blocks.rb +4 -0
- data/spec/factories/featured_works.rb +4 -0
- data/spec/factories/generic_files.rb +46 -39
- data/spec/factories/users.rb +18 -18
- data/spec/features/browse_dashboard_files_spec.rb +6 -7
- data/spec/features/browse_files_spec.rb +9 -6
- data/spec/features/cloud_upload_spec.rb +18 -0
- data/spec/features/single_use_links_spec.rb +2 -3
- data/spec/helpers/content_block_helper_spec.rb +31 -0
- data/spec/helpers/generic_file_helper_spec.rb +3 -3
- data/spec/helpers/sufia_helper_spec.rb +13 -81
- data/spec/helpers/trophy_helper_spec.rb +39 -0
- data/spec/jobs/import_url_job_spec.rb +1 -1
- data/spec/jobs/ingest_local_file_job_spec.rb +1 -1
- data/spec/lib/sufia/usage_statistics_spec.rb +75 -0
- data/spec/models/ability_spec.rb +31 -0
- data/spec/models/active_fedora_pid_based_job_spec.rb +1 -1
- data/spec/models/audit_job_spec.rb +1 -1
- data/spec/models/batch_spec.rb +1 -1
- data/spec/models/batch_update_job_spec.rb +1 -1
- data/spec/models/event_jobs_spec.rb +1 -1
- data/spec/models/featured_work_list_spec.rb +23 -0
- data/spec/models/featured_work_spec.rb +42 -0
- data/spec/models/fits_datastream_spec.rb +2 -2
- data/spec/models/generic_file/reload_on_save_spec.rb +1 -1
- data/spec/models/generic_file/web_form_spec.rb +4 -4
- data/spec/models/generic_file_spec.rb +41 -40
- data/spec/models/pageview.rb +19 -0
- data/spec/models/properties_datastream_spec.rb +2 -2
- data/spec/models/solr_document_spec.rb +9 -0
- data/spec/models/user_spec.rb +2 -2
- data/spec/routing/featured_works_route_spec.rb +16 -0
- data/spec/routing/route_spec.rb +10 -15
- data/spec/spec_helper.rb +3 -0
- data/spec/support/lib/generators/test_app_generator.rb +19 -8
- data/spec/views/dashboard/facet_limit.html.erb_spec.rb +2 -2
- data/spec/views/generic_file/show.html.erb_spec.rb +44 -0
- data/spec/views/generic_file/stats.html.erb_spec.rb +47 -0
- data/spec/views/users/_follower_modal.html.erb_spec.rb +18 -0
- data/spec/views/users/_following_modal.html.erb_spec.rb +18 -0
- data/spec/views/users/index.html.erb_spec.rb +1 -1
- data/sufia-models/app/models/batch.rb +1 -1
- data/sufia-models/app/models/concerns/sufia/properties_datastream_behavior.rb +30 -0
- data/sufia-models/app/models/concerns/sufia/user.rb +1 -1
- data/sufia-models/app/models/datastreams/batch_rdf_datastream.rb +4 -7
- data/sufia-models/app/models/datastreams/fits_datastream.rb +3 -0
- data/sufia-models/app/models/datastreams/generic_file_rdf_datastream.rb +53 -51
- data/sufia-models/app/models/datastreams/properties_datastream.rb +1 -15
- data/sufia-models/app/models/featured_work.rb +22 -0
- data/sufia-models/app/models/sufia/pageview.rb +9 -0
- data/sufia-models/{lib/sufia/models → app/services/sufia}/id_service.rb +0 -0
- data/sufia-models/{lib/sufia/models → app/services/sufia}/noid.rb +0 -0
- data/sufia-models/app/services/sufia/usage_statistics.rb +73 -0
- data/sufia-models/config/locales/sufia.en.yml +3 -4
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +23 -8
- data/sufia-models/lib/generators/sufia/models/templates/config/analytics.yml +9 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/mime_types.rb +6 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +11 -2
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_content_blocks.rb +10 -0
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_featured_works.rb +12 -0
- data/sufia-models/lib/generators/sufia/models/templates/migrations/create_tinymce_assets.rb +8 -0
- data/sufia-models/lib/generators/sufia/models/usagestats_generator.rb +19 -0
- data/sufia-models/lib/sufia/ability.rb +34 -0
- data/sufia-models/lib/sufia/models/engine.rb +5 -3
- data/sufia-models/lib/sufia/models/generic_file.rb +4 -2
- data/sufia-models/lib/sufia/models/generic_file/export.rb +3 -3
- data/sufia-models/lib/sufia/models/generic_file/featured.rb +14 -0
- data/sufia-models/lib/sufia/models/solr_document_behavior.rb +11 -4
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +6 -5
- data/sufia.gemspec +6 -4
- data/tasks/release.rake +1 -0
- data/tasks/sufia-dev.rake +5 -1
- data/vendor/assets/javascripts/flot/excanvas.js +1428 -0
- data/vendor/assets/javascripts/flot/jquery.flot.js +3137 -0
- data/vendor/assets/javascripts/flot/jquery.flot.selection.js +360 -0
- data/vendor/assets/javascripts/flot/jquery.flot.time.js +431 -0
- data/vendor/assets/javascripts/nestable.js +647 -0
- data/vendor/assets/javascripts/video.js +135 -126
- data/{app → vendor}/assets/stylesheets/video-js.css.erb +7 -6
- metadata +155 -33
- data/app/assets/stylesheets/application-bootstrap.css.erb +0 -295
- data/app/assets/stylesheets/audio-js.css +0 -3
- data/app/assets/stylesheets/blacklight_more_facets.css +0 -427
- data/app/assets/stylesheets/bootstrap.min.css.erb +0 -1433
- data/app/assets/stylesheets/contact_form.css +0 -4
- data/app/assets/stylesheets/reset_body.css +0 -4
- data/app/assets/stylesheets/trophy.css +0 -7
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +0 -84
- data/app/helpers/facets_helper.rb +0 -3
- data/app/helpers/sufia/facets_helper_behavior.rb +0 -23
- data/app/views/catalog/_home_text.html.erb +0 -10
- data/app/views/generic_files/_dropbox_import.html.erb +0 -3
- data/app/views/generic_files/upload/_dropbox_chooser.html.erb +0 -39
- data/app/views/static/about.html.erb +0 -21
- data/spec/helpers/render_constraints_helper_behavior_spec.rb +0 -42
@@ -1,19 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
%>
|
5
|
-
<ul class="slide-list">
|
1
|
+
<ul class="facet-values list-unstyled">
|
2
|
+
<% paginator = facet_paginator(facet_field, display_facet)
|
3
|
+
%>
|
6
4
|
<% paginator.items.each do |item| -%>
|
7
|
-
<li>
|
5
|
+
<li>
|
8
6
|
<% if facet_in_params?( solr_field, item.value ) %>
|
9
|
-
<%= render_selected_facet_value(solr_field, item)
|
7
|
+
<%= render_selected_facet_value(solr_field, item) %>
|
10
8
|
<% else %>
|
11
|
-
<%= render_facet_value(solr_field, item)
|
9
|
+
<%= render_facet_value(solr_field, item) %>
|
12
10
|
<% end -%>
|
13
|
-
</li>
|
11
|
+
</li>
|
14
12
|
<% end %>
|
15
13
|
|
16
|
-
<% if
|
17
|
-
<li class="more_facets_link"><%= link_to
|
14
|
+
<% if paginator.has_next? and params[:action] != "facet" %>
|
15
|
+
<li class="more_facets_link"><%= link_to('more '+ facet_field.label.pluralize + '»', params.merge(:id => solr_field, :action=>"facet", :page => nil), :class => "more_facets_link") %></li>
|
18
16
|
<% end %>
|
19
|
-
|
17
|
+
|
18
|
+
</ul>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<div class="col-xs-12 col-sm-6">
|
2
|
+
<ul id="homeTabs" class="nav nav-tabs">
|
3
|
+
<li><a href="#highlighted_resources" data-toggle="tab">Highlighted Resources</a></li>
|
4
|
+
<li><a href="#recently_uploaded" data-toggle="tab">Recently Uploaded</a></li>
|
5
|
+
</ul>
|
6
|
+
<div class="tab-content">
|
7
|
+
<div class="tab-pane fade in" id="highlighted_resources">
|
8
|
+
<%= render :partial=>'/homepage/featured_works' %>
|
9
|
+
</div>
|
10
|
+
<div class="tab-pane fade" id="recently_uploaded">
|
11
|
+
<%= render :partial=>'/catalog/recents', :locals => {:recent_documents=>@recent_documents, :msg=>"No public work has been contributed.", :display_thumbs=>true, :display_access=>false} %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div><!-- /.col-xs-6 -->
|
15
|
+
<div class="col-xs-12 col-sm-6">
|
16
|
+
<div>
|
17
|
+
<%- if blacklight_config.respond_to?(:tag_cloud_field_name) && blacklight_config.tag_cloud_field_name %>
|
18
|
+
<div class="row">
|
19
|
+
<h2 class="heading1 pull-left">Explore</h2>
|
20
|
+
<%= render partial:'catalog/tagcloud', locals:{tag_cloud_field_name:blacklight_config.tag_cloud_field_name}%>
|
21
|
+
</div>
|
22
|
+
<%- end %>
|
23
|
+
</div>
|
24
|
+
<div>
|
25
|
+
<%= render :partial=>'/catalog/featured_researcher' %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
<script>
|
29
|
+
$('#homeTabs a').click(function (e) {
|
30
|
+
e.preventDefault()
|
31
|
+
$(this).tab('show')
|
32
|
+
})
|
33
|
+
</script>
|
34
|
+
<script>
|
35
|
+
$('#homeTabs a:first').tab('show') // Select first tab
|
36
|
+
</script>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="home_call_action col-xs-12 col-sm-4 pull-right">
|
2
|
+
<div class="home_share_work">
|
3
|
+
<%= link_to "<i class=\"icon-file\"></i> #{t('sufia.share_button')}".html_safe, sufia.new_generic_file_path, :class => "btn btn-primary btn-lg btn-block", :id => "contribute_link" %>
|
4
|
+
<p class="text-center"><a href="/terms/">Terms of Use</a></p>
|
5
|
+
</div><!-- /.home_share_work -->
|
6
|
+
</div><!-- /.col-xs-3 -->
|
7
|
+
<div class="col-xs-12 col-sm-8">
|
8
|
+
<div class="col-sm-offset-2 col-sm-9 col-md-offset-1 home_marketing_text">
|
9
|
+
<h2>Share. Manage. Preserve.</h2>
|
10
|
+
<p>Raise the profile of your research and boost its impact with Sufia!</p>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
|
15
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<tr>
|
2
2
|
<% if display_thumbs %>
|
3
|
-
<td class="span10"><%= link_to_profile recent_document.depositor("no depositor value") %> <%= render :
|
3
|
+
<td class="span10"><%= link_to_profile recent_document.depositor("no depositor value") %> <%= render partial: 'dashboard/_index_partials/thumbnail_display', locals: {document: recent_document, width: 45} %> </td>
|
4
4
|
<% end %>
|
5
5
|
<td>
|
6
6
|
<h3>
|
@@ -1,11 +1,10 @@
|
|
1
1
|
<% msg = 'Login to see your recently added documents' if msg.blank? and current_user.blank? %>
|
2
2
|
<% msg = 'You have no documents to display. Contribute some of your documents!' if msg.blank? %>
|
3
3
|
<div>
|
4
|
-
<div class='hide'>
|
5
|
-
<%= link_to "Recent", sufia.catalog_recent_path, :remote => true, :id => 'recent_doc_link' %>
|
6
|
-
</div>
|
7
4
|
<% if recent_documents.blank? %>
|
8
|
-
|
5
|
+
<% msg = 'Login to see your recently added documents' if msg.blank? and current_user.blank? %>
|
6
|
+
<% msg = 'You have no documents to display. Contribute some of your documents!' if msg.blank? %>
|
7
|
+
<h3><%= msg %></h3>
|
9
8
|
<% else %>
|
10
9
|
|
11
10
|
<div id="recent_docs">
|
@@ -1,12 +1,16 @@
|
|
1
1
|
<%# only display the q parameter if the controller is not the dashboard. If they are in the dashboard controller, then the search is of the dashboard. %>
|
2
2
|
<% q = params[:controller] == 'dashboard' ? nil : params[:q] %>
|
3
|
+
<%= form_tag catalog_index_path, :method => :get, :id => "search-form-header", :class => "col-xs-12", :role => "search" do %>
|
4
|
+
<%= render_hash_as_hidden_fields(params_for_search().except(:q, :search_field, :qt, :page, :utf8)) %>
|
5
|
+
<div class="input-group">
|
6
|
+
<label class="sr-only" for="search-field-header"><%= t('sufia.search.form.q.label') %></label>
|
7
|
+
<%= text_field_tag :q, q, :class => "q form-control", :id => "search-field-header", :placeholder => t('sufia.search.form.q.placeholder') %>
|
8
|
+
<span class="input-group-btn">
|
9
|
+
<button type="submit" class="btn btn-default" id="search-submit-header">
|
10
|
+
<i class="glyphicon glyphicon-search"></i> Go
|
11
|
+
</button>
|
12
|
+
</span>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
3
15
|
|
4
|
-
|
5
|
-
<%= render_hash_as_hidden_fields(params_for_search().except(:q, :search_field, :qt, :page, :utf8)) %>
|
6
|
-
<div class="controls">
|
7
|
-
<div class="input-append">
|
8
|
-
<label class="accessible-hidden"><%= t('sufia.search.form.q.label') %></label>
|
9
|
-
<%= text_field_tag :q, q, :class => "q span50", :id => "search-field-header", :placeholder => t('sufia.search.form.q.placeholder') %><button type="submit" class="btn btn-info" id="search-submit-header"><i class="icon-search"></i> Go</button>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
<% end %>
|
16
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<a role="button" class="btn btn-default tag-toggle-list">List</a>
|
2
|
+
<ul class="tagcloud" data-facet="<%= tag_cloud_field_name %>"></ul>
|
3
|
+
<div class="btn-group btn-group-justified tag-sort">
|
4
|
+
<a role="button" class="btn btn-default tag-sort-za">Z-A</a>
|
5
|
+
<a role="button" class="btn btn-default tag-sort-az">A-Z</a>
|
6
|
+
<a role="button" class="btn btn-default tag-sort-numerical">Rank</a>
|
7
|
+
</div>
|
@@ -1,16 +1,10 @@
|
|
1
|
-
<% content_for :local_js do %>
|
2
|
-
// setting a fixed height so that the dialog does not hop around when you get to the last small page
|
3
|
-
//$.ui.dialog.prototype.options["height"]=window.innerHeight *0.75
|
4
|
-
<% end %>
|
5
|
-
|
6
|
-
<% content_for :sidebar do %>
|
7
|
-
<%= render :partial=>'facets' %>
|
8
|
-
<% end %>
|
9
|
-
|
10
1
|
<% unless has_search_parameters? %>
|
11
2
|
<%# if there are no input/search related params, display the "home" partial -%>
|
12
3
|
<%= render 'home' %>
|
13
4
|
<% else %>
|
5
|
+
<% content_for :sidebar do %>
|
6
|
+
<%= render :partial=>'facets' %>
|
7
|
+
<% end %>
|
14
8
|
|
15
9
|
<% @page_title = application_name + " Search Results" %>
|
16
10
|
|
@@ -22,7 +16,7 @@
|
|
22
16
|
|
23
17
|
<div class="row">
|
24
18
|
<%= render 'sort_and_per_page' %>
|
25
|
-
<div class="row
|
19
|
+
<div class="row">
|
26
20
|
<%= link_to "New Search", catalog_index_path, :id=>"startOverLink", :class=>"btn btn-info btn-medium" %>
|
27
21
|
</div>
|
28
22
|
</div>
|
@@ -1,17 +1 @@
|
|
1
|
-
<%#
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
1
|
<h1>Contact Form</h1>
|
@@ -1,19 +1,3 @@
|
|
1
|
-
<%#
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
1
|
<h1>Contact</h1>
|
18
2
|
<div class="alert">
|
19
3
|
<%= render partial: 'directions' %>
|
@@ -1,22 +1,6 @@
|
|
1
|
-
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
|
-
<!--
|
1
|
+
<!--
|
18
2
|
<div id="appliedParams">
|
19
|
-
|
20
|
-
<%# render_constraints(localized_params) %>
|
3
|
+
<h3 class="label">You searched for:</h3>
|
4
|
+
<%# render_constraints(localized_params) %>
|
21
5
|
</div>
|
22
6
|
-->
|
@@ -1,19 +1,3 @@
|
|
1
|
-
<%#
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
1
|
<% if @response.response[:numFound] <= spell_check_max and @response.spelling.words.size > 0 %>
|
18
2
|
<div id="spell">
|
19
3
|
<h4 class="suggest"><i>Did you mean to type
|
@@ -1,19 +1,3 @@
|
|
1
|
-
<%#
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
1
|
<% # container for all documents in index view -%>
|
18
2
|
<div id="documents" class="clear">
|
19
3
|
<%= render :partial => 'dashboard/_index_partials/default_group', :locals => {:docs => @response.docs.map { |x| SolrDocument.new(x) }, :facet_value => nil} %>
|
@@ -1,24 +1,8 @@
|
|
1
|
-
<%#
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
1
|
<li class="expandable_new grey">
|
18
2
|
<% id = facet_field.label.gsub(" ","_")+"_db" %>
|
19
3
|
|
20
4
|
<a class="accordion-toggle grey" data-toggle="collapse" data-parent="#facet_group" data-target="#collapse_<%= id%>">
|
21
|
-
<%= facet_field.label
|
5
|
+
<%= facet_field.label %> <i class="glyphicon glyphicon-chevron-right grey"></i>
|
22
6
|
</a>
|
23
7
|
|
24
8
|
<div id="collapse_<%= id%>" class="accordion-body collapse">
|
@@ -2,11 +2,11 @@
|
|
2
2
|
limit: facet_limit_for(solr_field)) %>
|
3
3
|
<ul class="slide-list">
|
4
4
|
<% paginator.items.each do |item| -%>
|
5
|
-
|
6
|
-
<% if facet_in_params?( solr_field, item.value ) %>
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
<li>
|
6
|
+
<% if facet_in_params?( solr_field, item.value ) %>
|
7
|
+
<%= render_selected_facet_value(solr_field, item) %>
|
8
|
+
<% else %>
|
9
|
+
<%= render_facet_value(solr_field, item) %>
|
10
10
|
<% end -%>
|
11
11
|
</li>
|
12
12
|
<% end %>
|
@@ -1,19 +1,3 @@
|
|
1
|
-
<%#
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
1
|
<%# there has got to be a hipster ruby way to do this better %>
|
18
2
|
<% if params[:f] %>
|
19
3
|
<% params[:f].each do |k,v| %>
|
@@ -21,7 +5,7 @@ limitations under the License.
|
|
21
5
|
<% link_options = remove_facet_params(k, selected_facet, params).merge!Hash["controller" => "dashboard", :action=> "index"] %>
|
22
6
|
<div class="alert alert-warning">
|
23
7
|
<%= link_to 'X', sufia.url_for(link_options), {:class=>'close', :'data-dismiss' => "alert" } %>
|
24
|
-
<i class="
|
8
|
+
<i class="glyphicon glyphicon-ok"></i> <strong><%= selected_facet %></strong>
|
25
9
|
</div>
|
26
10
|
<% end %>
|
27
11
|
<% end %>
|
@@ -1,23 +1,5 @@
|
|
1
|
-
<%#
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
1
|
<% # main container for facets/limits menu -%>
|
18
2
|
<div>
|
19
|
-
<%= link_to '<i class="icon-upload-alt"></i> Upload File(s)'.html_safe, sufia.new_generic_file_path, {:class => "btn btn-primary"} %><br />
|
20
|
-
<div class="row"> </div>
|
21
3
|
<h2>Browse By</h2>
|
22
4
|
<ul class="nav nav-list" id="facets">
|
23
5
|
<%= render_facet_partials %>
|
@@ -1 +1 @@
|
|
1
|
-
<
|
1
|
+
<div class="col-sm-12 col-md-6 col-lg-6"><h1>My Dashboard</h1></div>
|
@@ -1,36 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
15
|
-
%>
|
16
|
-
|
17
|
-
<table class="table table-striped dashboard">
|
18
|
-
<caption class="accessible-hidden">Listing of files you have deposited in <%= t('sufia.product_name') %></caption>
|
1
|
+
<table class="table table-zebra-striped table-bordered">
|
2
|
+
<caption class="sr-only">Listing of files you have deposited in <%= t('sufia.product_name') %></caption>
|
19
3
|
<% unless params[:display_type] == 'list' %>
|
20
|
-
<thead>
|
4
|
+
<thead>
|
21
5
|
<tr>
|
22
6
|
<th class="sm"><%= render :partial => 'batch_edits/check_all' %></th>
|
23
7
|
<th> </th>
|
24
8
|
<th class="center">Title</th>
|
25
|
-
<th class="sorts-dash"><i id="
|
9
|
+
<th class="sorts-dash"><i id="desc_metadata__date_uploaded_dtsi" class="<%=params[:sort]== "desc_metadata__date_uploaded_dtsi desc" ? 'caret' : params[:sort]== "desc_metadata__date_uploaded_dtsi asc" ? 'caret up' : ''%>"></i>Date Uploaded</th>
|
26
10
|
<th>Visibility</th>
|
27
11
|
<th class="center">Action</th>
|
28
12
|
</tr>
|
29
|
-
</thead>
|
13
|
+
</thead>
|
30
14
|
<% end %>
|
31
|
-
<tbody>
|
15
|
+
<tbody>
|
32
16
|
<% docs.each_with_index do |document,counter| %>
|
33
17
|
<%= render :partial => 'dashboard/_index_partials/list_files', :locals => {:document => document, :counter => counter} %>
|
34
18
|
<% end %>
|
35
|
-
</tbody>
|
19
|
+
</tbody>
|
36
20
|
</table>
|