<!-- Not set -->
<div class="padding" ng-if="selectedWorkstation.employee.task.state == Enums.TaskStates.Stopped">
    <table class="big">
        <tr>
            <td style="width: 200px;" class="text-bold" localize="contract_type"></td>
            <td>
                <ul ng-class="{ 'disable-container': selectedWorkstation.employee.level == EmployeeLevels.Beginner }">
                    <li style="display: block">
                        <label><input type="radio" value="" ng-model="selectedWorkstation.employee.task.contractType"><span localize="any"></span></label>
                    </li>
                    <li style="display: block">
                        <label><input type="radio" value="FixedPrice" ng-model="selectedWorkstation.employee.task.contractType"><span localize="fixed_price"></span></label>
                    </li>
                    <li style="display: block">
                        <label><input type="radio" value="LimitedRFQ" ng-model="selectedWorkstation.employee.task.contractType"><span localize="bidding"></span></label>
                    </li>
                </ul>
            </td>
            <td class="small dimmed" style="width: 380px;" localize="contract_type_description">
            </td>
        </tr>
        <tr>
            <td colspan="3"><hr class="big"></td>
        </tr>
        <tr>
            <td class="text-bold" localize="size"></td>
            <td>
                <ul ng-class="{ 'disable-container': selectedWorkstation.employee.level != EmployeeLevels.Expert }">
                    <li style="display: block">
                        <label><input type="radio" value="" ng-model="selectedWorkstation.employee.task.size"><span localize="any"></span></label>
                    </li>
                    <li style="display: block">
                        <label><input type="radio" value="Small" ng-model="selectedWorkstation.employee.task.size"><span localize="small"></span></label>
                    </li>
                    <li style="display: block">
                        <label><input type="radio" value="Medium" ng-model="selectedWorkstation.employee.task.size"><span localize="medium"></span></label>
                    </li>
                    <li style="display: block">
                        <label><input type="radio" value="Large" ng-model="selectedWorkstation.employee.task.size"><span localize="large"></span></label>
                    </li>
                </ul>
            </td>
            <td class="dimmed small" localize="contract_size_description"></td>
        </tr>
        <tr>
            <td colspan="3"><hr class="big"></td>
        </tr>
        <tr>
            <td class="text-bold" localize="auto_repeat"></td>
            <td>
                <div class="toggle-switch" ng-click="ctrl.clickAutoRepeat()" ng-class="{ active: selectedWorkstation.employee.task.autoRepeat }">
                    <span></span>
                </div>
            </td>
        </tr>
        <tr>
            <td class="text-bold" localize="search_time"></td>
            <td localize="x_hours" localize-data-hours="{{ ctrl.hoursToSearch }}"></td>
            <td class="small dimmed" localize="contract_search_time_description"></td>
        </tr>
        <tr>
            <td colspan="3"><hr class="big" style="margin: 0;"></td>
        </tr>
        <tr>
            <td colspan="3" class="text-center"><button class="blue" ng-click="ctrl.startSearch()" localize="search_contract"></button></td>
        </tr>
    </table>

</div>

<!-- Progress -->
<div class="padding text-center" ng-if="selectedWorkstation.employee.task.state == Enums.TaskStates.Running" style="margin-top: 140px;">
    <h3 localize="search_new_contract"></h3>
    <div class="progressBar big">
        <div class="indicator"
             style="width: {{ ctrl.taskProgress }}%;">
            <span>{{ ctrl.taskProgress }}%</span>
        </div>
    </div>

    <div class="margin-top">
        <button class="red big" ng-click="ctrl.cancel()" localize="cancel"></button>
    </div>

</div>

<!-- Result/contract -->
<div class="padding" ng-if="selectedWorkstation.employee.task.state == Enums.TaskStates.Stalled">

    <!-- Respond to contract -->
    <div class="text-center" ng-if="selectedWorkstation.employee.task.contractId == null" style="margin-top: 43px;">
        <h3 localize="new_contract_awaiting"></h3>
        <button class="blue" ng-click="ctrl.showContract(container.task.contract)" localize="respond_contract"></button>
    </div>

    <!-- Contract -->
    <contract ng-contract="ctrl.activeContract" ng-if="ctrl.activeContract != null" class="border"></contract>
</div>