Skip to content

Commit

Permalink
Merge pull request #1197 from samvera-labs/remove_content_block_tech_…
Browse files Browse the repository at this point in the history
…debt_1161

Remove ContentBlock-related technical debt
  • Loading branch information
mjgiarlo committed Jun 2, 2017
2 parents 3b0bc76 + 0bf1604 commit e2366a8
Show file tree
Hide file tree
Showing 29 changed files with 29 additions and 511 deletions.
3 changes: 1 addition & 2 deletions .hound.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ruby:
enabled: true
config_file: .rubocop.yml
enabled: false

scss:
enabled: true
Expand Down
5 changes: 0 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ gem 'peek-redis'
gem 'flipflop', '~> 2.3'
gem 'lograge'

# Pinned up tight until these are resolved:
# https://github.com/PerfectlyNormal/tinymce-rails-imageupload/issues/86
# https://github.com/PerfectlyNormal/tinymce-rails-imageupload/issues/87
gem 'tinymce-rails-imageupload', '4.0.17.beta'

gem 'zk'

gem 'mods', '~> 2.1'
Expand Down
36 changes: 16 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/projecthydra-labs/hyrax.git
revision: 731ac86078436f96329ea0bf8a3aa050ff7ee1ab
revision: 211d3ef43f221719783f92f011514f2dc135886a
specs:
hyrax (2.0.0.alpha)
active-fedora (>= 11.1.3)
Expand Down Expand Up @@ -36,8 +36,8 @@ GIT
posix-spawn
power_converter (~> 0.1, >= 0.1.2)
qa (~> 1.0)
rails (~> 5.0)
rails_autolink (~> 1.1)
railties (~> 5.0)
rdf-rdfxml
redis-namespace (~> 1.5.2)
redlock (>= 0.1.2)
Expand Down Expand Up @@ -92,7 +92,7 @@ GEM
active_elastic_job (2.0.1)
aws-sdk (~> 2)
rails (>= 4.2)
active_fedora-noid (2.1.0)
active_fedora-noid (2.2.0)
active-fedora (>= 9.7, < 12)
noid (~> 0.9)
rails (>= 5.0.0, < 6)
Expand Down Expand Up @@ -126,13 +126,13 @@ GEM
execjs
awesome_nested_set (3.1.3)
activerecord (>= 4.0.0, < 5.2)
aws-sdk (2.9.23)
aws-sdk-resources (= 2.9.23)
aws-sdk-core (2.9.23)
aws-sdk (2.9.28)
aws-sdk-resources (= 2.9.28)
aws-sdk-core (2.9.28)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.9.23)
aws-sdk-core (= 2.9.23)
aws-sdk-resources (2.9.28)
aws-sdk-core (= 2.9.28)
aws-sigv4 (1.0.0)
babel-source (5.8.35)
babel-transpiler (0.7.0)
Expand Down Expand Up @@ -244,7 +244,7 @@ GEM
dry-container (0.6.0)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.1, >= 0.1.3)
dry-core (0.3.0)
dry-core (0.3.1)
concurrent-ruby (~> 1.0)
dry-equalizer (0.2.0)
dry-logic (0.4.1)
Expand Down Expand Up @@ -299,15 +299,15 @@ GEM
railties (>= 3.2, < 5.2)
globalid (0.4.0)
activesupport (>= 4.2.0)
google-api-client (0.11.2)
google-api-client (0.11.3)
addressable (>= 2.5.1)
googleauth (~> 0.5)
httpclient (>= 2.8.1, < 3.0)
mime-types (>= 3.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
google_drive (2.1.3)
google-api-client (>= 0.11.0, < 1.0.0)
google_drive (2.1.4)
google-api-client (>= 0.11.0, < 0.12.0)
googleauth (>= 0.5.0, < 1.0.0)
nokogiri (>= 1.5.3, < 2.0.0)
googleauth (0.5.1)
Expand Down Expand Up @@ -372,7 +372,7 @@ GEM
hydra-file_characterization (~> 0.3, >= 0.3.3)
hydra-pcdm (>= 0.9)
om (~> 3.1)
i18n (0.8.1)
i18n (0.8.4)
i18n-debug (1.1.0)
i18n (< 1)
ice_nine (0.11.2)
Expand Down Expand Up @@ -501,15 +501,15 @@ GEM
nest (2.1.0)
redic
net-http-persistent (2.9.4)
nio4r (2.0.0)
nio4r (2.1.0)
noid (0.9.0)
nokogiri (1.7.2)
mini_portile2 (~> 2.1.0)
nom-xml (0.6.0)
activesupport (>= 3.2.18)
i18n
nokogiri
oauth (0.5.2)
oauth (0.5.3)
oauth2 (1.3.1)
faraday (>= 0.8, < 0.12)
jwt (~> 1.0)
Expand Down Expand Up @@ -804,11 +804,8 @@ GEM
thread_safe (0.3.6)
tilt (2.0.7)
tins (1.14.0)
tinymce-rails (4.6.2)
tinymce-rails (4.6.3)
railties (>= 3.1.1)
tinymce-rails-imageupload (4.0.17.beta)
railties (>= 3.2, < 6)
tinymce-rails (~> 4.0)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.3)
Expand Down Expand Up @@ -902,7 +899,6 @@ DEPENDENCIES
solr_wrapper (~> 1.0)
spring (~> 1.7)
spring-watcher-listen (~> 2.0.0)
tinymce-rails-imageupload (= 4.0.17.beta)
turbolinks (~> 5)
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
Expand Down
31 changes: 0 additions & 31 deletions app/controllers/content_blocks_controller.rb

This file was deleted.

1 change: 1 addition & 0 deletions app/controllers/labels_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class LabelsController < SitesController
def edit
add_breadcrumb t(:'hyrax.controls.home'), root_path
add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path
add_breadcrumb t(:'hyrax.admin.sidebar.configuration'), '#'
add_breadcrumb t(:'hyrax.admin.sidebar.labels'), edit_site_labels_path
end

Expand Down
1 change: 0 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module ApplicationHelper
include ::HyraxHelper
include ContentBlockHelper
include GroupNavigationHelper
end
11 changes: 0 additions & 11 deletions app/helpers/content_block_helper.rb

This file was deleted.

4 changes: 0 additions & 4 deletions app/models/content_block.rb

This file was deleted.

34 changes: 0 additions & 34 deletions app/models/hyku/content_block_behavior.rb

This file was deleted.

11 changes: 1 addition & 10 deletions app/models/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,11 @@ class Site < ActiveRecord::Base
mount_uploader :banner_image, BannerImageUploader

belongs_to :account
has_many :content_blocks
accepts_nested_attributes_for :account, update_only: true

delegate :announcement_text, :marketing_text, :featured_researcher,
:announcement_text=, :marketing_text=, :featured_researcher=,
:about_page, :about_page=, :help_page, :help_page=,
to: :content_blocks

class << self
delegate :account, :application_name, :institution_name,
:institution_name_full, :reload, :update, :announcement_text,
:marketing_text, :featured_researcher, :announcement_text=,
:marketing_text=, :featured_researcher=,
:about_page, :about_page=, :help_page, :help_page=,
:institution_name_full, :reload, :update,
to: :instance

def instance
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/hyku/menu_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class MenuPresenter < Hyrax::MenuPresenter
# Returns true if the current controller happens to be one of the controllers that deals
# with settings. This is used to keep the parent section on the sidebar open.
def settings_section?
%w(appearances content_blocks labels features).include?(controller_name)
%w(appearances content_blocks labels features pages).include?(controller_name)
end

# Returns true if the current controller happens to be one of the controllers that deals
Expand Down
101 changes: 0 additions & 101 deletions app/views/content_blocks/_form.html.erb

This file was deleted.

9 changes: 0 additions & 9 deletions app/views/content_blocks/edit.html.erb

This file was deleted.

7 changes: 5 additions & 2 deletions app/views/hyrax/dashboard/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,11 @@
<span class="fa fa-paint-brush"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.appearance') %></span>
<% end %>
<% end %>
<%= menu.nav_link(main_app.edit_site_content_blocks_path) do %>
<span class="fa fa-file-text-o"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.content_blocks') %></span>
<%= menu.nav_link(hyrax.edit_pages_path) do %>
<span class="fa fa-file-text-o"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.pages') %></span>
<% end %>
<%= menu.nav_link(hyrax.edit_content_blocks_path) do %>
<span class="fa fa-square-o"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.content_blocks') %></span>
<% end %>
<%= menu.nav_link(hyrax.admin_features_path) do %>
<span class="fa fa-wrench"></span> <span class="sidebar-action-text">Technical</span>
Expand Down
1 change: 0 additions & 1 deletion app/views/hyrax/homepage/_announcement.html.erb

This file was deleted.

0 comments on commit e2366a8

Please sign in to comment.