Merge pull request #44 from alberanid/master

company and job title
This commit is contained in:
Davide Alberani 2015-04-18 18:27:59 +02:00
commit ff92f21e02
4 changed files with 12 additions and 3 deletions

View file

@ -56,7 +56,7 @@
<tr ng-repeat="person in event.persons | splittedFilter:query | orderBy:personsOrderProp"> <tr ng-repeat="person in event.persons | splittedFilter:query | orderBy:personsOrderProp">
<td> <td>
<span><strong><a ui-sref="person.info({id: person.person_id})"><span>{{person.name}}</span>&nbsp;<span>{{person.surname}}</span></a></strong></span><span ng-if="person.email">&nbsp;&lt;{{person.email}}&gt;</span> <span><strong><a ui-sref="person.info({id: person.person_id})"><span>{{person.name}}</span>&nbsp;<span>{{person.surname}}</span></a></strong></span><span ng-if="person.email">&nbsp;&lt;{{person.email}}&gt;</span>
<p ng-if="person.company"><i>{{person.company}}</i></p> <p ng-if="person.company || person.job"><i ng-if="person.job">{{person.job}}</i><span ng-if="person.company && person.job">&nbsp;@&nbsp;</span><i ng-if="person.company">{{person.company}}</i></p>
</td> </td>
<td> <td>
<button class="btn btn-link" name="switch-attended" ng-click="updateAttendee(person, !person.attended)"><span class="glyphicon {{(person.attended) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button> <button class="btn btn-link" name="switch-attended" ng-click="updateAttendee(person, !person.attended)"><span class="glyphicon {{(person.attended) && 'glyphicon-ok-sign text-success' || 'glyphicon-remove-sign text-danger'}}"></span></button>

View file

@ -32,6 +32,11 @@
<input name="company" class="form-control" placeholder="{{'Acme Corporation' | translate}}" ng-model="person.company"> <input name="company" class="form-control" placeholder="{{'Acme Corporation' | translate}}" ng-model="person.company">
</div> </div>
<div class="input-group top5">
<span class="input-group-addon">{{'Job' | translate}}</span>
<input name="job" class="form-control" placeholder="{{'Evil Ruler' | translate}}" ng-model="person.job">
</div>
<div class="form-group top5"> <div class="form-group top5">
<label for="addToEvent">{{'Add to event:' | translate}}</label> <label for="addToEvent">{{'Add to event:' | translate}}</label>
<select class="form-control" id="addToEvent" ng-model="addToEvent"> <select class="form-control" id="addToEvent" ng-model="addToEvent">

View file

@ -40,7 +40,7 @@
<tr ng-repeat="person in persons | splittedFilter:query | orderBy:personsOrderProp"> <tr ng-repeat="person in persons | splittedFilter:query | orderBy:personsOrderProp">
<td> <td>
<span><strong><a ui-sref="person.info({id: person._id})"><span>{{person.name}}</span>&nbsp;<span>{{person.surname}}</span></a></strong></span><span ng-if="person.email">&nbsp;&lt;{{person.email}}&gt;</span> <span><strong><a ui-sref="person.info({id: person._id})"><span>{{person.name}}</span>&nbsp;<span>{{person.surname}}</span></a></strong></span><span ng-if="person.email">&nbsp;&lt;{{person.email}}&gt;</span>
<p ng-if="person.company"><i>{{person.company}}</i></p> <p ng-if="person.company || person.job"><i ng-if="person.job">{{person.job}}</i><span ng-if="person.company && person.job">&nbsp;@&nbsp;</span><i ng-if="person.company">{{person.company}}</i></p>
</td> </td>
<td> <td>
<button ng-click="remove(person._id)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button> <button ng-click="remove(person._id)" type="button" class="btn btn-link glyphicon glyphicon-trash"></button>

View file

@ -352,9 +352,13 @@ class EbCSVImportPersonsHandler(BaseHandler):
'Data check-in': 'checkin_datetime', 'Data check-in': 'checkin_datetime',
'Ordine n.': 'order_nr', 'Ordine n.': 'order_nr',
'ID ordine': 'order_nr', 'ID ordine': 'order_nr',
'Titolo professionale': 'job',
'Azienda': 'company',
'Prefisso': 'name_title',
'Prefisso (Sig., Sig.ra, ecc.)': 'name_title', 'Prefisso (Sig., Sig.ra, ecc.)': 'name_title',
} }
keepPersonData = ('name', 'surname', 'email', 'name_title') # Only these information are stored in the person collection.
keepPersonData = ('name', 'surname', 'email', 'name_title', 'company', 'job')
@gen.coroutine @gen.coroutine
def post(self, **kwargs): def post(self, **kwargs):