-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why these changes are being introduced: We need to be able to see the holds for a given degree period, filtered by hold source. Relevant ticket(s): https://mitlibraries.atlassian.net/browse/ETD-462 How this addresses that need: This adds a report of holds that allows filtering on thesis grad date and hold source. Side effects of this change: * Report#extract_terms now checks for the type of items in the collection, so as to accommodate non-thesis collections.
- Loading branch information
Showing
11 changed files
with
233 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<tr> | ||
<td><%= link_to title_helper(hold.thesis), edit_admin_thesis_path(hold.thesis.id) %></td> | ||
<td> | ||
<% hold.thesis.authors.each do |author| %> | ||
<%= author.user.display_name %><br> | ||
<% end %> | ||
</td> | ||
<td><%= hold.thesis.graduation_month[...3] %> <%= hold.thesis.graduation_year %></td> | ||
<td><%= hold.hold_source.source %></td> | ||
<td><%= hold.status %></td> | ||
<td><%= hold.date_requested %></td> | ||
<td><%= hold.date_end %></td> | ||
<td><%= hold.date_released %></td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<tr> | ||
<td colspan="8">There are no holds for the given term.</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<%= form_tag(nil, method: "get") do %> | ||
<div class="multi-form-tag"> | ||
<label> | ||
Include only theses from: | ||
<select name="graduation"> | ||
<option value="all">All terms</option> | ||
<% @terms.each do |term| %> | ||
<option value="<%= term %>"<%= ' selected="selected"'.html_safe if params[:graduation].to_s == term.to_s %>> | ||
<%= term.in_time_zone('Eastern Time (US & Canada)').strftime('%b %Y') %> | ||
</option> | ||
<% end %> | ||
</select> | ||
</label> | ||
</div> | ||
|
||
<div class="multi-form-tag"> | ||
<label> | ||
Filter by hold source: | ||
<select name="hold_source"> | ||
<option value="all">All sources</option> | ||
<% @hold_sources.each do |source| %> | ||
<option value="<%= source %>"<%= ' selected="selected"'.html_safe if params[:hold_source].to_s == source.to_s %>> | ||
<%= source %> | ||
</option> | ||
<% end %> | ||
</select> | ||
</label> | ||
</div> | ||
|
||
<%= submit_tag('Apply filters', class: 'btn button-primary') %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<%= content_for(:title, "Thesis Reporting | MIT Libraries") %> | ||
|
||
<div class="layout-3q1q layout-band"> | ||
<div class="col3q"> | ||
<h3 class="title title-page">Holds by source for <%= @this_term %></h3> | ||
|
||
<%= render 'holds_by_source_filter' %> | ||
|
||
<table class="table" summary="This table presents a list of holds filtered by source." | ||
title="Student submitted metadata"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Title</th> | ||
<th scope="col">Author(s)</th> | ||
<th scope="col">Grad date</th> | ||
<th scope="col">Hold source</th> | ||
<th scope="col">Status</th> | ||
<th scope="col">Date requested</th> | ||
<th scope="col">End date</th> | ||
<th scope="col">Date released</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render(partial: 'hold', collection: @list) || render('hold_empty') %> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<aside class="content-sup col1q-r"> | ||
<%= render 'shared/report_submenu' %> | ||
</aside> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters