-
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.
Adds a report of files with no defined purpose
** Why are these changes being introduced: * Staff users need a way to confirm that all files attached to theses have had their purpose identified. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/etd-418 ** How does this address that need: * This creates a new report page, /report/files, which lists all files which have no defined value in their purpose field. The page can be filtered by academic term. Entries appear on this report with a link back to the processing form for that thesis, so that staff can assign a purpose for them. ** Document any side effects to this change: * The tests for this report end up repeating a setup method, attach_files, which was written first for the thesis tests. This repetition is not ideal, but IMO necessary. * The implementation for this report is slightly different than other reports, in that the controller calls the specific list method directly, rather than receiving a collection of lists. This makes the template more bound to this given list, rather than having a generic list partial.
- Loading branch information
1 parent
fff0764
commit a0299a3
Showing
9 changed files
with
173 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,7 @@ def processor | |
|
||
can :manage, :submitter | ||
|
||
can :files, Report | ||
can :index, Report | ||
can :term, Report | ||
|
||
|
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,3 @@ | ||
<tr> | ||
<td colspan="4">There are no files without an assigned purpose within the selected 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,14 @@ | ||
<tr> | ||
<td><%= link_to(files_without_purpose.blob[:filename],thesis_process_path(files_without_purpose[:record_id])) %></td> | ||
<td> | ||
<% files_without_purpose.record.authors.each do |author| %> | ||
<%= author.user.display_name %><br> | ||
<% end %> | ||
</td> | ||
<td> | ||
<% files_without_purpose.record.departments.each do |dept| %> | ||
<%= dept.name_dw %><br> | ||
<% end %> | ||
</td> | ||
<td><%= files_without_purpose[:description] %></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,29 @@ | ||
<%= content_for(:title, "Thesis Reporting | MIT Libraries") %> | ||
|
||
<div class="layout-3q1q layout-band"> | ||
<div class="col3q"> | ||
<h3 class="title title-page">Files without purpose</h3> | ||
|
||
<%= render 'shared/defined_terms_filter' %> | ||
|
||
<table class="table"> | ||
<caption></caption> | ||
<thead> | ||
<tr> | ||
<th scope="col">File</th> | ||
<th scope="col">Authors</th> | ||
<th scope="col">Departments</th> | ||
<th scope="col">Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render(partial: 'report/files_without_purpose', collection: @list) || render('files_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