Skip to content

Commit

Permalink
Merge pull request #1789 from datadryad/bug-fix
Browse files Browse the repository at this point in the history
Sandbox testing adjustments
  • Loading branch information
ahamelers authored Jul 30, 2024
2 parents df4b2de + 682ab5e commit 1f4f2d3
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/scss/_landing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

#landing_readme {
max-height: 35ch;
overflow: hidden;
overflow-y: hidden;
position: relative;

#expand-readme {
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/scss/_table.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.table-wrapper {
display: inline-block;
max-width: 100%;
overflow-x: auto;
overflow-y: hidden;
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/stash_engine/journals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def index
display_journals = @metadata_journals | sponsoring_journals | @api_journals

ord = helpers.sortable_table_order(whitelist: %w[title issn allow_blackout payment_plan_type name parent_org_id sponsor_id default_to_ppr])
@journals = Journal.left_outer_joins(:sponsor).where(id: display_journals).order(ord, title: :asc)
@journals = Journal.left_outer_joins(:sponsor).where(id: display_journals)
.order(ord, title: :asc).preload(:issns).preload(:manuscripts).preload(:sponsor)

respond_to do |format|
format.html
Expand Down
1 change: 1 addition & 0 deletions app/models/stash_engine/journal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Journal < ApplicationRecord
has_many :alternate_titles, class_name: 'StashEngine::JournalTitle', dependent: :destroy
has_many :roles, class_name: 'StashEngine::Role', as: :role_object, dependent: :destroy
has_many :users, through: :roles
has_many :manuscripts, -> { order(created_at: :asc) }, class_name: 'StashEngine::Manuscript'
belongs_to :sponsor, class_name: 'StashEngine::JournalOrganization', optional: true

def payment_plans = %w[SUBSCRIPTION PREPAID DEFERRED TIERED]
Expand Down
2 changes: 1 addition & 1 deletion app/views/stash_engine/admin_dashboard/results.csv.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ head += ',First queued' if @fields.include?('queue_date')
row << dataset.funders.map { |f| ([@fields.include?('funders') ? f.contributor_name : nil] + [@fields.include?('awards') ? f.award_number : nil]).reject(&:blank?).join(', ')}.uniq.reject(&:blank?).join('; ')
end
row << dataset.journal&.title if @fields.include?('journal')
row << dataset..journal&.sponsor&.name if @fields.include?('sponsor')
row << dataset.journal&.sponsor&.name if @fields.include?('sponsor')
if @fields.include?('identifiers')
row << ([dataset.resource_publication&.manuscript_number] + dataset.related_identifiers.map {|id| id.related_identifier.partition('//doi.org/').last}).reject(&:blank?).first(6).join(', ')
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/stash_engine/journals/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Dryad member, you will be responsible for paying the DPC as well as any overage
<% end %>
<td><% if @api_journals.include?(journal.id) || @metadata_journals.include?(journal.id) %><i class="fa fa-check-circle" aria-hidden="true"></i><span class="screen-reader-only">Data integrated</span><% end %></td>
<% if policy(@journals).detail? %>
<td class="c-lined-table__digits"><%= StashEngine::Manuscript.where(journal: journal).order(:created_at)&.last&.created_at.presence || @api_journals.include?(journal.id) ? 'API journal' : ''%></td>
<td class="c-lined-table__digits"><%= journal.manuscripts&.last&.created_at.presence || @api_journals.include?(journal.id) ? 'API journal' : ''%></td>
<td><% if journal.default_to_ppr? %><i class="fa fa-check-circle" aria-hidden="true"></i><span class="screen-reader-only">Default</span><% end %></td>
<% end %>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion app/views/stash_engine/publication_updater/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
<% end %>

<div class="table-wrapper" role="region" tabindex="0" aria-labelledby="pubupdate-label">
<div class="table-wrapper c-lined-table-wrapper" role="region" tabindex="0" aria-labelledby="pubupdate-label">
<table class="c-lined-table c-proposed-change-table">
<thead>
<tr>
Expand Down

0 comments on commit 1f4f2d3

Please sign in to comment.