a330ff7320
Also removed explicit settings and defaults that were imported in various app modules. We now always use the Preferences ng service.
349 lines
15 KiB
XML
349 lines
15 KiB
XML
<?xml version='1.0' standalone='yes'?>
|
|
<container
|
|
xmlns="http://www.w3.org/1999/xhtml"
|
|
xmlns:var="http://www.skyrix.com/od/binding"
|
|
xmlns:const="http://www.skyrix.com/od/constant"
|
|
xmlns:label="OGo:label">
|
|
|
|
<md-content md-scroll-y="true" class="md-padding md-whiteframe-z1 bg-sogoPaper-50">
|
|
<div class="editor md-padding">
|
|
<hgroup class="header">
|
|
<h1 class="sg-md-display-2--light" ng-bind-html="editor.card.$fullname()"><!-- fullname --></h1>
|
|
<h6 class="sg-md-display-2-subheader">{{editor.card.$description()}}</h6>
|
|
</hgroup>
|
|
|
|
<!-- contact editor -->
|
|
<form name="cardForm" ng-show="editor.card.$isCard()" ng-submit="editor.save(cardForm)">
|
|
<md-input-container>
|
|
<var:entity const:name="nbsp"/>
|
|
<label>
|
|
<var:string label:value="Display"/>
|
|
</label>
|
|
<input type="text" ng-maxlength="30" ng-model="editor.card.c_cn"/>
|
|
</md-input-container>
|
|
<!-- todo: look for better reset/normalization. Semanticaly this should be a fieldset, but content doesn't flex properly du to browser styles-->
|
|
<div id="contact-identification" class="sg-fieldset" layout="row" layout-sm="column">
|
|
<md-input-container flex="40">
|
|
<label>
|
|
<var:string label:value="Firstname"/>
|
|
</label>
|
|
<input type="text" ng-model="editor.card.c_givenname"/>
|
|
</md-input-container>
|
|
<md-input-container flex="40">
|
|
<label>
|
|
<var:string label:value="Lastname"/>
|
|
</label>
|
|
<input type="text" ng-model="editor.card.c_sn"/>
|
|
</md-input-container>
|
|
<md-input-container flex="20">
|
|
<label>
|
|
<var:string label:value="Nickname"/>
|
|
</label>
|
|
<input type="text" ng-model="editor.card.nickname"/>
|
|
</md-input-container>
|
|
</div>
|
|
|
|
<div class="sg-fieldset" layout="row" layout-sm="column">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Organization"/>
|
|
</label>
|
|
<input type="text" ng-model="editor.card.c_org"/>
|
|
</md-input-container>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Title"/>
|
|
</label>
|
|
<input type="text" ng-model="editor.card.title"/>
|
|
</md-input-container>
|
|
</div>
|
|
|
|
<!-- org units -->
|
|
<div class="attr" ng-repeat="unit in editor.card.orgUnits">
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Organization Unit"/>
|
|
</label>
|
|
<input type="text" ng-model="unit.value"
|
|
sg-focus-on="orgUnit_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.card.$delete('orgUnits', $index)">
|
|
<md-icon>remove_circle</md-icon>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.addOrgUnit($event)">
|
|
<md-icon>add_circle</md-icon>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="Add Organizational Unit"/>
|
|
</label>
|
|
</div>
|
|
|
|
<!-- categories -->
|
|
<md-chips ng-model="editor.card.categories">
|
|
<md-chip-template>
|
|
{{$chip.value}}
|
|
</md-chip-template>
|
|
<md-autocomplete
|
|
md-selected-item="editor.categories.selected"
|
|
md-selected-item-change="editor.card.$addCategory(category)"
|
|
md-search-text="editor.categories.searchText"
|
|
md-items="category in editor.card.constructor.filterCategories(editor.categories.searchText)"
|
|
label:placeholder="Add a category">
|
|
<span md-highlight-text="editor.categories.searchText">{{category}}</span>
|
|
</md-autocomplete>
|
|
</md-chips>
|
|
|
|
<!-- emails -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="email in editor.card.emails">
|
|
<div class="md-layout-margin" layout="row" layout-align="space-between end">
|
|
<md-select ng-model="email.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in ::editor.allEmailTypes" ng-value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Email Address"/>
|
|
</label>
|
|
<input type="email" ng-model="email.value"
|
|
sg-focus-on="email_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.card.$delete('emails', $index)">
|
|
<md-icon>remove_circle</md-icon>
|
|
</md-button>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.addEmail()">
|
|
<md-icon>add_circle</md-icon>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New Email Address"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- birthday -->
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Birthday"/>
|
|
</label>
|
|
<input type="date" ng-model="editor.card.birthday"/>
|
|
</md-input-container>
|
|
|
|
<!-- phones -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="phone in editor.card.phones">
|
|
<div class="md-layout-margin" layout="row" layout-align="space-between end">
|
|
<md-select ng-model="phone.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in ::editor.allTelTypes" ng-value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Phone Number"/>
|
|
</label>
|
|
<input type="text" ng-model="phone.value"
|
|
sg-focus-on="phone_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.card.$delete('phones', $index)">
|
|
<md-icon>remove_circle</md-icon>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.addPhone()">
|
|
<md-icon>add_circle</md-icon>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New Phone Number"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- urls -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="url in editor.card.urls">
|
|
<div class="md-layout-margin" layout="row" layout-align="space-between end">
|
|
<md-select ng-model="url.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in ::editor.allUrlTypes" ng-value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="URL"/>
|
|
</label>
|
|
<input type="url" ng-model="url.value" sg-focus-on="url_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.card.$delete('urls', $index)">
|
|
<md-icon>remove_circle</md-icon>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.addUrl()">
|
|
<md-icon>add_circle</md-icon>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New URL"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- addresses -->
|
|
<div class="section">
|
|
<div class="attr" ng-repeat="address in editor.card.addresses">
|
|
<div layout="row" layout-align="center end">
|
|
<md-select ng-model="address.type" label:placeholder="Type">
|
|
<md-option ng-repeat="type in ::editor.allAddressTypes" ng-value="type">{{ type }}</md-option>
|
|
</md-select>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="street"/>
|
|
</label>
|
|
<input type="text" ng-model="address.street"
|
|
sg-focus-on="address_{{$index}}"/>
|
|
</md-input-container>
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value=""/>
|
|
</label>
|
|
<input type="text" ng-model="address.street2"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Postoffice"/>
|
|
</label>
|
|
<input type="text" ng-model="address.postoffice"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="City"/>
|
|
</label>
|
|
<input type="text" ng-model="address.locality"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Region"/>
|
|
</label>
|
|
<input type="text" ng-model="address.region"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Country"/>
|
|
</label>
|
|
<input type="text" ng-model="address.country"/>
|
|
</md-input-container>
|
|
</div>
|
|
<div layout="row" layout-align="center end">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Postal Code"/>
|
|
</label>
|
|
<input type="text" ng-model="address.postalcode"/>
|
|
</md-input-container>
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.card.$delete('addresses', $index)">
|
|
<md-icon>remove_circle</md-icon>
|
|
</md-button>
|
|
</div>
|
|
</div>
|
|
<div class="md-layout-margin" layout="row" layout-align="start center">
|
|
<md-button class="sg-icon-button" type="button" ng-click="editor.addAddress()">
|
|
<md-icon>add_circle</md-icon>
|
|
</md-button>
|
|
<label class="button-label">
|
|
<var:string label:value="New Address"/>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- note -->
|
|
<md-input-container>
|
|
<label class="right inline">
|
|
<var:string label:value="Note"/>
|
|
</label>
|
|
<textarea ng-model="editor.card.note"><!-- note --></textarea>
|
|
</md-input-container>
|
|
|
|
<div class="fieldset md-layout-margin" layout="row" layout-align="end center">
|
|
<md-button type="button" ng-click="editor.cancel()">
|
|
<var:string label:value="Cancel"/>
|
|
</md-button>
|
|
<md-button type="button" ng-click="editor.reset()">
|
|
<var:string label:value="Reset"/>
|
|
</md-button>
|
|
<md-button class="md-primary md-hue-3" type="submit">
|
|
<var:string label:value="Save"/>
|
|
</md-button>
|
|
</div>
|
|
</form>
|
|
|
|
<!-- list editor -->
|
|
<form name="listForm" ng-if="editor.card.$isList()" ng-submit="editor.save(listForm)">
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Display"/>
|
|
</label>
|
|
<input type="text" ng-maxlength="30" ng-model="editor.card.c_cn"/>
|
|
</md-input-container>
|
|
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Nickname"/>
|
|
</label>
|
|
<input type="text" ng-maxlength="30" ng-model="editor.card.nickname"/>
|
|
</md-input-container>
|
|
|
|
<md-input-container>
|
|
<label>
|
|
<var:string label:value="Description"/>
|
|
</label>
|
|
<textarea ng-model="editor.card.description"><!-- note --></textarea>
|
|
</md-input-container>
|
|
|
|
<!-- list members -->
|
|
<div class="pseudo-input-container">
|
|
<label class="pseudo-input-label">
|
|
<var:string label:value="Members"/>
|
|
</label>
|
|
<md-contact-chips
|
|
ng-model="editor.card.refs"
|
|
md-contacts="editor.userFilter($query, editor.card.refs)"
|
|
md-contact-name="$$fullname"
|
|
md-contact-image="$$image"
|
|
md-contact-email="$$email"
|
|
md-require-match="md-require-match"
|
|
filter-selected="false"
|
|
label:placeholder="Add Member"><!-- members --></md-contact-chips>
|
|
</div>
|
|
|
|
<div class="fieldset md-layout-margin" layout="row" layout-align="end center">
|
|
<md-button type="button" ng-click="editor.cancel()">
|
|
<var:string label:value="Cancel"/>
|
|
</md-button>
|
|
<md-button type="button" ng-click="editor.reset()">
|
|
<var:string label:value="Reset"/>
|
|
</md-button>
|
|
<var:if condition="canCreateOrModify">
|
|
<md-button class="md-primary md-hue-3" type="submit">
|
|
<var:string label:value="Save"/>
|
|
</md-button>
|
|
</var:if>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</md-content>
|
|
|
|
</container>
|