Skip to content

Commit

Permalink
1. remove cruft.
Browse files Browse the repository at this point in the history
2. js string fix.
3. add kaminari to gemfile -- this will replace will_paginate
  • Loading branch information
machinehum committed Oct 30, 2023
1 parent 6377591 commit 72d75e5
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 147 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update -qq && apt-get install -y \
RUN mkdir /app
WORKDIR /app
COPY Gemfile /app/Gemfile
#COPY Gemfile.lock /app/Gemfile.lock
COPY Gemfile.lock /app/Gemfile.lock
RUN bundle install
COPY . /app

Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ gem 'haml'
gem 'nokogiri'
gem 'simple_form'
gem 'breadcrumbs_on_rails'
gem 'kaminari'
gem 'mail_form'
gem 'will_paginate'
gem 'will_paginate-bootstrap4'
Expand Down
17 changes: 15 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,18 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.6.3)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
kaminari-activerecord (= 1.2.2)
kaminari-core (= 1.2.2)
kaminari-actionview (1.2.2)
actionview
kaminari-core (= 1.2.2)
kaminari-activerecord (1.2.2)
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand All @@ -218,7 +230,7 @@ GEM
multi_xml (0.6.0)
multipart-post (2.3.0)
mutex_m (0.1.2)
net-imap (0.4.2)
net-imap (0.4.3)
date
net-protocol
net-ldap (0.18.0)
Expand Down Expand Up @@ -282,7 +294,7 @@ GEM
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.0.6)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
Expand Down Expand Up @@ -395,6 +407,7 @@ DEPENDENCIES
jbuilder (~> 2.0)
jquery-rails (= 4.3.5)
json
kaminari
listen
mail_form
net-ldap
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/views/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $('#contact-study-team-modal').on('show.bs.modal', function (event) {
var trialId = button.data('trial-id');
var modal = $(this);
// pass some trial attributes from the search results into the modal
modal.find('.study-email').text(studyEmail).attr('href', 'mailto:' + studyEmail + "?bcc=sfinder+study-team-emails@umn.edu");
modal.find('.study-email').text(studyEmail).attr('href', 'mailto:' + studyEmail + "?bcc=" + STUDY_CONTACT_BCC);
modal.find('#contact-study-team-modal-submit').data('trial_id', trialId).data('button', button);

if(window.studyTeamWidget !== undefined) {
Expand Down
8 changes: 8 additions & 0 deletions app/models/system_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ def self.ga_version
self.first.try(:google_analytics_version)
end

def self.default_email
self.first.try(:default_email)
end

def self.study_contact_bcc
self.first.try(:study_contact_bcc)
end

end
2 changes: 2 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
</head>
<body>
<script>
const DEFAULT_EMAIL = '<%= SystemInfo.default_email %>';
const STUDY_CONTACT_BCC = '<%= SystemInfo.study_contact_bcc %>';
const GA_VERSION = <%= SystemInfo.ga_version %>;
</script>
<div class="container main-content">
Expand Down
11 changes: 1 addition & 10 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@

module StudyFinder
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
#config.load_defaults 5.0

# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
config.load_defaults 7.0
end
end
74 changes: 0 additions & 74 deletions lib/tasks/correspondance.rake

This file was deleted.

55 changes: 0 additions & 55 deletions lib/tasks/synonyms.rake

This file was deleted.

4 changes: 0 additions & 4 deletions vendor/assets/stylesheets/font-awesome.min.css

This file was deleted.

0 comments on commit 72d75e5

Please sign in to comment.