<div id="csLoadingBar" class="csLoadingBar"></div>
<div id="ticketMenu" class="ticketMenu" style="visibility: hidden;">
    <div ng-controller="ticketMenuCtrl" id="ticketMenuCtrl">
        <div id="resultMessage" ng-show="showAlert"
             class="result-message userSearch alert {{resultMessageClass}}">
            <i class="{{resultMessageClassExt}}"></i> {{resultMessage}}
        </div>
        <div ng-if="ticket != null" id="ticketMenuApplication boxContainer" class="ng-scope uiBox containerTopicDetail all-box {{ticket.warning}}{{man}}">
            <div class="ellipsed titleTicket postViewHeader "> {{ticket.title}}</div>

            <a ng-show="canManage && !showEdit"  class="actionIcon" style="float:right; margin-right: 15px;" ng-click="editTicket();showEdit=true"> <i class="uiIconEdit"></i></a>
			<a ng-show="canManage && showEdit"  class="actionIcon " style="float:right; border: Solid 1px #cadaea; margin-right: 5px;" ng-click="getTicket();showEdit=false"> <i class="uiIconClose"></i></a>
			<a ng-show="canManage && showEdit"  class="actionIcon " style="float:right; border: Solid 1px #cadaea; margin-right: 5px;" ng-click="saveTicket();showEdit=false"> <i class="uiIconTick"></i></a>
			
            <div class="pull-left left-box" >
                <button class="btn btn-xlarge ng-scope"   ng-click="backTickets()"><i class="uiIconSocLastestReply uiIconWhite"></i>   {{i18n.backToTickets}}</button>
                <button class="btn btn-primary btn-xlarge ng-scope" ng-click="createTicket()"> <i class="uiIconEcmsAddDocument uiIconWhite"></i>   {{i18n.createNewTicket}}</button>
            </div>
            <div class="pull-right right-box">
                <div ng-if="!showEdit" class="col-sm-6"><b>{{i18n.status}}:</b> <span>{{i18n[ticket.status]}}</span> <br>
                <b>{{i18n.type}}:</b> <span>{{i18n[ticket.type]}}</span> <br>
                <div ng-if="canManage"><b>{{i18n.owner}}:</b> <span>{{ticket.owner}}</span> <br></div>
                </div>
                <div ng-if="!showEdit" class="col-sm-6"> <b>{{i18n.ticketseverity}}:</b> <span>{{i18n[ticket.severity]}}</span><br>
                <div ng-if="canManage"><b>{{i18n.assignee}}:</b> <span>{{getDisplayName(ticket.assignee)}}</span> <br></div>
                <div ng-if="canManage"><b>{{i18n.attachedJira}}:</b>
                    <img src="{{ticket.jiraStatusIcon}}" height="16" width="16">
                    <a target="_blank" ng-if="ticket.jiraStatus==6" class="closedJira" href="https://jira.exoplatform.org/browse/{{ticket.attachedJira}}">{{ticket.attachedJira}}</a>
                    <a target="_blank" ng-if="ticket.jiraStatus!=6"  href="https://jira.exoplatform.org/browse/{{ticket.attachedJira}}">{{ticket.attachedJira}}</a>
                    <br>

                </div></div>
				<div ng-if="showEdit && canManage" class="col-sm-6"><b>{{i18n.status}}:</b> <span>{{i18n[ticket.status]}}</span> <br>
                <b>{{i18n.type}}:</b> 
				<select ng-model="ticket.type" name="selectType" id="selectType">
                    <option ng-repeat="selectedType in ticketTypes" value="{{selectedType}}">{{selectedType}}</option>
                </select> <br>
                <b>{{i18n.owner}}:</b> 
				<select  ng-model="ticket.owner" name="selectType" id="selectedOwner">
                      <option ng-repeat="selectedOwner in ownersList" value="{{selectedOwner}}">{{selectedOwner}}</option>
                </select> <br>
                </div>
                <div ng-if="showEdit && canManage" class="col-sm-6"> <b>{{i18n.ticketseverity}}:</b>                 
				<select  ng-model="ticket.severity" name="selectSeverity" id="selectSeverity">
                    <option ng-repeat="selectedSeverity in severities" value="{{selectedSeverity}}">{{selectedSeverity}}</option>
                </select><br>
                <b>{{i18n.assignee}}:</b> 
				<select ng-model="ticket.assignee" name="assignee">
                   <option ng-repeat="assignee in assignees" value="{{assignee.userName}}">{{assignee.displayName}}</option>
                   <option value="{{i18n.empty}}">{{i18n.empty}}</option>
                </select> <!-- <a href="javascript:void(0);" ng-click="ticket.assignee=currentUser">{{i18n.assignToMe}}</a> -->
				<br>
                <b>{{i18n.attachedJira}}:</b>
                    <input type="text" name="attachedJira" id="attachedJira"  ng-model="ticket.attachedJira">
                    <br>

                </div>
                <div class="col-sm-12" ng-show="showStatuses"><b>{{i18n.changeStatusTo}}:</b>
                    <div class="btn-toolbar">
                    <div class="btn-group">
                        <a ng-repeat="status in getStatusSuccessors(ticket.status)" class="btn" href="#" ng-click="ticket.status=status; saveTicket(ticket)" ><i class=""> {{i18n[status]}}</i></a>
                    </div>
                </div>
                </div>

<div class="toggle-radio">
<input type="radio" name="rdo" id="yes" ng-model="ticket.customerSatisfied" ng-value=true  ng-change="updateCustomerSatisfaction()" >
<input type="radio" name="rdo" id="no" ng-model="ticket.customerSatisfied" ng-value=false ng-change="updateCustomerSatisfaction()" >
<div class="switch">
<div class="lab">How would you rate the support you received ?</div>
<label for="yes">Good</label>
    <label for="no">Bad</label>
<span></span>
  </div>
</div>
            </div>
        </div>
    </div>
</div>