Skip to content

Commit

Permalink
Remove tagcloud widget from the home page
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Mar 30, 2016
1 parent 3fec79b commit fe892d7
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 303 deletions.
19 changes: 0 additions & 19 deletions README.md
Expand Up @@ -66,7 +66,6 @@ After running these steps, browse to http://localhost:3000/ and you should see t
* [Capturing usage](#capturing-usage)
* [Displaying usage in the UI](#displaying-usage-in-the-ui)
* [Zotero integration](#zotero-integration)
* [Tag Cloud](#tag-cloud)
* [Customizing metadata](#customizing-metadata)
* [Admin Users](#admin-users)
* [One time setup for first admin](#one-time-setup-for-first-admin)
Expand Down Expand Up @@ -511,24 +510,6 @@ Tweak `config/zotero.yml` to hold your Zotero OAuth client key and secret. Alter

Restart your app and it should now be able to pull in Zotero-managed publications on behalf of your users. Each user will need to link their Sufia app account with their Zotero accounts, which can be done in the "Edit Profile" page. After the accounts are linked, Arkivo will create a subscription to that user's Zotero-hosted "My Publications" collection. When users add items to their "My Publications" collection via the Zotero client, they will automatically be pushed into the Sufia-based repository application. Updates to these items will trigger updates to item metadata in your app, and deletes will delete the files from your app.

## Tag Cloud

Sufia provides a tag cloud on the home page. To change which field is displayed in that cloud, change the value of `config.tag_cloud_field_name` in the `blacklight_config` section of your CatalogController. For example:

```ruby
configure_blacklight do |config|
...

# Specify which field to use in the tag cloud on the homepage.
# To disable the tag cloud, comment out this line.
config.tag_cloud_field_name = Solrizer.solr_name("tag", :facetable)
end
```

If your CatalogController was generated by a version of Sufia older than 3.7.3 you need to add that line to the Nlacklight configuration in order to make the tag cloud appear.

The contents of the cloud are retrieved as JSON from Blacklight's CatalogController#facet method. If you need to change how that content is returned (ie. if you need to limit the number of results), override the `render_facet_list_as_json` method in your CatalogController.

## Customizing metadata

Chances are you will want to customize the default metadata provided by Sufia. Here's [a guide](https://github.com/projecthydra/sufia/wiki/Customizing-Metadata) to help you with that
Expand Down
44 changes: 0 additions & 44 deletions app/assets/javascripts/jquery.blacklightTagCloud.js

This file was deleted.

116 changes: 0 additions & 116 deletions app/assets/javascripts/jquery.tagcloud.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/assets/javascripts/sufia.js
Expand Up @@ -59,8 +59,6 @@
//= require jquery.treetable
//= require browse_everything/behavior
//
//= require jquery.blacklightTagCloud
//= require sufia/tagcloud
//= require nestable

// this needs to be after batch_select so that the form ids get setup correctly
Expand Down
12 changes: 0 additions & 12 deletions app/assets/javascripts/sufia/tagcloud.js

This file was deleted.

2 changes: 1 addition & 1 deletion app/assets/stylesheets/sufia.css.scss
Expand Up @@ -18,7 +18,7 @@
// TODO: Probably should use import throughout and move all of Sufia's stylesheets into a single named directory.
@import 'sufia/settings', 'sufia/header', 'sufia/styles', 'sufia/file-listing',
'sufia/collections', 'sufia/batch-edit', 'sufia/dashboard', 'sufia/home-page',
'sufia/featured', 'sufia/tagcloud', 'sufia/usage-stats', 'sufia/catalog', 'sufia/buttons',
'sufia/featured', 'sufia/usage-stats', 'sufia/catalog', 'sufia/buttons',
'sufia/tinymce', 'sufia/proxy-rights', 'sufia/file-show', 'sufia/modal',
'sufia/form-progress';
@import 'hydra-editor/multi_value_fields';
Expand Down
87 changes: 0 additions & 87 deletions app/assets/stylesheets/sufia/_tagcloud.scss

This file was deleted.

9 changes: 0 additions & 9 deletions app/views/sufia/homepage/_home_content.html.erb
Expand Up @@ -16,13 +16,4 @@
<div>
<%= render partial: 'featured_researcher' %>
</div>
<div>
<%- if blacklight_config.respond_to?(:tag_cloud_field_name) && blacklight_config.tag_cloud_field_name %>
<div class="row">
<h2 class="heading1 pull-left"><%= t('sufia.homepage.explore') %></h2>
<span class="sr-only"><%= t('sufia.homepage.sr_explore') %></span>
<%= render partial: 'tagcloud', locals: { tag_cloud_field_name: blacklight_config.tag_cloud_field_name } %>
</div>
<%- end %>
</div>
</div>
7 changes: 0 additions & 7 deletions app/views/sufia/homepage/_tagcloud.html.erb

This file was deleted.

2 changes: 0 additions & 2 deletions config/locales/sufia.en.yml
Expand Up @@ -74,8 +74,6 @@ en:
details: 'Details'
tab_label: 'Recently Uploaded'
no_public: 'No public work has been contributed.'
explore: 'Explore'
sr_explore: 'Popular Keywords'
dashboard:
title: "My Dashboard"
greeting: "Hello, "
Expand Down
4 changes: 0 additions & 4 deletions lib/generators/sufia/templates/catalog_controller.rb
Expand Up @@ -37,10 +37,6 @@ def self.modified_field
qf: "title_tesim name_tesim"
}

# Specify which field to use in the tag cloud on the homepage.
# To disable the tag cloud, comment out this line.
config.tag_cloud_field_name = Solrizer.solr_name("tag", :facetable)

# solr field configuration for document/show views
config.index.title_field = solr_name("title", :stored_searchable)
config.index.display_type_field = solr_name("has_model", :symbol)
Expand Down

0 comments on commit fe892d7

Please sign in to comment.