1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

[ongoing] new space interface

This commit is contained in:
Sylvain 2017-02-13 17:18:06 +01:00
parent 40952600e7
commit 9d367f95db
6 changed files with 74 additions and 0 deletions

View File

@ -43,3 +43,24 @@ Application.Controllers.controller "SpacesController", ["$scope", "$state", 'spa
$state: $state
]
##
# Controller used in the space creation page (admin)
##
Application.Controllers.controller "NewSpaceController", ["$scope", "$state", 'CSRF',($scope, $state, CSRF) ->
CSRF.setMetaTags()
## API URL where the form will be posted
$scope.actionUrl = "/api/spaces/"
## Form action on the above URL
$scope.method = "post"
## default machine parameters
$scope.space =
space_files_attributes: []
## Using the SpacesController
new SpacesController($scope, $state)
]

View File

@ -407,6 +407,14 @@ angular.module('application.router', ['ui.router']).
url: '/spaces/:id/reserve'
.state 'app.admin.space_new',
url: '/spaces/new'
views:
'main@':
templateUrl: '<%= asset_path "spaces/new.html" %>'
controller: 'NewSpaceController'
resolve:
translations: [ 'Translations', (Translations) ->
Translations.query(['app.admin.space_new', 'app.shared.space']).$promise
]
# trainings
.state 'app.public.trainings_list',

View File

View File

@ -0,0 +1,33 @@
<section class="heading b-b">
<div class="row no-gutter">
<div class="col-md-1 hidden-xs">
<section class="heading-btn">
<a href="#" ng-click="backPrevLocation($event)"><i class="fa fa-long-arrow-left "></i></a>
</section>
</div>
<div class="col-md-8 b-l b-r">
<section class="heading-title">
<h1 translate>{{ 'add_a_new_space' }}</h1>
</section>
</div>
</div>
</section>
<div class="row no-gutter" >
<div class="col-md-9 b-r nopadding">
<div class="m-lg alert alert-warning" role="alert">
{{ 'watch_out_when_creating_a_new_space_its_prices_are_initialized_at_0_for_all_subscriptions' | translate}}
{{ 'consider_changing_its_prices_before_creating_any_reservation_slot' | translate }}
</div>
<ng-include src="'<%= asset_path 'spaces/_form.html' %>'"></ng-include>
</div>
<div class="col-md-3"/>
</div>

View File

@ -69,6 +69,12 @@ en:
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Beware, when creating a training, its reservation prices are initialized at zero."
dont_forget_to_change_them_before_creating_slots_for_this_training: "Don't forget to change them before creating slots for this training."
space_new:
# create a new space
add_a_new_space: "Add a new space"
watch_out_when_creating_a_new_space_its_prices_are_initialized_at_0_for_all_subscriptions: "Watch out! When creating a new space, its prices are initialized at 0 for all subscriptions."
consider_changing_its_prices_before_creating_any_reservation_slot: "Consider changing its prices before creating any reservation slot."
events:
# events tracking and management
events_monitoring: "Events monitoring"

View File

@ -69,6 +69,12 @@ fr:
beware_when_creating_a_training_its_reservation_prices_are_initialized_to_zero: "Attention, lors de la création d'une formation, ses tarifs de réservation sont initialisés à zero."
dont_forget_to_change_them_before_creating_slots_for_this_training: "Pensez à les modifier avant de créer des créneaux pour cette formation."
space_new:
# créer un nouvel espace
add_a_new_space: "Ajouter un nouvel espace"
watch_out_when_creating_a_new_space_its_prices_are_initialized_at_0_for_all_subscriptions: "Attention, lors de la création d'un espace, ses tarifs de réservation sont initialisés à zero pour tout les abonnements."
consider_changing_its_prices_before_creating_any_reservation_slot: "Pensez à modifier ces prix avant de créer des créneaux pour cette machine."
events:
# gestion et suivi des évènements
events_monitoring: "Suivi des évènements"