<div ng-controller="Organizations.InfoController">
    <div class="clearfix">
        <div class="row">
            <div class="col-xs-12 col-md-12">
                <div class="row">
                    <div class="col-xs-6">
                        <h4><a href="#" permission="editObject" permission-object-type="ORGANIZATION" permission-action="disable"
                                permission-properties="objectInfo" editable-text="objectInfo.organizationValue"
                                onaftersave="saveOrganization()" e-required>
                            {{objectInfo.organizationValue || 'common.value.unknown' | translate}}</a>
                        </h4></div>
                    <div class="col-xs-6 text-right">
                        <h4>{{objectInfo.organizationId }}</h4>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12 col-md-4">
                        <a href="#" permission="editObject" permission-object-type="ORGANIZATION" permission-action="disable"
                                editable-select="objectInfo.organizationType" permission-properties="objectInfo"
                                onaftersave="saveOrganization()"
                                e-ng-options="o.key as (o.key | translateData: 'core.lookups.organizationTypes' : lang) for o in organizationTypes">
                            {{ (objectInfo.organizationType | translateData: 'core.lookups.organizationTypes' : lang) ||
                            ('common.value.unknown' | translate)
                            }}</a><br>
                        <small class="text-muted"><span translate>organizations.comp.info.type.label</span></small>
                    </div>
                    <div class="col-xs-12 col-md-4">
                        <div class="h4 font-bold">
                            {{objectInfo.primaryContact.person.givenName || 'common.value.unknown' | translate}}
                            {{objectInfo.primaryContact.person.familyName}}
                        </div>
                        <small class="text-muted"><span translate>organizations.comp.info.primary.label</span></small>
                    </div>
                    <div class="col-xs-12 col-md-4">
                        <span class="h4 font-bold">
                            {{objectInfo.defaultPhone.value || 'common.value.unknown' | translate}}
                        </span>
                        <span class="h4 font-bold" ng-show="objectInfo.defaultPhone">
                            ({{objectInfo.defaultPhone.subType}})
                        </span><br />
                        <small class="text-muted"><span translate>organizations.comp.info.phone.label</span></small>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12 col-md-4">
                        <span class="h4 font-bold">
                            {{objectInfo.defaultIdentification.identificationNumber || 'common.value.unknown' | translate}}
                        </span>
                        <span class="h4 font-bold" ng-show="objectInfo.defaultIdentification">
                            ({{objectInfo.defaultIdentification.identificationValue.value | translate}})
                        </span><br />
                        <small class="text-muted"><span translate>organizations.comp.info.identification.label</span>
                        </small>
                    </div>
                    <div class="col-xs-12 col-md-4">
                        <div class="h4 font-bold">
                            <a href="javascript:void(0)" readonly ng-click="addParent(true)">
                                {{objectInfo.parentOrganization.organizationValue || 'common.value.unknown' | translate}}</a>
                        </div>
                        <small class="text-muted"><span translate>organizations.comp.info.parent.label</span></small>
                    </div>
                    <div class="col-xs-12 col-md-4">
                        <span class="h4 font-bold">
                            {{objectInfo.defaultEmail.value || 'common.value.unknown' | translate}}
                        </span>
                        <span class="h4 font-bold" ng-show="objectInfo.defaultEmail">
                            ({{objectInfo.defaultEmail.subType}})
                        </span><br />
                        <small class="text-muted"><span translate>organizations.comp.info.email.label</span></small>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
