moved tickets page
This commit is contained in:
parent
15fb62564f
commit
f4e29258cc
8 changed files with 14 additions and 13 deletions
|
@ -3,9 +3,9 @@
|
|||
<div class="panel panel-primary table-striped top5">
|
||||
<div class="panel-heading">
|
||||
<h1>
|
||||
<button ng-if="event._id" ng-click="$state.go('event.info', {id: event._id})" class="btn btn-success">
|
||||
<span class="fa fa-info-circle vcenter"></span>
|
||||
{{'Info' | translate}}
|
||||
<button ng-if="event._id" ng-click="$state.go('event.tickets', {id: event._id})" class="btn btn-success">
|
||||
<span class="fa fa-ticket vcenter"></span>
|
||||
{{'Tickets' | translate}}
|
||||
</button>
|
||||
<span ng-if="!event.title">{{'New event' | translate}}</span>{{event.title}}
|
||||
</h1>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- main view for Event -->
|
||||
<!-- div class="container">
|
||||
<ul class="nav nav-tabs">
|
||||
<li ui-sref-active="active"><a ui-sref="event.info({id: $state.params.id})">Info</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="event.tickets({id: $state.params.id})">Info</a></li>
|
||||
<li ui-sref-active="active"><a ui-sref="event.edit({id: $state.params.id})">Edit</a></li>
|
||||
</ul -->
|
||||
<div ui-view></div>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<tr ng-repeat="person in event.persons | splittedFilter:query | orderBy:personsOrder">
|
||||
<td class="text-right">{{$index+1}}</td>
|
||||
<td>
|
||||
<span><strong><a ui-sref="person.info({id: person.person_id})"><span>{{person.name}}</span> <span>{{person.surname}}</span></a></strong></span><span ng-if="person.email"> <{{person.email}}></span>
|
||||
<span><strong><a ui-sref="person.info({id: person.person_id})"><span class="fa fa-lg fa-user"></span></a> <a ui-sref="event.ticket.edit({id: event._id, ticket_id: person.ticket_id})" ng-if="person.ticket_id"><span>{{person.name}}</span> <span>{{person.surname}}</span></a></strong></span><span ng-if="!person.ticket_id"><span>{{person.name}}</span> <span>{{person.surname}}</span></a></strong></span></span><span ng-if="person.email"> <{{person.email}}></span>
|
||||
<p ng-if="person.company || person.job_title"><i ng-if="person.job_title">{{person.job_title}}</i><span ng-if="person.company && person.job_title"> @ </span><i ng-if="person.company">{{person.company}}</i></p>
|
||||
</td>
|
||||
<td class="text-center">
|
|
@ -46,7 +46,8 @@
|
|||
</td>
|
||||
<td>
|
||||
<button ng-if="hasPermission('event:tickets|create')" ng-click="$state.go('event.ticket.new', {id: event._id})" class="btn btn-link fa fa-user-plus" type="button" title="{{'Register' | translate}}"></button>
|
||||
<button ng-if="hasPermission('persons|update')" ng-click="$state.go('event.info', {id: event._id})" class="btn btn-link fa fa-list" type="button" title="{{'Manage attendees' | translate}}"></button>
|
||||
<button ng-if="hasPermission('persons|update')" ng-click="$state.go('event.tickets', {id: event._id})" class="btn btn-link fa fa-list" type="button" title="{{'Manage attendees' | translate}}"></button>
|
||||
<button ng-if="hasPermission('event|update')" ng-click="$state.go('event.edit', {id: event._id})" type="button" class="btn btn-link fa fa-cog fa-lg" title="{{'Edit' | translate}}"></button>
|
||||
<button ng-if="hasPermission('event|delete')" ng-click="remove(event._id)" type="button" class="btn btn-link fa fa-trash fa-lg" title="{{'Delete' | translate}}"></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
6
angular_app/js/app.js
vendored
6
angular_app/js/app.js
vendored
|
@ -121,9 +121,9 @@ eventManApp.config(['$stateProvider', '$urlRouterProvider',
|
|||
templateUrl: 'event-edit.html',
|
||||
controller: 'EventDetailsCtrl'
|
||||
})
|
||||
.state('event.info', {
|
||||
url: '/:id',
|
||||
templateUrl: 'event-info.html',
|
||||
.state('event.tickets', {
|
||||
url: '/:id/tickets',
|
||||
templateUrl: 'event-tickets.html',
|
||||
controller: 'EventDetailsCtrl'
|
||||
})
|
||||
.state('event.ticket', {
|
||||
|
|
2
angular_app/js/controllers.js
vendored
2
angular_app/js/controllers.js
vendored
|
@ -121,7 +121,7 @@ eventManControllers.controller('EventDetailsCtrl', ['$scope', '$state', 'Event',
|
|||
);
|
||||
});
|
||||
|
||||
if ($state.is('event.info')) {
|
||||
if ($state.is('event.tickets')) {
|
||||
$scope.allPersons = Person.all();
|
||||
|
||||
// Handle WebSocket connection used to update the list of persons.
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="event in events | splittedFilter:query | orderBy:eventsOrderProp">
|
||||
<td><strong><a ui-sref="event.info({id: event._id})">{{event.title}}</a></strong></td>
|
||||
<td><strong><a ui-sref="event.tickets({id: event._id})">{{event.title}}</a></strong></td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-link" name="switch-registered" ng-click="switchRegistered(event, person, !event.person_data.person_id)"><span class="fa fa-lg {{(event.person_data.person_id) && 'fa-check-circle text-success' || 'fa-times-circle text-danger'}}"></span></button>
|
||||
</td>
|
||||
|
|
|
@ -677,7 +677,7 @@ class EventsHandler(CollectionHandler):
|
|||
|
||||
ret = {'action': 'update', 'person_id': person_id, 'person': new_person_data, 'uuid': uuid}
|
||||
if old_person_data != new_person_data:
|
||||
self.send_ws_message('event/%s/updates' % id_, json.dumps(ret))
|
||||
self.send_ws_message('event/%s/tickets/updates' % id_, json.dumps(ret))
|
||||
return ret
|
||||
|
||||
def handle_put_tickets(self, id_, person_id, data):
|
||||
|
@ -966,7 +966,7 @@ def run():
|
|||
db_connector.add('settings',
|
||||
{'setting': 'server_cookie_secret', 'cookie_secret': cookie_secret})
|
||||
|
||||
_ws_handler = (r"/ws/+event/+(?P<event_id>[\w\d_-]+)/+updates/?", WebSocketEventUpdatesHandler)
|
||||
_ws_handler = (r"/ws/+event/+(?P<event_id>[\w\d_-]+)/+tickets/+updates/?", WebSocketEventUpdatesHandler)
|
||||
_persons_path = r"/persons/?(?P<id_>[\w\d_-]+)?/?(?P<resource>[\w\d_-]+)?/?(?P<resource_id>[\w\d_-]+)?"
|
||||
_events_path = r"/events/?(?P<id_>[\w\d_-]+)?/?(?P<resource>[\w\d_-]+)?/?(?P<resource_id>[\w\d_-]+)?"
|
||||
_users_path = r"/users/?(?P<id_>[\w\d_-]+)?/?(?P<resource>[\w\d_-]+)?/?(?P<resource_id>[\w\d_-]+)?"
|
||||
|
|
Loading…
Reference in a new issue