Skip to content

Commit

Permalink
Issue #5: Improve the Utility of the Trip Problem Report Admin Interface
Browse files Browse the repository at this point in the history
- Highlight when vehicle location records exist for a trip but the trip
problem report was not marked as "predicted".
  • Loading branch information
bdferris committed Apr 14, 2012
1 parent b382fe6 commit de85695
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public String edit() {

TripBean trip = _model.getTrip();

if (_model.getVehicleId() != null) {
if (_model.getVehicleId() != null || (_model.getTrip() != null && _model.getServiceDate() > 0)) {
VehicleLocationRecordQueryBean query = new VehicleLocationRecordQueryBean();
query.setServiceDate(_model.getServiceDate());
if (trip != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,12 @@
</tr>
<tr>
<td>Predicted:</td>
<td><s:property value="predicted" /></td>
<jsp:element name="td">
<jsp:attribute name="class">
<s:if test="! vehicleLocationRecords.empty and ! predicted">warning</s:if>
</jsp:attribute>
<s:property value="predicted" />
</jsp:element>
</tr>
<tr>
<td>Schedule Deviation:</td>
Expand Down Expand Up @@ -201,6 +206,9 @@ jQuery("input#trip-problem-reports_label").autocomplete({
<td class="time">Time</td>
<td class="scheduleDeviation">Schedule Deviation</td>
<td class="location">Location</td>
<s:if test="! predicted">
<td class="vehicle">Vehicle Id</td>
</s:if>
</tr>
</thead>
<tbody>
Expand All @@ -217,6 +225,9 @@ jQuery("input#trip-problem-reports_label").autocomplete({
<s:property value="currentLocation.lat"/><jsp:text> </jsp:text><s:property value="currentLocation.lon"/>
</s:if>
</td>
<s:if test="! predicted">
<td><s:property value="vehicleId"/></td>
</s:if>
</tr>
</s:iterator>
</tbody>
Expand Down
5 changes: 5 additions & 0 deletions onebusaway-webapp/src/main/webapp/WEB-INF/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ table#mapLegend td:first-child {
text-align: right;
}

#tripProblemReportTable td.warning {
font-weight: bold;
color: red;
}

#vehicleLocationRecords {
margin-top: 1em;
}
Expand Down

0 comments on commit de85695

Please sign in to comment.