From 8f58ea8d3dbc7ba0f5d30e2429623bbfc2ec1c8c Mon Sep 17 00:00:00 2001 From: Morgan Lesko Date: Sat, 11 May 2019 15:00:20 -0400 Subject: [PATCH] Trying to Move Dynamic Models --- .DS_Store | Bin 0 -> 6148 bytes src/Controllers/DepartmentScores.php | 14 ++-- src/Controllers/OpenAjax.php | 6 +- src/Controllers/OpenComplaintConditions.php | 10 ++- src/Controllers/OpenComplaintEmails.php | 6 +- src/Controllers/OpenComplaintPrints.php | 5 +- src/Controllers/OpenComplaintSaves.php | 10 +-- src/Controllers/OpenDashAdmin.php | 14 ++-- src/Controllers/OpenDepts.php | 12 ++-- src/Controllers/OpenInitExtras.php | 14 ++-- src/Controllers/OpenListing.php | 10 +-- src/Controllers/OpenPartners.php | 10 +-- src/Controllers/OpenPolice.php | 18 ++--- src/Controllers/OpenPoliceAdmin.php | 38 +++++----- src/Controllers/OpenPoliceSearcher.php | 4 +- src/Controllers/OpenPoliceUtils.php | 30 ++++---- src/Controllers/OpenReport.php | 22 +++--- src/Controllers/OpenReportTools.php | 12 ++-- src/Controllers/OpenSessDataOverride.php | 2 +- src/Controllers/OpenVolunteers.php | 6 +- src/Controllers/VolunteerLeaderboard.php | 4 +- src/Models/OPAdminActions.php | 2 +- src/Models/OPAdministrators.php | 2 +- src/Models/OPAllegSilver.php | 2 +- src/Models/OPAllegations.php | 2 +- src/Models/OPArrests.php | 2 +- src/Models/OPBodyParts.php | 2 +- src/Models/OPCharges.php | 2 +- src/Models/OPCivWeapons.php | 2 +- src/Models/OPCivilians.php | 2 +- src/Models/OPComplaintDeptLinks.php | 2 +- src/Models/OPComplaintNotes.php | 2 +- src/Models/OPComplaintOversight.php | 2 +- src/Models/OPComplaints.php | 2 +- src/Models/OPCompliments.php | 2 +- src/Models/OPCustomers.php | 2 +- src/Models/OPDataRequests.php | 2 +- src/Models/OPDepartments.php | 2 +- src/Models/OPEventSequence.php | 2 +- src/Models/OPEvidence.php | 2 +- src/Models/OPEvidenceTime.php | 2 +- src/Models/OPForce.php | 2 +- src/Models/OPForceBodyParts.php | 2 +- src/Models/OPForceCivBody.php | 2 +- src/Models/OPForceSubType.php | 2 +- src/Models/OPIncidents.php | 2 +- src/Models/OPInjuries.php | 2 +- src/Models/OPInjuryBodyParts.php | 2 +- src/Models/OPInjuryCare.php | 2 +- src/Models/OPLinksCivilianAllegations.php | 2 +- src/Models/OPLinksCivilianEvents.php | 2 +- src/Models/OPLinksCivilianOrders.php | 2 +- src/Models/OPLinksCivilianVehicles.php | 2 +- src/Models/OPLinksComplaintDept.php | 2 +- src/Models/OPLinksComplaintOversight.php | 2 +- src/Models/OPLinksComplimentDept.php | 2 +- src/Models/OPLinksOfficerAllegations.php | 2 +- src/Models/OPLinksOfficerEvents.php | 2 +- src/Models/OPLinksOfficerOrders.php | 2 +- src/Models/OPLinksOfficerVehicles.php | 2 +- src/Models/OPOffCompliments.php | 2 +- src/Models/OPOfficers.php | 2 +- src/Models/OPOrders.php | 2 +- src/Models/OPOversight.php | 2 +- src/Models/OPOversightModels.php | 2 +- src/Models/OPPartnerCapac.php | 2 +- src/Models/OPPartnerCaseTypes.php | 2 +- src/Models/OPPartnerFilters.php | 2 +- src/Models/OPPartnerStates.php | 2 +- src/Models/OPPartners.php | 2 +- src/Models/OPPeopleEventLinks.php | 2 +- src/Models/OPPersonContact.php | 2 +- src/Models/OPPhysicalDesc.php | 2 +- src/Models/OPPhysicalDescRace.php | 2 +- src/Models/OPPrivilegeProfiles.php | 2 +- src/Models/OPScenes.php | 2 +- src/Models/OPSearchContra.php | 2 +- src/Models/OPSearchSeize.php | 2 +- src/Models/OPSearches.php | 2 +- src/Models/OPStopReasons.php | 2 +- src/Models/OPStops.php | 2 +- src/Models/OPSurveys.php | 2 +- src/Models/OPTesterBeta.php | 2 +- src/Models/OPUsers.php | 2 +- src/Models/OPVehiclePersons.php | 2 +- src/Models/OPVehicles.php | 2 +- src/Models/OPVisitors.php | 2 +- src/Models/OPZeditDepartments.php | 2 +- src/Models/OPZeditOversight.php | 2 +- src/Models/OPzComplaintReviews.php | 2 +- src/Models/OPzVolunStatDays.php | 2 +- src/Models/OPzVolunUserInfo.php | 2 +- src/OpenPoliceServiceProvider.php | 4 +- .../1418-admin-complaints-listing.blade.php | 66 ++++++++---------- .../1714-report-inc-owner-tools.blade.php | 4 +- src/Views/nodes/2234-beta-listing.blade.php | 29 ++++---- 96 files changed, 246 insertions(+), 246 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5172429f264de2441865cb4700216d4256da9242 GIT binary patch literal 6148 zcmeH~J!%6%427R!7lt%jx}3%b$PET#pTHLgIFQEJ;E>dF^gR7ES*H$5cmnB-G%I%Z zD|S`@Z2$T80!#olbXV*=%*>dt@PRwdU#I)^a=X5>;#J@&VrHyNnC;iLL0pQvfVyTmjO&;ssLc!1UOG})p;=82 zR;?Ceh}WZ?+UmMqI#RP8R>OzYoz15hnq@nzF`-!xQ4j$Um=RcIKKc27r2jVm&svm< zfC&6E0=7P!4tu^-ovjbA=k?dB`g+i*aXG_}p8zI)6mRKa+;6_1_R^8c3Qa!(fk8n8 H{*=HsM+*^= literal 0 HcmV?d00001 diff --git a/src/Controllers/DepartmentScores.php b/src/Controllers/DepartmentScores.php index 9ec3234..ca55b9c 100644 --- a/src/Controllers/DepartmentScores.php +++ b/src/Controllers/DepartmentScores.php @@ -3,14 +3,14 @@ use DB; use Auth; -use App\Models\User; -use App\Models\OPDepartments; -use App\Models\OPOversight; -use App\Models\OPzComplaintReviews; -use App\Models\OPZeditDepartments; -use App\Models\OPZeditOversight; +use Storage\App\Models\User; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPOversight; +use Storage\App\Models\OPzComplaintReviews; +use Storage\App\Models\OPZeditDepartments; +use Storage\App\Models\OPZeditOversight; -use App\Models\OPOversightModels; +use Storage\App\Models\OPOversightModels; class DepartmentScores { diff --git a/src/Controllers/OpenAjax.php b/src/Controllers/OpenAjax.php index 04caa0c..7a805d2 100644 --- a/src/Controllers/OpenAjax.php +++ b/src/Controllers/OpenAjax.php @@ -4,9 +4,9 @@ use DB; use Auth; use Illuminate\Http\Request; -use App\Models\User; -use App\Models\OPDepartments; -use App\Models\SLZips; +use Storage\App\Models\User; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\SLZips; use OpenPolice\Controllers\OpenComplaintSaves; class OpenAjax extends OpenComplaintSaves diff --git a/src/Controllers/OpenComplaintConditions.php b/src/Controllers/OpenComplaintConditions.php index 0f14f2f..15dc2b4 100644 --- a/src/Controllers/OpenComplaintConditions.php +++ b/src/Controllers/OpenComplaintConditions.php @@ -3,8 +3,8 @@ use DB; use Auth; -use App\Models\OPPartners; -use App\Models\SLEmailed; +use Storage\App\Models\OPPartners; +use Storage\App\Models\SLEmailed; use OpenPolice\Controllers\OpenSessDataOverride; class OpenComplaintConditions extends OpenSessDataOverride @@ -141,7 +141,7 @@ protected function checkNodeConditionsCustom($nID, $condition = '') } elseif ($condition == '#HasUploads') { return $this->complaintHasUploads(); } elseif ($condition == '#ShowUploads') { - if ($this->complaintHasUploads() == 0 || !isset($this->sessData->dataSets["Complaints"][0]->ComPrivacy)) { + if ($this->complaintHasUploads() == 0) { return 0; } if ($this->v["isAdmin"] || $this->v["isOwner"]) { @@ -155,6 +155,10 @@ protected function checkNodeConditionsCustom($nID, $condition = '') return 0; } // else Full Transparency, but check status first... return $this->complaintHasPublishedStatus(); + } elseif ($condition == '#CanEditUploads') { + if ($this->v["isAdmin"]) { + return 1; + } } elseif ($condition == '#PrintAnonOnly') { if (isset($GLOBALS["SL"]->x["pageView"]) && in_array($GLOBALS["SL"]->x["pageView"], ['public', 'pdf']) && isset($this->sessData->dataSets["Complaints"][0]->ComStatus) diff --git a/src/Controllers/OpenComplaintEmails.php b/src/Controllers/OpenComplaintEmails.php index 278368f..d23339a 100644 --- a/src/Controllers/OpenComplaintEmails.php +++ b/src/Controllers/OpenComplaintEmails.php @@ -3,9 +3,9 @@ use DB; use Auth; -use App\Models\OPAllegSilver; -use App\Models\OPDepartments; -use App\Models\OPOversight; +use Storage\App\Models\OPAllegSilver; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPOversight; use OpenPolice\Controllers\OpenPoliceUtils; class OpenComplaintEmails extends OpenPoliceUtils diff --git a/src/Controllers/OpenComplaintPrints.php b/src/Controllers/OpenComplaintPrints.php index 709033e..1f1911f 100644 --- a/src/Controllers/OpenComplaintPrints.php +++ b/src/Controllers/OpenComplaintPrints.php @@ -3,8 +3,8 @@ use DB; use Auth; -use App\Models\OPAllegations; -use App\Models\OPAllegSilver; +use Storage\App\Models\OPAllegations; +use Storage\App\Models\OPAllegSilver; use OpenPolice\Controllers\OpenComplaintEmails; class OpenComplaintPrints extends OpenComplaintEmails @@ -167,7 +167,6 @@ protected function customLabels($nIDtxt = '', $str = '') protected function getLoopItemLabelCustom($loop, $itemRow = null, $itemInd = -3) { -//echo '


getLoopItemLabelCustom(' . $loop . '
'; print_r($itemRow); echo '
'; //if ($itemIndex < 0) return ''; if (!$itemRow) { return ''; diff --git a/src/Controllers/OpenComplaintSaves.php b/src/Controllers/OpenComplaintSaves.php index 31c0f30..02455d0 100644 --- a/src/Controllers/OpenComplaintSaves.php +++ b/src/Controllers/OpenComplaintSaves.php @@ -3,11 +3,11 @@ use DB; use Auth; -use App\Models\OPStops; -use App\Models\OPInjuries; -use App\Models\OPLinksCivilianEvents; -use App\Models\OPLinksCivilianVehicles; -use App\Models\OPLinksOfficerVehicles; +use Storage\App\Models\OPStops; +use Storage\App\Models\OPInjuries; +use Storage\App\Models\OPLinksCivilianEvents; +use Storage\App\Models\OPLinksCivilianVehicles; +use Storage\App\Models\OPLinksOfficerVehicles; use OpenPolice\Controllers\OpenComplaintConditions; class OpenComplaintSaves extends OpenComplaintConditions diff --git a/src/Controllers/OpenDashAdmin.php b/src/Controllers/OpenDashAdmin.php index 184a7eb..528d3a5 100644 --- a/src/Controllers/OpenDashAdmin.php +++ b/src/Controllers/OpenDashAdmin.php @@ -2,13 +2,13 @@ namespace OpenPolice\Controllers; use DB; -use App\Models\User; -use App\Models\OPComplaints; -use App\Models\OPLinksComplaintOversight; -use App\Models\OPDepartments; -use App\Models\OPZeditDepartments; -use App\Models\OPZeditOversight; -use App\Models\OPzVolunStatDays; +use Storage\App\Models\User; +use Storage\App\Models\OPComplaints; +use Storage\App\Models\OPLinksComplaintOversight; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPZeditDepartments; +use Storage\App\Models\OPZeditOversight; +use Storage\App\Models\OPzVolunStatDays; use SurvLoop\Controllers\Stats\SurvTrends; class OpenDashAdmin diff --git a/src/Controllers/OpenDepts.php b/src/Controllers/OpenDepts.php index d12814e..f7cfb63 100644 --- a/src/Controllers/OpenDepts.php +++ b/src/Controllers/OpenDepts.php @@ -5,12 +5,12 @@ use Auth; use Illuminate\Support\Str; use Illuminate\Http\Request; -use App\Models\OPDepartments; -use App\Models\OPZeditDepartments; -use App\Models\OPZeditOversight; -use App\Models\OPzVolunTmp; -use App\Models\OPOversight; -use App\Models\OPLinksComplaintOversight; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPZeditDepartments; +use Storage\App\Models\OPZeditOversight; +use Storage\App\Models\OPzVolunTmp; +use Storage\App\Models\OPOversight; +use Storage\App\Models\OPLinksComplaintOversight; use OpenPolice\Controllers\DepartmentScores; use OpenPolice\Controllers\OpenListing; diff --git a/src/Controllers/OpenInitExtras.php b/src/Controllers/OpenInitExtras.php index 204b069..b32570f 100644 --- a/src/Controllers/OpenInitExtras.php +++ b/src/Controllers/OpenInitExtras.php @@ -3,13 +3,13 @@ use DB; use Illuminate\Http\Request; -use App\Models\User; -use App\Models\OPComplaints; -use App\Models\OPDepartments; -use App\Models\OPLinksComplaintDept; -use App\Models\OPLinksComplimentDept; -use App\Models\OPPersonContact; -use App\Models\OPzVolunUserInfo; +use Storage\App\Models\User; +use Storage\App\Models\OPComplaints; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPLinksComplaintDept; +use Storage\App\Models\OPLinksComplimentDept; +use Storage\App\Models\OPPersonContact; +use Storage\App\Models\OPzVolunUserInfo; use OpenPolice\Controllers\OpenPartners; class OpenInitExtras extends OpenPartners diff --git a/src/Controllers/OpenListing.php b/src/Controllers/OpenListing.php index d1feac3..50389d0 100644 --- a/src/Controllers/OpenListing.php +++ b/src/Controllers/OpenListing.php @@ -2,10 +2,10 @@ namespace OpenPolice\Controllers; use DB; -use App\Models\OPComplaints; -use App\Models\OPCompliments; -use App\Models\SLNode; -use App\Models\OPTesterBeta; +use Storage\App\Models\OPComplaints; +use Storage\App\Models\OPCompliments; +use Storage\App\Models\SLNode; +use Storage\App\Models\OPTesterBeta; use OpenPolice\Controllers\OpenAjax; class OpenListing extends OpenAjax @@ -57,7 +57,7 @@ protected function printComplaintListing($view = 'all') } $this->v["fltStatus"] = (($GLOBALS["SL"]->REQ->has('fltStatus')) ? $GLOBALS["SL"]->REQ->fltStatus : 0); $sort = "date"; - $qman = "SELECT c.*, p.`PrsnNameFirst`, p.`PrsnNameLast`, i.* + $qman = "SELECT c.*, p.`PrsnNameFirst`, p.`PrsnNameLast`, p.`PrsnEmail`, i.* FROM `OP_Complaints` c JOIN `OP_Incidents` i ON c.`ComIncidentID` LIKE i.`IncID` LEFT OUTER JOIN `OP_Civilians` civ ON c.`ComID` LIKE civ.`CivComplaintID` diff --git a/src/Controllers/OpenPartners.php b/src/Controllers/OpenPartners.php index 53e4e63..2299529 100644 --- a/src/Controllers/OpenPartners.php +++ b/src/Controllers/OpenPartners.php @@ -3,11 +3,11 @@ use DB; use Illuminate\Http\Request; -use App\Models\OPPartners; -use App\Models\OPOversight; -use App\Models\OPLinksComplaintDept; -use App\Models\OPPartnerCaseTypes; -use App\Models\OPPartnerCapac; +use Storage\App\Models\OPPartners; +use Storage\App\Models\OPOversight; +use Storage\App\Models\OPLinksComplaintDept; +use Storage\App\Models\OPPartnerCaseTypes; +use Storage\App\Models\OPPartnerCapac; use OpenPolice\Controllers\VolunteerLeaderboard; use OpenPolice\Controllers\OpenVolunteers; diff --git a/src/Controllers/OpenPolice.php b/src/Controllers/OpenPolice.php index 1ecb99c..cd85c23 100755 --- a/src/Controllers/OpenPolice.php +++ b/src/Controllers/OpenPolice.php @@ -5,13 +5,13 @@ use Auth; use Illuminate\Support\Str; use Illuminate\Http\Request; -use App\Models\User; -use App\Models\OPComplaints; -use App\Models\OPDepartments; -use App\Models\OPLinksComplaintDept; -use App\Models\OPPersonContact; -use App\Models\OPPhysicalDesc; -use App\Models\OPzVolunUserInfo; +use Storage\App\Models\User; +use Storage\App\Models\OPComplaints; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPLinksComplaintDept; +use Storage\App\Models\OPPersonContact; +use Storage\App\Models\OPPhysicalDesc; +use Storage\App\Models\OPzVolunUserInfo; use OpenPolice\Controllers\OpenDashAdmin; use OpenPolice\Controllers\OpenInitExtras; @@ -83,7 +83,7 @@ protected function customNodePrint($nID = -3, $tmpSubTier = [], $nIDtxt = '', $n return $this->reportAllegsWhy($nID); } elseif ($nID == 1373) { return $this->reportStory($nID); - } elseif (in_array($nID, [1466, 1728])) { + } elseif (in_array($nID, [2330, 2332])) { return $this->chkGetReportDept($this->sessData->getLatestDataBranchID()); } elseif (in_array($nID, [1382, 1734])) { return $this->getReportDept($this->sessData->getLatestDataBranchID()); @@ -99,7 +99,7 @@ protected function customNodePrint($nID = -3, $tmpSubTier = [], $nIDtxt = '', $n return $this->getCivReportNameHeader($nID); } elseif ($nID == 1476) { return $this->getOffReportNameHeader($nID); - } elseif (in_array($nID, [1795, 2266])) { + } elseif (in_array($nID, [1795, 2266, 2335])) { $uploads = $this->getUploadsMultNodes($this->cmplntUpNodes, $this->v["isAdmin"], $this->v["isOwner"]); return '

' . (($uploads && sizeof($uploads) > 1) ? 'Uploads' : 'Upload') . '

' . view('vendor.survloop.reports.inc-uploads', [ "uploads" => $uploads ])->render(); diff --git a/src/Controllers/OpenPoliceAdmin.php b/src/Controllers/OpenPoliceAdmin.php index 3889ba6..2b7c127 100755 --- a/src/Controllers/OpenPoliceAdmin.php +++ b/src/Controllers/OpenPoliceAdmin.php @@ -4,25 +4,25 @@ use DB; use Auth; use Illuminate\Http\Request; -use App\Models\User; -use App\Models\SLDefinitions; -use App\Models\SLNode; -use App\Models\OPComplaints; -use App\Models\OPAllegations; -use App\Models\OPOfficers; -use App\Models\OPPersonContact; -use App\Models\OPDepartments; -use App\Models\OPOversight; -use App\Models\OPLinksComplaintDept; -use App\Models\OPCustomers; -use App\Models\OPZeditDepartments; -use App\Models\OPZeditOversight; -use App\Models\OPzVolunStatDays; -use App\Models\OPzVolunUserInfo; -use App\Models\SLEmails; -use App\Models\SLEmailed; -use App\Models\OPzComplaintEmailed; -use App\Models\OPzComplaintReviews; +use Storage\App\Models\User; +use Storage\App\Models\SLDefinitions; +use Storage\App\Models\SLNode; +use Storage\App\Models\OPComplaints; +use Storage\App\Models\OPAllegations; +use Storage\App\Models\OPOfficers; +use Storage\App\Models\OPPersonContact; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPOversight; +use Storage\App\Models\OPLinksComplaintDept; +use Storage\App\Models\OPCustomers; +use Storage\App\Models\OPZeditDepartments; +use Storage\App\Models\OPZeditOversight; +use Storage\App\Models\OPzVolunStatDays; +use Storage\App\Models\OPzVolunUserInfo; +use Storage\App\Models\SLEmails; +use Storage\App\Models\SLEmailed; +use Storage\App\Models\OPzComplaintEmailed; +use Storage\App\Models\OPzComplaintReviews; use OpenPolice\Controllers\OpenPolice; use OpenPolice\Controllers\VolunteerLeaderboard; use SurvLoop\Controllers\Admin\AdminController; diff --git a/src/Controllers/OpenPoliceSearcher.php b/src/Controllers/OpenPoliceSearcher.php index 795c386..1251969 100644 --- a/src/Controllers/OpenPoliceSearcher.php +++ b/src/Controllers/OpenPoliceSearcher.php @@ -9,8 +9,8 @@ */ namespace OpenPolice\Controllers; -use App\Models\OPComplaints; -use App\Models\OPLinksComplaintDept; +use Storage\App\Models\OPComplaints; +use Storage\App\Models\OPLinksComplaintDept; use SurvLoop\Controllers\Searcher; class OpenPoliceSearcher extends Searcher diff --git a/src/Controllers/OpenPoliceUtils.php b/src/Controllers/OpenPoliceUtils.php index 6d35d70..67f6cf0 100644 --- a/src/Controllers/OpenPoliceUtils.php +++ b/src/Controllers/OpenPoliceUtils.php @@ -3,21 +3,21 @@ use DB; use Auth; -use App\Models\User; -use App\Models\OPComplaints; -use App\Models\OPCompliments; -use App\Models\OPIncidents; -use App\Models\OPEventSequence; -use App\Models\OPStops; -use App\Models\OPSearches; -use App\Models\OPArrests; -use App\Models\OPForce; -use App\Models\OPOversight; -use App\Models\OPLinksComplaintDept; -use App\Models\OPLinksOfficerEvents; -use App\Models\OPLinksCivilianEvents; -use App\Models\OPPersonContact; -use App\Models\OPzVolunUserInfo; +use Storage\App\Models\User; +use Storage\App\Models\OPComplaints; +use Storage\App\Models\OPCompliments; +use Storage\App\Models\OPIncidents; +use Storage\App\Models\OPEventSequence; +use Storage\App\Models\OPStops; +use Storage\App\Models\OPSearches; +use Storage\App\Models\OPArrests; +use Storage\App\Models\OPForce; +use Storage\App\Models\OPOversight; +use Storage\App\Models\OPLinksComplaintDept; +use Storage\App\Models\OPLinksOfficerEvents; +use Storage\App\Models\OPLinksCivilianEvents; +use Storage\App\Models\OPPersonContact; +use Storage\App\Models\OPzVolunUserInfo; use SurvLoop\Controllers\Tree\TreeSurvForm; class OpenPoliceUtils extends TreeSurvForm diff --git a/src/Controllers/OpenReport.php b/src/Controllers/OpenReport.php index da2b81a..befc4b1 100644 --- a/src/Controllers/OpenReport.php +++ b/src/Controllers/OpenReport.php @@ -3,11 +3,11 @@ use DB; use Auth; -use App\Models\OPDepartments; -use App\Models\OPZeditDepartments; -use App\Models\OPZeditOversight; -use App\Models\OPzVolunTmp; -use App\Models\OPOversight; +use Storage\App\Models\OPDepartments; +use Storage\App\Models\OPZeditDepartments; +use Storage\App\Models\OPZeditOversight; +use Storage\App\Models\OPzVolunTmp; +use Storage\App\Models\OPOversight; use OpenPolice\Controllers\DepartmentScores; use OpenPolice\Controllers\OpenDepts; @@ -69,7 +69,7 @@ protected function reportStory($nID) if (!in_array($GLOBALS["SL"]->x["pageView"], ['pdf', 'full-pdf'])) { $previewMax = 1800; if (strlen($this->sessData->dataSets["Complaints"][0]->ComSummary) > $previewMax) { - $brkPos = strpos($this->sessData->dataSets["Complaints"][0]->ComSummary, ' ', $previewMax); + $brkPos = strpos($this->sessData->dataSets["Complaints"][0]->ComSummary, ' ', $previewMax-200); if ($brkPos > 0) { $ret = '
REQ->has('read') && $GLOBALS["SL"]->REQ->get('read') == 'more') @@ -109,7 +109,9 @@ protected function queuePeopleSubsets($id, $type = 'Civilians') protected function chkGetReportDept($overLnkID) { - if (!isset($this->v["reportDepts"])) $this->v["reportDepts"] = []; + if (!isset($this->v["reportDepts"])) { + $this->v["reportDepts"] = []; + } $overLnk = $this->sessData->getRowById('LinksComplaintOversight', $overLnkID); if ($overLnk && isset($overLnk->LnkComOverDeptID) && intVal($overLnk->LnkComOverDeptID) > 0 && !in_array($overLnk->LnkComOverDeptID, $this->v["reportDepts"])) { @@ -142,7 +144,7 @@ protected function getReportByLine() $ret = 'Anonymous'; } elseif (isset($this->sessData->dataSets["Civilians"]) && isset($this->sessData->dataSets["Civilians"][0]->CivID) - && ($GLOBALS["SL"]->x["pageView"] == 'full' + && (in_array($GLOBALS["SL"]->x["pageView"], ['full', 'full-pdf']) || ($this->isPublished('Complaints', $this->coreID, $this->sessData->dataSets["Complaints"][0]) && $this->sessData->dataSets['Complaints'][0]->ComPrivacy == $GLOBALS["SL"]->def->getID('Privacy Types', 'Submit Publicly')))) { @@ -168,9 +170,9 @@ protected function getReportWhenLine() if ($this->sessData->dataSets["Incidents"][0]->IncTimeStart !== null) { $timeStart = date('g:ia', strtotime($this->sessData->dataSets["Incidents"][0]->IncTimeStart)); if ($timeStart != '' && ($timeStart != '12:00am' || $timeStart != $timeEnd)) { - $date .= ' at ' . $timeStart; + $date .= ' at ' . $timeStart . ''; if ($timeEnd != '' && $timeStart != $timeEnd) { - $date .= ' until ' . $timeEnd; + $date .= ' until ' . $timeEnd . ''; } } } diff --git a/src/Controllers/OpenReportTools.php b/src/Controllers/OpenReportTools.php index 395f00b..2883f7c 100644 --- a/src/Controllers/OpenReportTools.php +++ b/src/Controllers/OpenReportTools.php @@ -1,12 +1,12 @@ base_path('resources/views/vendor/openpolice'), __DIR__.'/Public' => base_path('public/openpolice'), __DIR__.'/Uploads' => base_path('storage/app/up/openpolice'), - __DIR__.'/Models' => base_path('storage/app/models/openpolice'), - __DIR__.'/Models' => base_path('app/Models/OpenPolice'), - __DIR__.'/Models' => base_path('app/Models'), + __DIR__.'/Models' => base_path('storage/app/models'), __DIR__.'/Database/2019_03_15_000000_create_openpolice_tables.php' => base_path('database/migrations/2019_03_15_000000_create_openpolice_tables.php'), diff --git a/src/Views/nodes/1418-admin-complaints-listing.blade.php b/src/Views/nodes/1418-admin-complaints-listing.blade.php index 1897654..98cb6cd 100755 --- a/src/Views/nodes/1418-admin-complaints-listing.blade.php +++ b/src/Views/nodes/1418-admin-complaints-listing.blade.php @@ -51,16 +51,15 @@
-
ID# Status @if ($listView == 'incomplete') - Last Page @endif
+
ID# Status @if ($listView == 'incomplete') - Last Page @endif
+
Complainant
City
-
Complainant
-
Privacy, Level
Incident
-
Submitted
+
Submitted
+
Privacy, Level
-
-
Allegation(s)
-
Narrative
+
+ Allegation(s), Narrative
@@ -69,7 +68,7 @@ ComPublicID > 0) href="/complaint/read-{{ $com->ComPublicID }}" @else href="/complaint/readi-{{ $com->ComID }}" @endif class="noUnd" style="color: #333;" > -
-
+
@if ($com->ComPublicID <= 0) - #i{{ number_format($com->ComID) }} + #i{{ number_format($com->ComID) }} @if ($com->ComSubmissionProgress > 0 && isset($lastNodes[$com->ComSubmissionProgress])) /{{ $lastNodes[$com->ComSubmissionProgress] }} @endif @@ -99,44 +98,41 @@ ({{ $GLOBALS['SL']->def->getVal('OPC Staff/Internal Complaint Type', $com->ComType) }}) @endif
-
{{ $com->IncAddressCity }}, {{ $com->IncAddressState }}
-
{{ $com->PrsnNameFirst }} {{ $com->PrsnNameLast }}
-
- @if ($com->ComPrivacy == 304) Open, - @elseif ($com->ComPrivacy == 305) No Names, - @elseif ($com->ComPrivacy == 306) Anonymous, - @elseif ($com->ComPrivacy == 307) Anonymized, - @endif - {{ $com->ComAwardMedallion }} +
+ {{ $com->PrsnNameFirst }} {{ $com->PrsnNameLast }} +
{{ $com->PrsnEmail }}
+
{{ $com->IncAddressCity }}, {{ $com->IncAddressState }}
@if (trim($com->IncTimeStart) != '') {{ date("n/j/y", strtotime($com->IncTimeStart)) }} @endif
-
+
@if (isset($com->ComRecordSubmitted)) {{ date("n/j/y", strtotime($com->ComRecordSubmitted)) }} @endif
-
-
-
- @if (isset($comInfo[$com->ComID]["depts"]) && trim($comInfo[$com->ComID]["depts"]) != '') - {{ $comInfo[$com->ComID]["depts"] }}
- @endif - {!! $com->ComAllegList !!} -
-
- @if (isset($com->ComSummary) && trim($com->ComSummary) != '') - @if (strlen(strip_tags($com->ComSummary)) > 180) - {{ substr(strip_tags($com->ComSummary), 0, 180) }}... - @else - {{ $com->ComSummary }} - @endif +
+ @if ($com->ComPrivacy == 304) Open, + @elseif ($com->ComPrivacy == 305) No Names, + @elseif ($com->ComPrivacy == 306) Anonymous, + @elseif ($com->ComPrivacy == 307) Anonymized, @endif + {{ $com->ComAwardMedallion }}
+
+

{!! $com->ComAllegList !!}
+ @if (isset($com->ComSummary) && trim($com->ComSummary) != '') + @if (strlen(strip_tags($com->ComSummary)) > 150) + {{ substr(strip_tags($com->ComSummary), 0, 150) }}... + @else + {{ strip_tags($com->ComSummary) }} + @endif + @endif +

+
@empty diff --git a/src/Views/nodes/1714-report-inc-owner-tools.blade.php b/src/Views/nodes/1714-report-inc-owner-tools.blade.php index 5a4e6ed..7b3bd98 100755 --- a/src/Views/nodes/1714-report-inc-owner-tools.blade.php +++ b/src/Views/nodes/1714-report-inc-owner-tools.blade.php @@ -41,7 +41,7 @@

Please understand that we do not provide direct legal services. But the work you put into your complaint could help your lawyer. So please save and print your complaint.

@elseif ($GLOBALS["SL"]->def->getVal('Complaint Status', $complaint->ComStatus) == 'OK to Submit to Oversight') - @if (sizeof($oversights) > 0 && isset($oversights[0]->OverEmail) && trim($oversights[0]->OverEmail) != '' + @if (isset($oversights) && sizeof($oversights) > 0 && isset($oversights[0]->OverEmail) && trim($oversights[0]->OverEmail) != '' && isset($oversights[0]->OverWaySubEmail) && intVal($oversights[0]->OverWaySubEmail) == 1)

Congratulations, {{ $user->name }}!

Within the next week, we will review your complaint. @@ -106,7 +106,7 @@ @if (!in_array($GLOBALS["SL"]->def->getVal('Complaint Status', $complaint->ComStatus), ['Hold', 'New', 'Reviewed']))

diff --git a/src/Views/nodes/2234-beta-listing.blade.php b/src/Views/nodes/2234-beta-listing.blade.php index e8cfe37..5b69d56 100644 --- a/src/Views/nodes/2234-beta-listing.blade.php +++ b/src/Views/nodes/2234-beta-listing.blade.php @@ -8,21 +8,22 @@
Invited
@forelse ($betas as $i => $beta) -
-
- {{ $beta->BetaName }} {{ $beta->BetaLastName }}
- {{ $beta->BetaEmail }} -
- @if (isset($beta->BetaYear)) {{ $beta->BetaYear }} - @endif - {{ $beta->BetaNarrative }} -
- {{ $GLOBALS["SL"]->printTimeZoneShift($beta->created_at) }}
- @if (isset($beta->BetaHowHear)) {{ $beta->BetaHowHear }} @endif -
- @if (isset($beta->BetaInvited)) {{ date('n/j', strtotime($beta->BetaInvited)) }} - @else Invited @endif +
+
+
+ {{ $beta->BetaName }} {{ $beta->BetaLastName }}
+ {{ $beta->BetaEmail }} +
+ {{ $GLOBALS["SL"]->printTimeZoneShift($beta->created_at) }}
+ @if (isset($beta->BetaHowHear)) {{ $beta->BetaHowHear }} @endif +
+ @if (isset($beta->BetaInvited)) {{ date('n/j', strtotime($beta->BetaInvited)) }} + @else Invited @endif +
-
+ @if (isset($beta->BetaYear)) {{ $beta->BetaYear }} - @endif + {{ $beta->BetaNarrative }} +
@empty None found @endforelse