anchor.diff:      </tr>
     <% end %>
   </table>
  -
  -<div id="currency">
  -  <% if @check_enabled %>
  -    Enabled ...
  -    <form action="/checks/<%= check_path_escaped %>" method="post" style="display:inline-block">
  -      <input type='hidden' name='_method' value='delete'>
  -      <input type='submit' value="Disable" class='button'>
  -    </form>
  +  </div>
  +  <div class="col-md-6">
  +    <h3>Recent state changes</h3>
  +  <% if @state_changes && !@state_changes.empty? %>
  +    <table class="table table-hover table-condensed">
  +      <tr>
  +        <th>Timestamp</th>
  +        <th>State</th>
  +        <th>Summary</th>
  +      </tr>
  +      <% @state_changes.each do |state_change| %>
  +      <tr>
  +        <td><%= h Time.at(state_change[:timestamp]).to_s %></td>
  +        <td><%= h state_change[:state] %></td>
  +        <td><%= h state_change[:summary] %></td>
  +      </tr>
  +      <% end %>
  +    </table>
     <% else %>
  -    Disabled
  +    <p>No state changes recorded for this check.</p>
     <% end %>
  -
  +  </div>
  +</div>
  +
  +<div class="row">
  +  <div class="col-md-12">
     <a name="scheduled_maintenance_periods"></a>
     <h3>Scheduled Maintenance Periods</h3>
   <% if @scheduled_maintenances && !@scheduled_maintenances.empty? %>
  
positive.code:   <p><%= h start.to_s %> -&gt; <%= h finish.to_s %> (<%= h remain %> remaining)</p>
  <% end %>
  
  <h3>Output: <%= h @check_summary %></h3>
  <p><%= h @check_details %></p>
  <table class="table table-hover table-condensed">
  
negative.code:           <form action="/scheduled_maintenances/<%= check_path_escaped %>" method="post">
              <input type="hidden" name="_method" value="delete">
              <input type="hidden" name="start_time" value="<%= start_time %>">
              <button type="submit" class="btn btn-danger"><%= label %></button>
            </form>
          <% else %>
            &nbsp;
          <% end %>
        </td>
      </tr>
    </table>
  </div>
  <% end %>
  <% else %>
  <p>No maintenance is scheduled</p>
  <% end %>
  
  <div class="col-md-8">
  
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">Add Scheduled Maintenance</h4>
      </div>
      <div class="panel-body">
  
  <form action="/scheduled_maintenances/<%= check_path_escaped %>" method="post" role="form" class="form-horizontal">
  
    <div class="form-group">
      <label class="col-sm-2 control-label" for="start_time">Start time:</label>
      <div class="col-sm-9">
        <input type="text" name="start_time" class="form-control" size="20" maxlength="80" value="">
        <span class="help-block">
          e.g. "today 4pm", "two hours hence", "friday 2pm", "2012-01-28 13:00"
        </span>
      </div>
    </div>
  
    <div class="form-group">
      <label class="col-sm-2 control-label" for="duration">Duration:</label>
      <div class="col-sm-9">
        <input type="text" name="duration" class="form-control" size="20" maxlength="80" value="">
        <span class="help-block">
          e.g. "1 hour", "2:30:00", "three days", etc
        </span>
      </div>
    </div>
  
    <div class="col-sm-9 col-md-offset-2">
      <div class="alert alert-info">
        Times given will be interpreted in the local timezone of <%= h local_timezone %>
      </div>
    </div>
  
    <div class="form-group">
      <label class="col-sm-2 control-label" for="summary">Summary:</label>
      <div class="col-sm-9">
        <input type="text" name="summary" class="form-control" size="80" maxlength="160" value="">
      </div>
    </div>
  
    <div class="form-group">
      <div class="col-sm-2"></div>
      <div class="col-sm-9">
        <button type="submit" class="btn btn-success">Save</button>
      </div>
    </div>
  </form>
  
  
  
  </div>
  </div>
  
  </div>
  </div>
  
  
  <div class="row">
    <div class="col-md-8">
  <h3>Contacts</h3>
  <% if @contacts && !@contacts.empty? %>
    <table class="table table-bordered table-hover table-condensed">
  