Permalink
Browse files

Don't allow resetting work if the revision doesn't have work yet.

  • Loading branch information...
1 parent 5c24901 commit 2b77636dac0ea42a693cdb470b8ab69b7934b842 @rolfbjarne rolfbjarne committed Dec 15, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 MonkeyWrench.Web.UI/ViewLane.aspx.cs
View
6 MonkeyWrench.Web.UI/ViewLane.aspx.cs
@@ -155,8 +155,10 @@ public string GenerateLane (GetViewLaneDataResponse response)
} else {
if (response.RevisionWork.State == DBState.NotDone)
header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=ignorerevision'>don't build</a>", lane.id, dbr.id, host.id);
- header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=clearrevision'>reset work</a>", lane.id, dbr.id, host.id);
- header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=deleterevision'>delete work</a>", lane.id, dbr.id, host.id);
+ if (response.RevisionWork.State != DBState.NoWorkYet) {
+ header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=clearrevision'>reset work</a>", lane.id, dbr.id, host.id);
+ header.AppendFormat (" - <a href='ViewLane.aspx?lane_id={0}&amp;host_id={2}&amp;revision_id={1}&amp;action=deleterevision'>delete work</a>", lane.id, dbr.id, host.id);
+ }
}
}

0 comments on commit 2b77636

Please sign in to comment.