-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export Coral Organizations #629
base: development
Are you sure you want to change the base?
Export Coral Organizations #629
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this works for me (once I made a copy of CoralSession.php), but I've suggested some improvements.
foreach ($search as $key => $value) { | ||
$search[$key] = trim($value); | ||
} | ||
CoralSession::set('OrgSearch', $search); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work for me, since CoralSession isn't defined as a class for the organizations module. Copying over CoralSession.php from resources/admin/classes/common
would fix this.
@@ -923,6 +923,7 @@ function generateDowntimeHTML($downtime) { | |||
}else{ | |||
$thisPageNum = count($organizationArray) + $pageStart - 1; | |||
echo "<span style='font-weight:bold;'>"._("Displaying ") . $pageStart . _(" to ") . $thisPageNum . _(" of ") . $totalRecords . _(" Organization Records")."</span><br />"; | |||
echo "</span><span style='float:right;width:34px;'><a href='javascript:void(0);'><img src='images/xls.gif' id='export'></a></span>"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has a couple accessibility issues:
- there's no label or alt text
- it can't be activated via keyboard navigation; making the element a button is one way of fixing that
|
||
/* | ||
************************************************************************************************************************** | ||
** CORAL Resources Module v. 1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: "Organizations Module" would be more accurate.
|
||
/* | ||
************************************************************************************************************************** | ||
** CORAL Licenses Module v. 1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: "Organizations Module"
LEFT JOIN Contact C ON C.organizationID = O.organizationID | ||
LEFT JOIN Alias A ON A.organizationID = O.organizationID | ||
LEFT JOIN ContactRoleProfile CRP ON CRP.contactID = C.contactID | ||
LEFT JOIN ContactRole CR ON CR.contactRoleID = CRP.contactRoleID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these joins mean that an organization export may have more rows in the spreadsheet than hits indicated by the organization search. For example, an organization with aliases will show up multiple times in the export.
That may well be OK, as consumers of the export may prefer that to splitting apart repeats merged together via GROUP_CONCAT(), but it's probably worth a note in the documentation.
Export Feature for Coral Organization Module
This PR is an adaption of jcuenod's Resource export feature. It allows the user to download a csv file of all of the Organization information they have currently selected with the search tools.