draft of CSV import
This commit is contained in:
parent
9e86711e22
commit
9b43e27d8f
6 changed files with 42 additions and 5 deletions
|
@ -1,7 +1,10 @@
|
||||||
<!-- show details of a single Event (editing also take place here) -->
|
<!-- show details of a single Event (editing also take place here) -->
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<form name="eventForm" ng-model="eventdetails" ng-submit="save()">
|
<form name="eventForm" ng-model="eventdetails" ng-submit="save()">
|
||||||
<alert><button type="button" class="btn btn-default" ng-click="save($event)" ng-disabled="!eventForm.$dirty">save</button></alert>
|
<alert class="clearfix">
|
||||||
|
<span>{{event.title}}</span>
|
||||||
|
<button type="button" class="btn btn-default pull-right" ng-click="save($event)" ng-disabled="!eventForm.$dirty">save</button>
|
||||||
|
</alert>
|
||||||
|
|
||||||
<div class="input-group input-group-lg">
|
<div class="input-group input-group-lg">
|
||||||
<span class="input-group-addon">Title</span>
|
<span class="input-group-addon">Title</span>
|
||||||
|
|
18
angular_app/import-persons.html
Normal file
18
angular_app/import-persons.html
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="container">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">{{'Import from eventbrite CSV'}}</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form name="ebCSVForm" ng-model="importpersons" class="well" ng-submit="ebCSVimport()">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="eb-csv-import">{{'CSV file' | translate}}</label>
|
||||||
|
<input name="csvFile" type="file" id="eb-csv-import" ng-model="ebCSVfile" ng-required="true">
|
||||||
|
<p class="help-block">{{'CSV exported from eventbrite' | translate}}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="submit" value="{{'Import' | translate}}"/>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -39,9 +39,10 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="main-header" ng-controller="NavigationCtrl as n">
|
<div class="main-header" ng-controller="NavigationCtrl as n">
|
||||||
<input type="button" id="events-button" ng-click="n.go('/events')" class="btn btn-link" value="{{'Events' | translate}}" />
|
<input type="button" id="events-button" ng-click="n.go('/events')" class="btn btn-link" value="{{'Events' | translate}}" />
|
||||||
<input type="button" id="new-event-button" ng-click="n.go('/new-event')" class="btn btn-link" value="{{'Add Event' | translate}}" />
|
<input type="button" id="new-event-button" ng-click="n.go('/new-event')" class="btn btn-link" value="{{'Add event' | translate}}" />
|
||||||
<input type="button" id="persons-button" ng-click="n.go('/persons')" class="btn btn-link" value="{{'Persons' | translate}}" />
|
<input type="button" id="persons-button" ng-click="n.go('/persons')" class="btn btn-link" value="{{'Persons' | translate}}" />
|
||||||
<input type="button" id="persons-button" ng-click="n.go('/new-person')" class="btn btn-link" value="{{'Add Person' | translate}}" />
|
<input type="button" id="new-person-button" ng-click="n.go('/new-person')" class="btn btn-link" value="{{'Add person' | translate}}" />
|
||||||
|
<input type="button" id="import-persons-button" ng-click="n.go('/import-persons')" class="btn btn-link" value="{{'Import persons' | translate}}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- all the magic takes place here: the content inside the next div
|
<!-- all the magic takes place here: the content inside the next div
|
||||||
|
|
4
angular_app/js/app.js
vendored
4
angular_app/js/app.js
vendored
|
@ -67,6 +67,10 @@ eventManApp.config(['$routeProvider',
|
||||||
templateUrl: 'person-detail.html',
|
templateUrl: 'person-detail.html',
|
||||||
controller: 'PersonDetailsCtrl'
|
controller: 'PersonDetailsCtrl'
|
||||||
}).
|
}).
|
||||||
|
when('/import-persons', {
|
||||||
|
templateUrl: 'import-persons.html',
|
||||||
|
controller: 'ImportPersonsCtrl'
|
||||||
|
}).
|
||||||
otherwise({
|
otherwise({
|
||||||
redirectTo: '/events'
|
redirectTo: '/events'
|
||||||
});
|
});
|
||||||
|
|
10
angular_app/js/controllers.js
vendored
10
angular_app/js/controllers.js
vendored
|
@ -90,3 +90,13 @@ eventManControllers.controller('PersonDetailsCtrl', ['$scope', 'Person', '$route
|
||||||
}]
|
}]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
eventManControllers.controller('ImportPersonsCtrl', ['$scope', '$log',
|
||||||
|
function ($scope, $log) {
|
||||||
|
$scope.ebCSVimport = function() {
|
||||||
|
$log.info("ImportPersonsCtrl");
|
||||||
|
$log.info($scope);
|
||||||
|
};
|
||||||
|
}]
|
||||||
|
);
|
||||||
|
|
||||||
|
|
5
angular_app/js/i18n.js
vendored
5
angular_app/js/i18n.js
vendored
|
@ -1,9 +1,10 @@
|
||||||
eventManApp.config(['$translateProvider', function ($translateProvider) {
|
eventManApp.config(['$translateProvider', function ($translateProvider) {
|
||||||
$translateProvider.translations('it_IT', {
|
$translateProvider.translations('it_IT', {
|
||||||
'Events': 'Eventi',
|
'Events': 'Eventi',
|
||||||
'Add Event': 'Nuovo evento',
|
'Add event': 'Nuovo evento',
|
||||||
'Persons': 'Persone',
|
'Persons': 'Persone',
|
||||||
'Add Person': 'Nuova persona',
|
'Add person': 'Nuova persona',
|
||||||
|
'Import persons': 'Importa persone',
|
||||||
});
|
});
|
||||||
|
|
||||||
$translateProvider.preferredLanguage('it_IT');
|
$translateProvider.preferredLanguage('it_IT');
|
||||||
|
|
Loading…
Reference in a new issue