$routeProvider.when('/confirmation/:registrationId', {templateUrl: 'partials/confirmation.html', controller: RegistrationCtrl});
$routeProvider.when('/draft/:registrationId', {templateUrl: 'partials/draft.html', controller: RegistrationCtrl});
$routeProvider.when('/verified/:registrationId', {templateUrl: 'partials/verified.html', controller: RegistrationCtrl});
+ $routeProvider.when('/review/:registrationId', {templateUrl: 'partials/review.html', controller: RegistrationCtrl});
$routeProvider.when('/list', {templateUrl: 'partials/list.html', controller: ListCtrl});
$routeProvider.otherwise({redirectTo: '/registration/'});
}]);
}).
/* http://jsfiddle.net/asgoth/7bNAd/ */
value('RegistrationState', function() {
- return [ 'draft', 'confirmation', 'verified' ];
+ return [ 'draft', 'confirmation', 'verified', 'review' ];
});
--- /dev/null
+<h1> Registracija i prijavljivanje izlaganja</h1>
+
+<form ng-controller="RegistrationCtrl" name="RegistrationForm" class="form-horizontal">
+
+<div class="alert" ng-class="info.css_class" ng-show="info.message">
+{{info.message}}
+</div>
+
+<fieldset>
+<legend>
+<%= locale en => 'Review', hr => 'Recenzija' %>
+</legend>
+
+<input class="my-label-input" ng-model="registration.review.person" label="Recenzent" placeholder="Ime Prezime" >
+
+<input class="my-label-input" ng-model="registration.review.note" label="Bilješka" >
+
+<button class="btn btn-primary" ng-click="update(registration, registration.state, '<%= locale en => 'Changes saved', hr => 'Promjene spremljene' %>')" ng-show="RegistrationForm.$dirty">
+<%= locale en => 'Save changes', hr => 'Spremi promjene' %>
+</button>
+
+<div class="well">
+%= include 'registration/view'
+</div>
+
+</div>
+
+% if ( $lang =~ m/-dev/ ) {
+<pre>
+$dirty = {{RegistrationForm.$dirty}}
+$pristine = {{RegistrationForm.$pristine}}
+
+{{registration}}
+</pre>
+% }
+
+</form>
+
+
describe('RegistrationState', function() {
it('have status', inject(function(RegistrationState) {
- expect(RegistrationState().length).toBe(3);
+ expect(RegistrationState().length).toBe(4);
}));
});