<div ng-controller="Wizdom365SitecollectionsController as vm">
    <div class="lt-module-page__top lt-module-page-top">
        <div class="lt-module-page-top__title">
            <h1>{{'Sitecollections' | translate}}</h1>
        </div>
        <div class="lt-module-page-top__actions">
            <button class="btn btn-default"
                    ng-disabled="vm.saving || !datastoreForm.datastoreUrl.$valid"
                    ng-click="vm.toggle()">
                {{'Apply Feature Toggles' | translate}}
            </button>
            <button class="btn btn-primary"
                    ng-disabled="vm.saving || !datastoreForm.datastoreUrl.$valid"
                    ng-click="vm.saveConfig()">
                {{'Save configuration' | translate}}
            </button>
        </div>
    </div>

    <div class="panel lt-module-page__content-panel">
        <div class="panel-heading">
            {{'Datastore sitecollection' | translate}}
        </div>

        <p>
            {{'Enter URL of the sitecollection where you want to store Wizdom data. This sitecollection is not ment to be visited by users. This sitecollection is a datastore for Wizdom and SharePoint search. Ex. "https://wizdom365.sharepoint.com/sites/WizdomData"' | translate}}
        </p>

        <br />

        <form name="datastoreForm">
            <div class="form-group row">
                <div class="col-sm-4">
                    <label class="control-label control-input-text">{{ 'Datastore url' | translate}}</label>
                </div>
                <div class="col-sm-8">
                    <input type="text" class="form-control" ng-pattern="'(^https://.+)|(^http://.+)'" name="datastoreUrl" ng-model="vm.datastore.url" placeholder="{{'https://' | translate}}">
                </div>
            </div>
            <div class="form-group row">
                <div class="col-sm-4">
                    <label class="control-label control-input-text">{{ 'Datastore owner' | translate}}</label>
                </div>
                <div class="col-sm-8">
                    <input type="text" class="form-control d-none" name="owner" ng-model="vm.datastore.owner" required="" />
                    <div wizdom365-principalpicker principals="vm.ownerPrincipals" add-fn="vm.addOwner(principal)" remove-fn="vm.removeOwner(principal)" mode="users" allowmultiple="false" class="principal-picker"></div>
                </div>
            </div>
        </form>
    </div>
    <!--<div class="panel panel-default ">

        <div class="panel-heading">
            <form name="testok" id="testok">
                {{'Create sitecollection' | translate}}
                <input ng-model="vm.Title" type="text" name="Title" value="" placeholder="Title" required />
                <input ng-model="vm.ManagedPath" type="text" name="MangedPath" value="" placeholder="Manged Path" required />
                <input ng-model="vm.SiteOwner" type="text" name="Owner" value="" placeholder="Owner" required />
                <div class="dropdown">
                    <select ng-model="vm.LCID" name="LangaugeList" id="LangaugeList" title="Select a langauge for the sitecollection" style="width:50%;" required>
                        <option value="" disabled selected>Select desired language </option>
                        <option ng-repeat="test in vm.testList" value="{{test.lcid}}" required>{{test.displayName}}</option>
                    </select>
                    <select ng-model="vm.Timezoneid" name="TimeZoneList" id="TimeZoneList" title="Select a time zone for the new site" style="width:50%;" required>
                        <option value="" disabled selected>Select desired time zone</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="39">(UTC-12:00) International Date Line West</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="95">(UTC-11:00) Coordinated Universal Time-11</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="15">(UTC-10:00) Hawaii</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="14">(UTC-09:00) Alaska</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="78">(UTC-08:00) Baja California</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="13">(UTC-08:00) Pacific Time (US and Canada)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="38">(UTC-07:00) Arizona</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="77">(UTC-07:00) Chihuahua, La Paz, Mazatlan</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="12">(UTC-07:00) Mountain Time (US and Canada)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="55">(UTC-06:00) Central America</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="11">(UTC-06:00) Central Time (US and Canada)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="37">(UTC-06:00) Guadalajara, Mexico City, Monterrey</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="36">(UTC-06:00) Saskatchewan</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="35">(UTC-05:00) Bogota, Lima, Quito</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="10">(UTC-05:00) Eastern Time (US and Canada)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="34">(UTC-05:00) Indiana (East)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="88">(UTC-04:30) Caracas</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="91">(UTC-04:00) Asuncion</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="9">(UTC-04:00) Atlantic Time (Canada)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="81">(UTC-04:00) Cuiaba</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="33">(UTC-04:00) Georgetown, La Paz, Manaus, San Juan</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="28">(UTC-03:30) Newfoundland</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="8">(UTC-03:00) Brasilia</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="85">(UTC-03:00) Buenos Aires</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="32">(UTC-03:00) Cayenne, Fortaleza</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="60">(UTC-03:00) Greenland</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="90">(UTC-03:00) Montevideo</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="103">(UTC-03:00) Salvador</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="65">(UTC-03:00) Santiago</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="96">(UTC-02:00) Coordinated Universal Time-02</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="30">(UTC-02:00) Mid-Atlantic</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="29">(UTC-01:00) Azores</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="53">(UTC-01:00) Cabo Verde</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="86">(UTC) Casablanca</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="93">(UTC) Coordinated Universal Time</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="2">(UTC) Dublin, Edinburgh, Lisbon, London</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="31">(UTC) Monrovia, Reykjavik</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="4">(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="6">(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="3">(UTC+01:00) Brussels, Copenhagen, Madrid, Paris</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="57">(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="69">(UTC+01:00) West Central Africa</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="83">(UTC+01:00) Windhoek</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="79">(UTC+02:00) Amman</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="5">(UTC+02:00) Athens, Bucharest</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="80">(UTC+02:00) Beirut</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="49">(UTC+02:00) Cairo</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="98">(UTC+02:00) Damascus</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="50">(UTC+02:00) Harare, Pretoria</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="59">(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="27">(UTC+02:00) Jerusalem</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="7">(UTC+02:00) Minsk (old)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="104">(UTC+02:00) E. Europe</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="100">(UTC+02:00) Kaliningrad</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="26">(UTC+03:00) Baghdad</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="101">(UTC+03:00) Istanbul</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="74">(UTC+03:00) Kuwait, Riyadh</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="109">(UTC+03:00) Minsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="51">(UTC+03:00) Moscow, St. Petersburg, Volgograd</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="56">(UTC+03:00) Nairobi</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="25">(UTC+03:30) Tehran</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="24">(UTC+04:00) Abu Dhabi, Muscat</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="110">(UTC+04:00) Astrakhan, Ulyanovsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="54">(UTC+04:00) Baku</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="106">(UTC+04:00) Izhevsk, Samara</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="89">(UTC+04:00) Port Louis</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="82">(UTC+04:00) Tbilisi</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="84">(UTC+04:00) Yerevan</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="48">(UTC+04:30) Kabul</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="58">(UTC+05:00) Ekaterinburg</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="87">(UTC+05:00) Islamabad, Karachi</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="47">(UTC+05:00) Tashkent</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="23">(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="66">(UTC+05:30) Sri Jayawardenepura</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="62">(UTC+05:45) Kathmandu</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="71">(UTC+06:00) Astana</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="102">(UTC+06:00) Dhaka</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="115">(UTC+06:00) Omsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="61">(UTC+06:30) Yangon (Rangoon)</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="22">(UTC+07:00) Bangkok, Hanoi, Jakarta</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="111">(UTC+07:00) Barnaul, Gorno-Altaysk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="64">(UTC+07:00) Krasnoyarsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="46">(UTC+07:00) Novosibirsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="112">(UTC+07:00) Tomsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="45">(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="63">(UTC+08:00) Irkutsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="21">(UTC+08:00) Kuala Lumpur, Singapore</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="73">(UTC+08:00) Perth</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="75">(UTC+08:00) Taipei</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="94">(UTC+08:00) Ulaanbaatar</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="20">(UTC+09:00) Osaka, Sapporo, Tokyo</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="72">(UTC+09:00) Seoul</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="70">(UTC+09:00) Yakutsk</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="19">(UTC+09:30) Adelaide</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="44">(UTC+09:30) Darwin</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="18">(UTC+10:00) Brisbane</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="76">(UTC+10:00) Canberra, Melbourne, Sydney</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="43">(UTC+10:00) Guam, Port Moresby</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="42">(UTC+10:00) Hobart</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="99">(UTC+10:00) Magadan</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="68">(UTC+10:00) Vladivostok</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="107">(UTC+11:00) Chokurdakh</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="114">(UTC+11:00) Sakhalin</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="41">(UTC+11:00) Solomon Is., New Caledonia</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="108">(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="17">(UTC+12:00) Auckland, Wellington</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="97">(UTC+12:00) Coordinated Universal Time+12</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="40">(UTC+12:00) Fiji</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="92">(UTC+12:00) Petropavlovsk-Kamchatsky - Old</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="67">(UTC+13:00) Nuku'alofa</option>
                        <option ng-click="vm.setTimeZoneID(option)" value="16">(UTC+13:00) Samoa</option>

                    </select>
                </div>
            </form>

            <button class="btn pull-right btn-success wide-config-btn" ng-click="vm.createsitecollectionforwizdominstall()" ng-disabled="testok.$invalid">Create</button>
        </div>

    </div>-->

    <div class="panel lt-module-page__content-panel">
        <div class="lt-module-page__panel-header">
            <div class="panel-heading">
                {{'Wizdom sitecollections' | translate}}
            </div>
            <div class="lt-module-page__actions">
                <input class="form-control" placeholder="Search" ng-model="vm.searchQuery" ng-change="vm.getListDebounce()" />
                <div class="dropdown">
                    <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
                        Show {{vm.sitecollectionsPrPage}} {{'Sitecollections' | translate}}
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a ng-click="vm.numberOfSitecollectionsPrSite(10)" href="#">10 {{'Sitecollections' | translate}}</a></li>
                        <li><a ng-click="vm.numberOfSitecollectionsPrSite(25)" href="#">25 {{'Sitecollections' | translate}}</a></li>
                        <li><a ng-click="vm.numberOfSitecollectionsPrSite(50)" href="#">50 {{'Sitecollections' | translate}}</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <wizdom365-spinner class="position-loading" ng-if="vm.showLoading" loading="true"></wizdom365-spinner>

        <table ng-class="{'transparent-on-loading': vm.showLoading}" id="AdminSitecollectionTable" class="table">
            <thead>
                <tr>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('url')">
                        {{'Url' | translate}}
                        <span ng-if="vm.orderBy === 'url'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('version')">
                        {{'Version' | translate}}
                        <span ng-if="vm.orderBy === 'version'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('updated')">
                        {{'Last Updated' | translate}}
                        <span ng-if="vm.orderBy === 'updated'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('status')">
                        {{'Status' | translate}}
                        <span ng-if="vm.orderBy === 'status'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('message')">
                        {{'Message' | translate}}
                        <span ng-if="vm.orderBy === 'message'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('siteTemplate')">
                        {{'Template' | translate}}
                        <span ng-if="vm.orderBy === 'siteTemplate'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('isPublishingEnabled')">
                        {{'Publishing Enabled?'}}
                        <span ng-if="vm.orderBy === 'isPublishingEnabled'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('action')">
                        {{'Actions' | translate}}
                        <span ng-if="vm.orderBy === 'action'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                    <th class="orderby" ng-click="vm.IsDisabledColumnsAndBottons || vm.sortBy('upgradePriority')">
                        {{'Priority' | translate}}
                        <span ng-if="vm.orderBy === 'upgradePriority'" class="glyphicon glyphicon-chevron-{{vm.ascending ? 'up' : 'down'}}"></span>
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr class="{{$index % 2 === 1 ? 'sitecollection-list-view-even' : 'sitecollection-list-view-odd'}}" id="SitecollectionInfoRow" ng-repeat-start="sitecollection in vm.sitecollections">
                    <td>
                        <span title="{{sitecollection.url}}">
                            {{sitecollection.sitecollectionNameReduced}}
                        </span>
                    </td>
                    <td>{{sitecollection.currentVersion.major}}.{{sitecollection.currentVersion.minor}}.{{sitecollection.currentVersion.build}}</td>
                    <td>{{sitecollection.updated | date : 'dd-MM-yyyy HH:mm:ss'}}</td>
                    <td ng-if="sitecollection.status.toLowerCase() === 'new'">OK<span ng-if="sitecollection.upgradeStatus.toLowerCase() !== 'done'">, {{sitecollection.upgradeTaskType}} - {{sitecollection.upgradeStatus}}</span></td>
                    <td ng-if="sitecollection.status.toLowerCase() !== 'new'">{{sitecollection.status}}<span ng-if="sitecollection.upgradeStatus.toLowerCase() !== 'done'">, {{sitecollection.upgradeTaskType}} - {{sitecollection.upgradeStatus}}</span></td>
                    <td>{{sitecollection.message}}</td>
                    <td>{{sitecollection.siteTemplate}}</td>
                    <td>{{(sitecollection.isPublishingEnabled?'Yes':'No') | translate}}</td>
                    <td class="actionsButtons">
                        <button ng-disabled="vm.IsDisabledColumnsAndBottons" ng-if="(sitecollection.status.toLowerCase() === 'disabled' && sitecollection.upgradeStatus.toLowerCase() === 'done' )" class="btn sitecollectionactionbtn btn-primary" ng-click="vm.enable(sitecollection);">{{'Enable' | translate}}</button>
                        <button ng-disabled="vm.IsDisabledColumnsAndBottons" ng-if="(sitecollection.status.toLowerCase() === 'new' && sitecollection.upgradeStatus.toLowerCase() === 'done' || sitecollection.status.toLowerCase() === 'deleted' && sitecollection.upgradeStatus.toLowerCase() === 'done' || sitecollection.status.toLowerCase() === 'error' && sitecollection.upgradeStatus.toLowerCase() === 'done' )" class="btn sitecollectionactionbtn btn-primary" ng-click="vm.install(sitecollection);">{{'Re-Install' | translate}}</button>
                        <button ng-disabled="vm.IsDisabledColumnsAndBottons" ng-if="(sitecollection.status.toLowerCase() === 'new' && sitecollection.upgradeStatus.toLowerCase() === 'done' )" class="btn sitecollectionactionbtn btn-warning" ng-click="vm.disable(sitecollection);">{{'Disable' | translate}}</button>
                        <button ng-disabled="vm.IsDisabledColumnsAndBottons" ng-if="(sitecollection.status.toLowerCase() === 'deleted'&& sitecollection.upgradeStatus.toLowerCase() === 'done'  || sitecollection.status.toLowerCase() === 'error'&& sitecollection.upgradeStatus.toLowerCase() === 'done'  || sitecollection.status.toLowerCase() === 'disabled' && sitecollection.upgradeStatus.toLowerCase() === 'done' )" class="btn itecollectionactionbtn btn-danger" ng-click="vm.remove(sitecollection);">{{'Remove' | translate}}</button>
                        <button ng-disabled="vm.IsDisabledColumnsAndBottons" ng-click="vm.cancelTask(sitecollection);" ng-if="sitecollection.upgradeStatus.toLowerCase() === 'executing'" class="btn sitecollectionactionbtn btn-danger">{{'Override' | translate}}</button>
                        <button ng-disabled="vm.IsDisabledColumnsAndBottons" ng-click="vm.cancelTask(sitecollection);" ng-if="sitecollection.upgradeStatus.toLowerCase() === 'starting'" class="btn sitecollectionactionbtn btn-danger">{{'Override' | translate}}</button>
                        <button ng-disabled="vm.IsDisabledColumnsAndBottons" ng-click="vm.cancelTask(sitecollection);" ng-if="sitecollection.upgradeStatus.toLowerCase() === 'queued'" class="btn sitecollectionactionbtn btn-danger">{{'Cancel' | translate}}</button>
                    </td>
                    <td>
                        <div class="dropdown dropdown-priority" ng-click="vm.stopTimeout()">
                            <button ng-if="sitecollection.upgradePriority === 100" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                {{'Highest' | translate}}
                            </button>
                            <button ng-if="sitecollection.upgradePriority === 75" class="btnbtn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                {{'High' | translate}}
                            </button>
                            <button ng-if="sitecollection.upgradePriority === 50" class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                {{'Medium' | translate}}
                            </button>
                            <button ng-if="sitecollection.upgradePriority === 25" class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                {{'Low' | translate}}
                            </button>
                            <ul class="dropdown-menu ">
                                <li><a ng-click="vm.dropdownChange(sitecollection, 100)">{{'Highest' | translate}}</a></li>
                                <li><a ng-click="vm.dropdownChange(sitecollection, 75)">{{'High' | translate}}</a></li>
                                <li><a ng-click="vm.dropdownChange(sitecollection, 50)">{{'Medium' | translate}}</a></li>
                                <li><a ng-click="vm.dropdownChange(sitecollection, 25)">{{'Low' | translate}}</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
                <tr class="{{$index % 2 === 1 ? 'sitecollection-list-view-even' : 'sitecollection-list-view-odd'}}" ng-repeat-end>
                    <!--<td align="center" colspan="9" ng-if="sitecollection.upgradeStatus.toLowerCase() !== 'done' && sitecollection.upgradeStatus.toLowerCase() !== 'executing' ">
                        This task is {{sitecollection.upgradeStatus.toLowerCase()}}
                    </td>-->
                    <td class="progress-placement" colspan="9" ng-if="sitecollection.upgradeStatus.toLowerCase() === 'executing'">
                        {{sitecollection.upgradeStatus}}: {{sitecollection.percentDone}}% - {{sitecollection.upgradeProgress_Message}}
                        <div class="progress sitecollection-progress">
                            <div class="progress-bar progress-bar-success"
                                    role="progressbar"
                                    style="width: {{sitecollection.percentDone}}%"
                                    aria-valuenow="0"
                                    aria-valuemin="0"
                                    aria-valuemax="100">
                                {{sitecollection.percentDone}}%
                            </div>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
        <div style="text-align: center;">
            <pagination total-items="vm.totalSitecollections"
                        ng-change="vm.getPage()"
                        ng-model="vm.curretnPageNumber"
                        items-per-page="vm.sitecollectionsPrPage"
                        max-size="5"
                        boundary-links="false"
                        previous-text="&lsaquo;"
                        next-text="&rsaquo;"
                        first-text="&laquo;"
                        last-text="&raquo;">
            </pagination>
        </div>
    </div>
</div>

