<!--
   angular-scheduler-detail.html
 
   Partial to be injected on inectDetail() method call, providing occurrence list, rrule and a natural language description.

   Copyright (c) 2014 Ansible, Inc.

   Maintainers: 
      Chris Houseknecht
      @chouseknecht 
      chouse@ansible.com
-->
<div id="scheduler-detail">
    <div class="alert alert-danger" ng-show="!schedulerIsValid">
        <p>The scheduler options are invalid or incomplete. Make the needed changes on the options tab, then come back here to see details.</p>
    </div>
    <div ng-show="schedulerIsValid">
        <div class="form-group">
            <label>Description</label>
            <textarea ng-model="rrule_nlp_description" name="rrule_nlp_description" id="rrule_nlp_description" readonly class="form-control" rows="2"></textarea>
        </div>
        <div class="form-group" ng-show="showRRule">
            <label>RRule</label>
            <textarea ng-model="rrule" name="rrule" id="rrule" readonly class="form-control" rows="3"></textarea>
        </div>
        <div class="form-group">
            <label id="occurrences-label">Occurrences <span class="sublabel">(limited to first 10)</label>
            <div id="date-choice">
                <label class="label-inline">Date format</label>
                <label class="radio-inline"><input type="radio" ng-model="dateChoice" id="date-choice-local" value="local" >Local time</label>
                <label class="radio-inline"><input type="radio" ng-model="dateChoice" id="date-choice-utc" value="utc" >UTC</label>
            </div>
            <ul class="occurrence-list mono-space" ng-show="dateChoice == 'utc'">
                <li ng-repeat="occurrence in occurrence_list">{{ occurrence.utc }}</li>
            </ul>
            <ul class="occurrence-list mono-space" ng-show="dateChoice == 'local'">
                <li ng-repeat="occurrence in occurrence_list">{{ occurrence.local }}</li>
            </ul>
        </div>
    </div>
</div>